Howto:Creating a Canvas GUI dialog file: Difference between revisions

Jump to navigation Jump to search
Line 33: Line 33:
<!--
<!--
{{Note|These dialog files can be edited at run-time and simply closed/re-opened, because the Canvas system will reload them from disk whenever the menu binding is triggered. So this is very convenient for quickly developing and testing your dialogs. For testing purposes, you can also paste the snippet into your [[Nasal Console]] and directly execute it.}}-->
{{Note|These dialog files can be edited at run-time and simply closed/re-opened, because the Canvas system will reload them from disk whenever the menu binding is triggered. So this is very convenient for quickly developing and testing your dialogs. For testing purposes, you can also paste the snippet into your [[Nasal Console]] and directly execute it.}}-->
Next, open/create $FG_ROOT/Nasal/canvas/gui/dialogs/CanvasDemo.nas and add some boilerplate code:
Next, navitate to {{Fgdata file|Nasal/canvas/gui/dialogs) and open/create $FG_ROOT/Nasal/canvas/gui/dialogs/CanvasDemo.nas to add some boilerplate code:
<syntaxhighlight lang="nasal">
<syntaxhighlight lang="nasal">
var DemoDialog = {
var DemoDialog = {

Navigation menu