aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ClientHamr/GuiLua
diff options
context:
space:
mode:
Diffstat (limited to 'ClientHamr/GuiLua')
-rw-r--r--ClientHamr/GuiLua/test.skang13
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'
4local widget = require('widget') 4-- There's an implied local skang = require 'skang'
5-- local other = require('otherPackageName') 5
6local widget = require 'widget'
7-- local other = require 'otherPackageName'
8
6skang.clear 9skang.clear
7skang.window(200, 200, "G'day planet.") 10skang.window(200, 200, "G'day planet.")
11
8quitter = widget.button('Quit', 0.5, 0.5, 0.5, 0.5) 12quitter = widget.button('Quit', 0.5, 0.5, 0.5, 0.5)
9quitter:action('quit') -- 'quit' is looked up in ThingSpcae.commands, and translated into the Lua 'skang.quit()'. 13quitter: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'
11this.bar = 'things' 16this.bar = 'things'
12this.func(1, 'two') 17this.func(1, 'two')