Canvas MFD framework: Difference between revisions

Jump to navigation Jump to search
No edit summary
Line 78: Line 78:


<syntaxhighlight lang="nasal">
<syntaxhighlight lang="nasal">
#
# Select the default first page. Something needs to be selected otherwise the menus
# will not be correct.
MPCD.selectPage(p1_1);
MPCD.selectPage(p1_1);
#
# Connect the buttons
setlistener("sim/model/f15/controls/MPCD/button-pressed", func(v)
            {
                if (v != nil)
                {
                    if (v.getValue())
                        mpcd_button_pushed = v.getValue();
                    else
                    {
                        MPCD.notifyButton(mpcd_button_pushed);
                        mpcd_button_pushed = 0;
                    }
                }
            });


#
#
308

edits

Navigation menu