From 2073fbca6ae3fb1f202df32d4f14771f8866660d Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Fri, 16 May 2014 19:00:15 +1000 Subject: Put module name in winFang and winFang in Widget, plus related tweakage and use. --- src/GuiLua/GuiLua.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/GuiLua') 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) winFang *win = NULL; winFang *parent = NULL; EPhysics_World *world = NULL; + char *module = NULL; char *name = "GuiLua"; char *title = "GuiLua test harness"; int w = WIDTH, h = HEIGHT; GuiLua *gl; - pull_lua(L, 1, "%w %h $title $name", &w, &h, &title, &name); + pull_lua(L, 1, "$module %w %h $title $name", &module, &w, &h, &title, &name); lua_getfield(L, LUA_REGISTRYINDEX, glName); gl = lua_touserdata(L, -1); @@ -250,6 +251,7 @@ static int window(lua_State *L) } win = winFangAdd(parent, 25, 55, w, h, title, name, world); + win->module = module; if (gl) { // If there's no parent, we become the parent. @@ -347,7 +349,7 @@ printf("**********************require GuiLua\n"); // Define our functions. //thingasm{'window', 'The size and title of the application Frame.', window, 'x,y,name', acl='GGG'} - push_lua(L, "@ ( { = $ $ & $ $acl } )", skang, THINGASM, skang, "Cwindow", "Opens our window.", window, "number,number,string", "GGG", 0); + push_lua(L, "@ ( { = $ $ & $ $acl } )", skang, THINGASM, skang, "Cwindow", "Opens our window.", window, "string,number,number,string", "GGG", 0); push_lua(L, "@ ( = $ $ & )", skang, THINGASM, skang, "clear", "The current skin is cleared of all widgets.", clear, 0); PD("GuiLua 2"); // TODO - This one crashes sometimes. Figure out why later. -- cgit v1.1