20,741
edits
(revise to match latest changes; taken from working code on the F-15. Also has NavDisplay support now.) |
|||
Line 9: | Line 9: | ||
This works with a SVG file that defines the menu label locations and has a group for each page. The framework manages the menu hierarchy and displays labels corresponding to the buttons. | This works with a SVG file that defines the menu label locations and has a group for each page. The framework manages the menu hierarchy and displays labels corresponding to the buttons. | ||
This is based around the SpaceShuttle | This is based around the SpaceShuttle displays which are in turn based on the http://wiki.flightgear.org/McDonnell_Douglas_F-15_Eagle#MPCD | ||
The code as below will allow multiple instances of a particular display to be created. Towards the end of the code an array is populated with one MFD_device instance per display. All use the same SVG and do the same job - but can be on different devices (left, right, etc) in the cockpit. The 3d model must have the frame, bezel and buttons for each display. The model_index selects which buttons to use. The buttons are named sim/model/f15/controls/PFD/button-pressed0 - where this property contains the index of the button, and there is one property per display. | The code as below will allow multiple instances of a particular display to be created. Towards the end of the code an array is populated with one MFD_device instance per display. All use the same SVG and do the same job - but can be on different devices (left, right, etc) in the cockpit. The 3d model must have the frame, bezel and buttons for each display. The model_index selects which buttons to use. The buttons are named sim/model/f15/controls/PFD/button-pressed0 - where this property contains the index of the button, and there is one property per display. |