diff options
author | David Walter Seikel | 2014-05-16 19:00:15 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-05-16 19:00:15 +1000 |
commit | 2073fbca6ae3fb1f202df32d4f14771f8866660d (patch) | |
tree | 68bfd83064ced600210ea52c39ecd2b00f7ec884 /src/GuiLua | |
parent | Stick the connection to the love server in the GuiLua structure, and related ... (diff) | |
download | SledjHamr-2073fbca6ae3fb1f202df32d4f14771f8866660d.zip SledjHamr-2073fbca6ae3fb1f202df32d4f14771f8866660d.tar.gz SledjHamr-2073fbca6ae3fb1f202df32d4f14771f8866660d.tar.bz2 SledjHamr-2073fbca6ae3fb1f202df32d4f14771f8866660d.tar.xz |
Put module name in winFang and winFang in Widget, plus related tweakage and use.
Diffstat (limited to 'src/GuiLua')
-rw-r--r-- | src/GuiLua/GuiLua.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/GuiLua/GuiLua.c b/src/GuiLua/GuiLua.c index f2de1ea..211f4e7 100644 --- a/src/GuiLua/GuiLua.c +++ b/src/GuiLua/GuiLua.c | |||
@@ -233,12 +233,13 @@ static int window(lua_State *L) | |||
233 | winFang *win = NULL; | 233 | winFang *win = NULL; |
234 | winFang *parent = NULL; | 234 | winFang *parent = NULL; |
235 | EPhysics_World *world = NULL; | 235 | EPhysics_World *world = NULL; |
236 | char *module = NULL; | ||
236 | char *name = "GuiLua"; | 237 | char *name = "GuiLua"; |
237 | char *title = "GuiLua test harness"; | 238 | char *title = "GuiLua test harness"; |
238 | int w = WIDTH, h = HEIGHT; | 239 | int w = WIDTH, h = HEIGHT; |
239 | GuiLua *gl; | 240 | GuiLua *gl; |
240 | 241 | ||
241 | pull_lua(L, 1, "%w %h $title $name", &w, &h, &title, &name); | 242 | pull_lua(L, 1, "$module %w %h $title $name", &module, &w, &h, &title, &name); |
242 | 243 | ||
243 | lua_getfield(L, LUA_REGISTRYINDEX, glName); | 244 | lua_getfield(L, LUA_REGISTRYINDEX, glName); |
244 | gl = lua_touserdata(L, -1); | 245 | gl = lua_touserdata(L, -1); |
@@ -250,6 +251,7 @@ static int window(lua_State *L) | |||
250 | } | 251 | } |
251 | 252 | ||
252 | win = winFangAdd(parent, 25, 55, w, h, title, name, world); | 253 | win = winFangAdd(parent, 25, 55, w, h, title, name, world); |
254 | win->module = module; | ||
253 | if (gl) | 255 | if (gl) |
254 | { | 256 | { |
255 | // If there's no parent, we become the parent. | 257 | // If there's no parent, we become the parent. |
@@ -347,7 +349,7 @@ printf("**********************require GuiLua\n"); | |||
347 | 349 | ||
348 | // Define our functions. | 350 | // Define our functions. |
349 | //thingasm{'window', 'The size and title of the application Frame.', window, 'x,y,name', acl='GGG'} | 351 | //thingasm{'window', 'The size and title of the application Frame.', window, 'x,y,name', acl='GGG'} |
350 | push_lua(L, "@ ( { = $ $ & $ $acl } )", skang, THINGASM, skang, "Cwindow", "Opens our window.", window, "number,number,string", "GGG", 0); | 352 | push_lua(L, "@ ( { = $ $ & $ $acl } )", skang, THINGASM, skang, "Cwindow", "Opens our window.", window, "string,number,number,string", "GGG", 0); |
351 | push_lua(L, "@ ( = $ $ & )", skang, THINGASM, skang, "clear", "The current skin is cleared of all widgets.", clear, 0); | 353 | push_lua(L, "@ ( = $ $ & )", skang, THINGASM, skang, "clear", "The current skin is cleared of all widgets.", clear, 0); |
352 | PD("GuiLua 2"); | 354 | PD("GuiLua 2"); |
353 | // TODO - This one crashes sometimes. Figure out why later. | 355 | // TODO - This one crashes sometimes. Figure out why later. |