On Sun, Jan 2, 2011 at 5:14 PM, Stuart Buchanan wrote: > On Sun, Jan 2, 2011 at 3:44 PM, James Turner wrote: >> On 2 Jan 2011, at 14:56, Stuart Buchanan wrote: >> >>> gui.menuEnable("fuel-and-payload", false); >>> >>> We can add new names for any other menus that we might want to disable >>> on a per-aircraft basis, but from a quick skim through the menus I >>> couldn't see any other candidates. >> >> Proving one again that FlightGear already supports everything, if only it >> were documented ;) >> >> WHich aircraft need to be updated to use this feature, prior to the release? >> As always, once >> we have a decent corpus of aircraft following the 'correct' style, it's >> easier to tell aircraft >> developers to 'do what the f14 already does' when updating aircraft. > > I've done a grep of the Aircraft tree and eyeballed the results.
... and missed a couple in the process by not looking carefully enough. Whoops. The following aircraft override the radio dialog, which has moved since v2.0.0. 777-200ER b1900d Citation-Bravo I've just pushed an enhancement to gui.nas that allows the aircraft developer to change the binding for a symbolically named dialog, in the same way that they can enable/disable dialogs and menus using the existing gui.menuEnable() function. So, you can now put the following code in your aircraft-specific Nasal files: gui.menuBind("radio", "dialogs.Radio.open()"); This replaces the binding for the "radio" menu item with a command to open the dialogs.Radio dialog box (that you've defined elsewhere). Note that this searches the menu for the symbolic names (name tag) defined in menubar.xml, (e.g. radio, autopilot-settings, gps, map) rather than the label tag, which may change over time, so should be a robust long-term solution. Syd - I think all these aircraft are yours. Could you update them to use the new function? Hint: - the code you want for the 777-200ER is to add the following to the bottom of 777-200ER/Nasal/dialogs.nas: gui.menuBind("radio", "dialogs.Radio.open()"); gui.menuBind("autopilot-settings", "dialogs.ap_settings.open()"); I expect the code for the other aircraft is similar :) I've still to work out a better way to handle adding new items to the existing menus, e.g. pushback. Part of me feels that this should be located in the aircraft-specific menu rather than Equipment, but it would be straightforward to add a new gui.menuAdd() function along similar lines to menuBind(). Anyone got any preferences? -Stuart ------------------------------------------------------------------------------ Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel