From dd009ccdfd62f9153dbc72f5f5de5d5f72979690 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Tue, 22 Apr 2014 15:13:38 +1000 Subject: Move all source into the new src directory, and shuffle a few other things around. --- src/GuiLua/test.skang | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/GuiLua/test.skang (limited to 'src/GuiLua/test.skang') 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 @@ +#!/usr/bin/env skang -l test -- Lua allows this shell hack. + +-- There's an implied local skang = require 'skang' +-- There's an implied local test = require 'test' + +-- This is a bit more verbose than I wanted. lol +local win = skang.window(500, 500, "G'day planet.", 'testWindow') +skang.thingasm{win, 'quitter', 'Quits the skang window', types = 'widget', widget='"button", "Quit", 10, 10, 100, 30'} +win.W.quitter.action = 'skang.quit()' -- TODO Should look it up in ThingSpace.commands, and translate 'quit' into the Lua 'skang.quit()'? + +skang.thingasm{win, 'ffuncer', 'Calls ffunc', types = 'widget', widget='"button", "ffunc()", 10, 40, 100, 30', action='test.ffunc(3, 4)'} + +test.bar = 'things' +test.ffunc(1, 'two') -- cgit v1.1