aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ClientHamr/GuiLua/skang.lua
diff options
context:
space:
mode:
authorDavid Walter Seikel2014-03-28 03:21:49 +1000
committerDavid Walter Seikel2014-03-28 03:21:49 +1000
commit6a5f111adfd8c9663dc90bdcc9412c3db778817f (patch)
tree96227f8a35e9829cb7a6192ccfcc6f84827a8ece /ClientHamr/GuiLua/skang.lua
parentRewrite skang.thing() to allow positional and named arguments, allow changing... (diff)
downloadSledjHamr-6a5f111adfd8c9663dc90bdcc9412c3db778817f.zip
SledjHamr-6a5f111adfd8c9663dc90bdcc9412c3db778817f.tar.gz
SledjHamr-6a5f111adfd8c9663dc90bdcc9412c3db778817f.tar.bz2
SledjHamr-6a5f111adfd8c9663dc90bdcc9412c3db778817f.tar.xz
TODO++ - Should use positional and named arguments when we write the widget stuff.
Diffstat (limited to 'ClientHamr/GuiLua/skang.lua')
-rw-r--r--ClientHamr/GuiLua/skang.lua9
1 files changed, 2 insertions, 7 deletions
diff --git a/ClientHamr/GuiLua/skang.lua b/ClientHamr/GuiLua/skang.lua
index b88d293..bd712f2 100644
--- a/ClientHamr/GuiLua/skang.lua
+++ b/ClientHamr/GuiLua/skang.lua
@@ -269,6 +269,8 @@ __newindex could catch a table being assigned - test.foo = {widget = '...', acl=
269 as opposed to - 269 as opposed to -
270 skang.things.foo = {widget='...', acl='...'} 270 skang.things.foo = {widget='...', acl='...'}
271 which blanks out the other stuff. 271 which blanks out the other stuff.
272 Use generic positional / named arguments for widget to, then we can do -
273 widget.button{'Cancel', 0.5, 0.5, 1, 0, look='cancel.edj', colour={1, 2, 3, 4}, action='...'}
272]] 274]]
273 275
274-- Default things values. 276-- Default things values.
@@ -378,13 +380,6 @@ end
378-- end 380-- end
379 381
380 382
381-- skang.thing() stashes the default value into _M['bar'], and the details into things['bar'].
382-- names - a comma seperated list of names, aliasas, and shortcuts. The first one is the official name.
383-- help - help text describing this Thing.
384-- default - the default value. This could be a funcion, making this a command.
385-- types - a comma separated list of types. The first is the type of the Thing itself, the rest are for multi value Things. Or argument types for commands.
386-- widget - default widget command arguments for creating this Thing as a widget.
387-- required - "boolean" to say if this thing is required. TODO - Maybe fold this into types somehow, or acl?
388-- skang.thing() Creates a new Thing, or changes an existing one. 383-- skang.thing() Creates a new Thing, or changes an existing one.
389-- It can be called with positional arguments - (names, help, default, types, widget, required, acl, boss) 384-- It can be called with positional arguments - (names, help, default, types, widget, required, acl, boss)
390-- Or it can be called with a table - {names, help, pattern='...', acl='rwx'} 385-- Or it can be called with a table - {names, help, pattern='...', acl='rwx'}