diff options
Diffstat (limited to '')
-rw-r--r-- | ClientHamr/GuiLua/skang.lua | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/ClientHamr/GuiLua/skang.lua b/ClientHamr/GuiLua/skang.lua index e738a50..dec8983 100644 --- a/ClientHamr/GuiLua/skang.lua +++ b/ClientHamr/GuiLua/skang.lua | |||
@@ -1,7 +1,7 @@ | |||
1 | --[[ TODO - This should be in C, but so far development has been quite rapid doing it in Lua. | 1 | --[[ TODO - This should be in C, but so far development has been quite rapid doing it in Lua. |
2 | |||
2 | C will let us - | 3 | C will let us - |
3 | Actually do the widget stuff. | 4 | Actually do the widget stuff. |
4 | Use Ecore's main loop. | ||
5 | Slap meta tables on all value types. | 5 | Slap meta tables on all value types. |
6 | Which lets us put the meta table on the variable, instead of on the table, which I think is cleaner. | 6 | Which lets us put the meta table on the variable, instead of on the table, which I think is cleaner. |
7 | Figure out the directory separator. | 7 | Figure out the directory separator. |
@@ -907,6 +907,9 @@ copy = function (parent, name) | |||
907 | return result | 907 | return result |
908 | end | 908 | end |
909 | 909 | ||
910 | module = function (name) | ||
911 | return require(name) | ||
912 | end | ||
910 | 913 | ||
911 | stuff = function (aThingy, aStuff) | 914 | stuff = function (aThingy, aStuff) |
912 | return getmetatable(aThingy).__self.stuff[aStuff] | 915 | return getmetatable(aThingy).__self.stuff[aStuff] |
@@ -954,11 +957,11 @@ set = function (stuff, key, name, value) | |||
954 | end | 957 | end |
955 | end | 958 | end |
956 | 959 | ||
960 | thingasm('module,l', 'Load a module.', module, 'file') | ||
957 | thingasm('get', 'Get the current value of an existing Thing or metadata.', get, 'thing,key,name') | 961 | thingasm('get', 'Get the current value of an existing Thing or metadata.', get, 'thing,key,name') |
958 | thingasm('reset', 'Reset the current value of an existing Thing or metadata.', reset, 'thing,key,name') | 962 | thingasm('reset', 'Reset the current value of an existing Thing or metadata.', reset, 'thing,key,name') |
959 | thingasm('set', 'Set the current value of an existing Thing or metadata.', set, 'thing,key,name,data') | 963 | thingasm('set', 'Set the current value of an existing Thing or metadata.', set, 'thing,key,name,data') |
960 | 964 | ||
961 | |||
962 | thingasm('nada', 'Do nothing.', function () --[[ This function intentionally left blank. ]] end) | 965 | thingasm('nada', 'Do nothing.', function () --[[ This function intentionally left blank. ]] end) |
963 | 966 | ||
964 | 967 | ||
@@ -968,10 +971,6 @@ end | |||
968 | window = function (width, height, title) | 971 | window = function (width, height, title) |
969 | end | 972 | end |
970 | 973 | ||
971 | module = function (name) | ||
972 | return require(name) | ||
973 | end | ||
974 | |||
975 | skang = function (name) | 974 | skang = function (name) |
976 | end | 975 | end |
977 | quit = function () | 976 | quit = function () |
@@ -979,7 +978,6 @@ end | |||
979 | 978 | ||
980 | thingasm('clear', 'The current skin is cleared of all widgets.', clear) | 979 | thingasm('clear', 'The current skin is cleared of all widgets.', clear) |
981 | thingasm{'window', 'The size and title of the application Frame.', window, 'x,y,name', acl='GGG'} | 980 | thingasm{'window', 'The size and title of the application Frame.', window, 'x,y,name', acl='GGG'} |
982 | thingasm('module,l', 'Load a module.', module, 'file') | ||
983 | thingasm('skang', 'Parse the contents of a skang file or URL.', skang, 'URL') | 981 | thingasm('skang', 'Parse the contents of a skang file or URL.', skang, 'URL') |
984 | thingasm('quit', 'Quit, exit, remove thyself.', quit) | 982 | thingasm('quit', 'Quit, exit, remove thyself.', quit) |
985 | 983 | ||