Howto:Creating a custom waypointlist pendant using Canvas: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
Line 42: Line 42:


The following snippet of code is to be executed/tested using the built-in [[Nasal  Console]]:  
The following snippet of code is to be executed/tested using the built-in [[Nasal  Console]]:  
[[File:Nasal-console-3.0.png|500px|The Nasal console in FG 3.0 with copy/paste buttons ]]


<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">

Revision as of 18:51, 7 December 2017

This article is a stub. You can help the wiki by expanding it.


Background

The issue is that even on the larger screens, you can't get the entire list of SIDS or STARs displayed when there are too many.[1]


The route manager dialog.

XML Markup

https://sourceforge.net/p/flightgear/fgdata/ci/next/tree/gui/dialogs/route-manager.xml#l596

        <waypointlist>
            <name>list</name>
            <halign>fill</halign>
            <valign>fill</valign>
            <stretch>true</stretch>
            <pref-height>150</pref-height>
            <property>/sim/gui/dialogs/route-manager/selection</property>
            <binding>
                <command>dialog-apply</command>
                <object-name>list</object-name>
            </binding>
        </waypointlist>

Dialog Builder

https://sourceforge.net/p/flightgear/flightgear/ci/next/tree/src/GUI/FGPUIDialog.cxx#l1051

C++ Widget Code

https://sourceforge.net/p/flightgear/flightgear/ci/next/tree/src/GUI/WaypointList.cxx

Nasal APIs

Canvas Code (proof-of-concept)

WIP.png Work in progress
This article or section will be worked on in the upcoming hours or days.
See history for the latest developments.

The following snippet of code is to be executed/tested using the built-in Nasal Console:

The Nasal console in FG 3.0 with copy/paste buttons


Related

References