diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2018-03-27 22:42:57 -0400 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2018-03-27 22:42:57 -0400 |
| commit | 6cf098e3450ba99c238cf0499c6cecaa246f4d50 (patch) | |
| tree | 175b84e32a3cf24f3fb7356825827f6611bab1ed /src/client/lua_api/gui/iguiwindow.cpp | |
| parent | 2831e232b886c5e3b0791ea5192f9e5194e6abf3 (diff) | |
| download | brokengine-6cf098e3450ba99c238cf0499c6cecaa246f4d50.tar.gz brokengine-6cf098e3450ba99c238cf0499c6cecaa246f4d50.tar.bz2 brokengine-6cf098e3450ba99c238cf0499c6cecaa246f4d50.zip | |
Fixed the procedural textures
Procedural textures are now completely working.
Diffstat (limited to 'src/client/lua_api/gui/iguiwindow.cpp')
| -rw-r--r-- | src/client/lua_api/gui/iguiwindow.cpp | 31 |
1 files changed, 6 insertions, 25 deletions
diff --git a/src/client/lua_api/gui/iguiwindow.cpp b/src/client/lua_api/gui/iguiwindow.cpp index 038c9f7..9a42dff 100644 --- a/src/client/lua_api/gui/iguiwindow.cpp +++ b/src/client/lua_api/gui/iguiwindow.cpp @@ -59,9 +59,12 @@ static bool iguiwindowevent(irr::SEvent e){ return false; } -//new({posx,posy},{width,height}[,"title"][,parent]) +//new({width,height},{posx,posy},"title"[,parent]) static int newiguiwindow(lua_State* L){ printf("Creating window\n"); + + int numargs = lua_gettop(L); + int parentid = lua_tointeger(L,-1); lua_pop(L,1); @@ -97,15 +100,11 @@ static int newiguiwindow(lua_State* L){ return 1; } -static const luaL_reg iguiwindow_f[] = { - {"new", newiguiwindow}, - {0,0}, -}; - static const luaL_reg iguiwindow_m[] = { {"move", moveiguielement}, {"settext", setiguitext}, {"remove", removeiguielement}, + {"getid", guigetid}, {0, 0}, }; @@ -116,27 +115,9 @@ int iguiwindow_register(lua_State* L, IrrlichtDevice* d){ lua_pop(L,1);// lua_getglobal(L,"gui"); - lua_pushstring(L,"newwindow"); lua_pushcfunction(L,newiguiwindow); - lua_settable(L,-3); + lua_setfield(L,-2,"newwindow"); lua_pop(L,1); return 0; - //luaL_newmetatable(L, "gui.iguiwindow"); - - //luaL_register(L,"iguiwindow",iguiwindow_f); - - //lua_pushstring(L,"__index"); - //lua_pushstring(L,"gethandeler"); - //lua_gettable(L,-3); - //lua_settable(L,-4); - - //lua_pushstring(L,"__newindex"); - //lua_pushstring(L,"sethandeler"); - //lua_gettable(L,-3); - //lua_settable(L,-4); - - //luaL_register(L, NULL, iguiwindow_m); - - //return 1; } |
