aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/GuiLua/test.skang
diff options
context:
space:
mode:
Diffstat (limited to 'src/GuiLua/test.skang')
-rw-r--r--src/GuiLua/test.skang14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/GuiLua/test.skang b/src/GuiLua/test.skang
new file mode 100644
index 0000000..10382b5
--- /dev/null
+++ b/src/GuiLua/test.skang
@@ -0,0 +1,14 @@
1#!/usr/bin/env skang -l test -- Lua allows this shell hack.
2
3-- There's an implied local skang = require 'skang'
4-- There's an implied local test = require 'test'
5
6-- This is a bit more verbose than I wanted. lol
7local win = skang.window(500, 500, "G'day planet.", 'testWindow')
8skang.thingasm{win, 'quitter', 'Quits the skang window', types = 'widget', widget='"button", "Quit", 10, 10, 100, 30'}
9win.W.quitter.action = 'skang.quit()' -- TODO Should look it up in ThingSpace.commands, and translate 'quit' into the Lua 'skang.quit()'?
10
11skang.thingasm{win, 'ffuncer', 'Calls ffunc', types = 'widget', widget='"button", "ffunc()", 10, 40, 100, 30', action='test.ffunc(3, 4)'}
12
13test.bar = 'things'
14test.ffunc(1, 'two')