Canvas widgets: Difference between revisions

Jump to navigation Jump to search
Line 247: Line 247:
We need to keep the existing way of specifying GUI files via XML - it's a nice, declarative way of building the dialogs. Switching to an imperative system would be a step backwards. I do like the idea of a gui/widget/widgetname.nas structure so we can easily create a factory function and hack / add widgets.
We need to keep the existing way of specifying GUI files via XML - it's a nice, declarative way of building the dialogs. Switching to an imperative system would be a step backwards. I do like the idea of a gui/widget/widgetname.nas structure so we can easily create a factory function and hack / add widgets.


It is important to keep in mind that the Canvas system will be used for at least 3 related uses:
It is important to keep in mind that the Canvas system will have at least 3 related uses:
* HUDs {{Pending}}
* HUDs {{Pending}}
* GUIs {{Pending}}
* GUIs {{Pending}}
* 2D panels {{Not done}}
* 2D panels {{Pending}}


All of these will require an XML parser that turns the existing structure into canvas nodes. The existing SVG parser is purely implemented in scripting space (see svg.nas) using the XML parser in $FG_ROOT/Nasal/io.nas  
All of these will require an XML parser that turns the existing structure into canvas nodes. The existing SVG parser is purely implemented in scripting space (see svg.nas) using the XML parser in $FG_ROOT/Nasal/io.nas  

Navigation menu