diff options
Diffstat (limited to '')
-rw-r--r-- | ClientHamr/GuiLua/skang.lua | 9 |
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'} |