aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ClientHamr/GuiLua/test.lua
diff options
context:
space:
mode:
Diffstat (limited to 'ClientHamr/GuiLua/test.lua')
-rw-r--r--ClientHamr/GuiLua/test.lua13
1 files changed, 12 insertions, 1 deletions
diff --git a/ClientHamr/GuiLua/test.lua b/ClientHamr/GuiLua/test.lua
index 97adf9d..bc595fe 100644
--- a/ClientHamr/GuiLua/test.lua
+++ b/ClientHamr/GuiLua/test.lua
@@ -30,7 +30,7 @@ print('code')
30-- A variable that is private to this module. 30-- A variable that is private to this module.
31local foo 31local foo
32 32
33skang.thing(_M, 'fooble,f', 'Help text goes here', 1, nil, '"edit", "The fooble:", 1, 1, 10, 50') 33skang.thing(_M, 'fooble,f', 'Help text goes here', 1, 'number', '"edit", "The fooble:", 1, 1, 10, 50', true)
34skang.thing(_M, 'bar', 'Help text', "Default") 34skang.thing(_M, 'bar', 'Help text', "Default")
35 35
36-- We can use inline functions if we don't need the function internally. 36-- We can use inline functions if we don't need the function internally.
@@ -58,3 +58,14 @@ test.fooble = 42
58print('f is now ' .. test.fooble .. ' ' .. test.f) 58print('f is now ' .. test.fooble .. ' ' .. test.f)
59test.fooble = nil 59test.fooble = nil
60print('f is now ' .. test.fooble .. ' ' .. test.f) 60print('f is now ' .. test.fooble .. ' ' .. test.f)
61-- First, disable the default value, so we see "is required" errors.
62skang.things.f.default = nil
63test.fooble = 42
64test.fooble = 'Should fail.'
65test.fooble = 42
66test.fooble = nil
67test.fooble = nil
68test.fooble = 42
69test.fooble = true
70test.f = 42
71test.f = nil