From 524473f881d6b89bf85f7d5e2bd7b19a5a8ab18a Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Wed, 19 Mar 2014 12:39:35 +1000 Subject: Added some GuiLua test source files, and lots of comments in GuiLua.c. --- ClientHamr/GuiLua/test.skang | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 ClientHamr/GuiLua/test.skang (limited to 'ClientHamr/GuiLua/test.skang') diff --git a/ClientHamr/GuiLua/test.skang b/ClientHamr/GuiLua/test.skang new file mode 100644 index 0000000..ba40f1f --- /dev/null +++ b/ClientHamr/GuiLua/test.skang @@ -0,0 +1,12 @@ +#!skang test.skang -- This is Lua, so this might not work. +-- There's an implied local this = require('test') +-- There's an implied local skang = require('skang') +local widget = require('widget') +-- local other = require('otherPackageName') +skang.clear +skang.window(200, 200, "G'day planet.") +quitter = widget.button('Quit', 0.5, 0.5, 0.5, 0.5) +quitter:action('quit') -- 'quit' is looked up in ThingSpcae.commands, and translated into the Lua 'skang.quit()'. +--other.foo = 'stuff' +this.bar = 'things' +this.func(1, 'two') -- cgit v1.1