20,741
edits
No edit summary |
m (+canvas example) |
||
Line 12: | Line 12: | ||
<syntaxhighlight lang="nasal"> | <syntaxhighlight lang="nasal"> | ||
gui.popupTip("Hello, World!"); | gui.popupTip("Hello, World!"); | ||
</syntaxhighlight> | |||
To use a [[Canvas]] GUI dialog, try the following: | |||
<syntaxhighlight lang="nasal"> | |||
# create a new InputDialog with a title, label, and a callback | |||
canvas.InputDialog.getText("Hello World", "Please enter your name", func(btn,value) { | |||
if (value) gui.popupTip("You entered: "~value); | |||
}); | |||
</syntaxhighlight> | </syntaxhighlight> | ||