20,741
edits
| 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 | 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 {{ | * 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 | ||