Canvas Draw: Difference between revisions

m
Line 133: Line 133:


We can protoype a simple Nasal parser that maps these primitives to the corresponding 2D API calls to show the corresponding HUD in a dedicated Canvas GUI dialog for testing purposes.
We can protoype a simple Nasal parser that maps these primitives to the corresponding 2D API calls to show the corresponding HUD in a dedicated Canvas GUI dialog for testing purposes.
For instance, to dump the XML markup to the console, we can use io.read_properties() like this (via the [[Nasal Console]]):
<syntaxhighlight lang="xml">
var filename = "Huds/minimal.xml";
var path = getprop("/sim/fg-root") ~ "/" ~ filename;
var xmlNode = io.read_properties(path);
var xmlHash = xmlNode.getValues();
debug.dump( xmlHash );
<syntaxhighlight>


== Resources ==
== Resources ==