diff options
Diffstat (limited to 'ClientHamr/GuiLua')
-rw-r--r-- | ClientHamr/GuiLua/test.skang | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/ClientHamr/GuiLua/test.skang b/ClientHamr/GuiLua/test.skang index ba40f1f..ea53a26 100644 --- a/ClientHamr/GuiLua/test.skang +++ b/ClientHamr/GuiLua/test.skang | |||
@@ -1,12 +1,17 @@ | |||
1 | #!skang test.skang -- This is Lua, so this might not work. | 1 | #!skang test.skang -- This is Lua, so this might not work. |
2 | -- There's an implied local this = require('test') | 2 | |
3 | -- There's an implied local skang = require('skang') | 3 | -- There's an implied local this = require 'test' |
4 | local widget = require('widget') | 4 | -- There's an implied local skang = require 'skang' |
5 | -- local other = require('otherPackageName') | 5 | |
6 | local widget = require 'widget' | ||
7 | -- local other = require 'otherPackageName' | ||
8 | |||
6 | skang.clear | 9 | skang.clear |
7 | skang.window(200, 200, "G'day planet.") | 10 | skang.window(200, 200, "G'day planet.") |
11 | |||
8 | quitter = widget.button('Quit', 0.5, 0.5, 0.5, 0.5) | 12 | quitter = widget.button('Quit', 0.5, 0.5, 0.5, 0.5) |
9 | quitter:action('quit') -- 'quit' is looked up in ThingSpcae.commands, and translated into the Lua 'skang.quit()'. | 13 | quitter:action('quit') -- 'quit' is looked up in ThingSpcae.commands, and translated into the Lua 'skang.quit()'. |
14 | |||
10 | --other.foo = 'stuff' | 15 | --other.foo = 'stuff' |
11 | this.bar = 'things' | 16 | this.bar = 'things' |
12 | this.func(1, 'two') | 17 | this.func(1, 'two') |