diff options
author | David Walter Seikel | 2014-04-22 15:13:38 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-04-22 15:13:38 +1000 |
commit | dd009ccdfd62f9153dbc72f5f5de5d5f72979690 (patch) | |
tree | 50d62438c6d47dccf82f440986919b1ed3edbbd9 /src/GuiLua/test.skang | |
parent | Move most of the README's and other docs into the new docs directory. (diff) | |
download | SledjHamr-dd009ccdfd62f9153dbc72f5f5de5d5f72979690.zip SledjHamr-dd009ccdfd62f9153dbc72f5f5de5d5f72979690.tar.gz SledjHamr-dd009ccdfd62f9153dbc72f5f5de5d5f72979690.tar.bz2 SledjHamr-dd009ccdfd62f9153dbc72f5f5de5d5f72979690.tar.xz |
Move all source into the new src directory, and shuffle a few other things around.
Diffstat (limited to 'src/GuiLua/test.skang')
-rw-r--r-- | src/GuiLua/test.skang | 14 |
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 | ||
7 | local win = skang.window(500, 500, "G'day planet.", 'testWindow') | ||
8 | skang.thingasm{win, 'quitter', 'Quits the skang window', types = 'widget', widget='"button", "Quit", 10, 10, 100, 30'} | ||
9 | win.W.quitter.action = 'skang.quit()' -- TODO Should look it up in ThingSpace.commands, and translate 'quit' into the Lua 'skang.quit()'? | ||
10 | |||
11 | skang.thingasm{win, 'ffuncer', 'Calls ffunc', types = 'widget', widget='"button", "ffunc()", 10, 40, 100, 30', action='test.ffunc(3, 4)'} | ||
12 | |||
13 | test.bar = 'things' | ||
14 | test.ffunc(1, 'two') | ||