PUI: Difference between revisions

Jump to navigation Jump to search
88 bytes added ,  15 July 2022
m
Line 29: Line 29:


=== 2022 ===
=== 2022 ===
In February 2022, James reported having something in progress locally, and that should even be something we can try in March/April 2022. Hopefully that’s quick enough, knowing it has been a long time coming.<ref>https://sourceforge.net/p/flightgear/mailman/message/37606439/</ref>


{{Main article|pui2canvas}}


In February 2022, James reported having something in progress locally, and that should even be something we can try in March/April 2022. Hopefully that’s quick enough, knowing it has been a long time coming.<ref>https://sourceforge.net/p/flightgear/mailman/message/37606439/</ref>


There's now an XML to Nasal bridge, to keep PUI dialogs working (Disabled by a CMake option)
There's now an XML to Nasal bridge, to keep PUI dialogs working (Disabled by a CMake option)
This is implemented on top of the [[Canvas]] system.


This builds equivalent C++ objects to what the PUI dialogs build, with properties exposed to Nasal. Peer objects are created by Nasal callbacks, which can implement the various dialog functions needed to keep compatibility, especially the ‘update’ and ‘apply’ hooks.<ref>https://sourceforge.net/p/flightgear/flightgear/ci/cbd5ef9e7b8f433dbc1ba97bae7d7cfc894e7cef/</ref>
This builds equivalent C++ objects to what the [[PUI]] dialogs build, with properties exposed to Nasal.
Peer objects are created by Nasal [[callbacks]], which can implement the various dialog functions needed to keep compatibility, especially the ‘update’ and ‘apply’ hooks.<ref>https://sourceforge.net/p/flightgear/flightgear/ci/cbd5ef9e7b8f433dbc1ba97bae7d7cfc894e7cef/</ref>


Use the following cmake option to enable this code: <code>-DENABLE_PUICOMPAT=ON</code>
Use the following [[Building using CMake|cmake option]] to enable this code: <code>-DENABLE_PUICOMPAT=ON</code>


The new Compatibility files can now be found in $FG_SRC/GUI:
The new Compatibility files can now be found in $FG_SRC/GUI:
Line 44: Line 47:
* {{flightgear file|src/GUI/FGPUICompatDialog.hxx }}
* {{flightgear file|src/GUI/FGPUICompatDialog.hxx }}
* {{flightgear file|src/GUI/PUICompatObject.cxx  }}
* {{flightgear file|src/GUI/PUICompatObject.cxx  }}
{{See also|pui2canvas}}


The corresponding Nasal/Canvas module to dynamically "translate" legacy PUI/XML dialogs into Canvas dialogs (at runtime), is to be found in {{fgdata file|Nasal/gui/XMLDialog.nas}} <ref>https://sourceforge.net/p/flightgear/fgdata/ci/fe7c87b21a69f88ddb87d89453c48d12b69660e2/</ref>
The corresponding Nasal/Canvas module to dynamically "translate" legacy PUI/XML dialogs into Canvas dialogs (at runtime), is to be found in {{fgdata file|Nasal/gui/XMLDialog.nas}} <ref>https://sourceforge.net/p/flightgear/fgdata/ci/fe7c87b21a69f88ddb87d89453c48d12b69660e2/</ref>

Navigation menu