aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ClientHamr/GuiLua/test.skang
blob: 340bb0887d23bf710c1a9c0b5ce839fd179201dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env skang -l test     -- Lua allows this shell hack.

-- There's an implied local this = require 'test'
-- There's an implied local skang = require 'skang'

-- local other = require 'otherPackageName'

-- 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, 50'}
skang.printTableStart(win.W.quitter, '', 'quitter')
win.W.quitter.action = 1
win.W.quitter.action = 'quit'  -- 'quit' is looked up in ThingSpace.commands, and translated into the Lua 'skang.quit()'.

--other.foo = 'stuff'
this.bar = 'things'
this.ffunc(1, 'two')