aboutsummaryrefslogtreecommitdiff
path: root/src/client/lua_api/gui/iguiwindow.cpp
diff options
context:
space:
mode:
authorAlexander Pickering <alex@cogarr.net>2018-06-30 16:15:05 -0600
committerAlexander Pickering <alex@cogarr.net>2018-06-30 16:15:05 -0600
commited58795eaf03bdee0b1fae8d05ce5b86d17549f7 (patch)
tree065092f3e95bf74fdba541f6c5f7504757487d3d /src/client/lua_api/gui/iguiwindow.cpp
parent45e61c74802af739736d33c82f27596b45987eee (diff)
downloadbrokengine-ed58795eaf03bdee0b1fae8d05ce5b86d17549f7.tar.gz
brokengine-ed58795eaf03bdee0b1fae8d05ce5b86d17549f7.tar.bz2
brokengine-ed58795eaf03bdee0b1fae8d05ce5b86d17549f7.zip
Warning-less build
All compile warning for -Wall have been fixed
Diffstat (limited to 'src/client/lua_api/gui/iguiwindow.cpp')
-rw-r--r--src/client/lua_api/gui/iguiwindow.cpp25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/client/lua_api/gui/iguiwindow.cpp b/src/client/lua_api/gui/iguiwindow.cpp
index 705af18..30af486 100644
--- a/src/client/lua_api/gui/iguiwindow.cpp
+++ b/src/client/lua_api/gui/iguiwindow.cpp
@@ -20,17 +20,17 @@ extern "C" {
using namespace irr;
using namespace gui;
-static bool iguiwindowevent(irr::SEvent e){
- int ref = iguielements[e.GUIEvent.Caller];
- lua_rawgeti(tL,LUA_REGISTRYINDEX,ref);
- lua_getfield(tL,-1,"close");
+//static bool iguiwindowevent(irr::SEvent e){
+ //int ref = iguielements[e.GUIEvent.Caller];
+ //lua_rawgeti(tL,LUA_REGISTRYINDEX,ref);
+ //lua_getfield(tL,-1,"close");
- lua_rawgeti(tL,LUA_REGISTRYINDEX,ref);
- lua_call(tL,1,1);
+ //lua_rawgeti(tL,LUA_REGISTRYINDEX,ref);
+ //lua_call(tL,1,1);
- int shouldclose = lua_toboolean(tL,-1);
- return shouldclose == 1;
-}
+ //int shouldclose = lua_toboolean(tL,-1);
+ //return shouldclose == 1;
+//}
//new({{sx,sy},{ex,ey}},"title"[,{guielement=parent}]) :: {guielement}
static int newiguiwindow(lua_State* L){
@@ -68,11 +68,12 @@ static int newiguiwindow(lua_State* L){
luaL_getmetatable(L,"gui.window");//{element=ud_window},{m_gui.window}
lua_setmetatable(L,-2);//{element=ud_window, __meta=gui.window}
- int ref = luaL_ref(L,LUA_REGISTRYINDEX);//ref
- lua_rawgeti(L,LUA_REGISTRYINDEX,ref);//ref,{element=ud_window, __meta=gui.window}
+ int ref = luaL_ref(L,LUA_REGISTRYINDEX);//
+ lua_rawgeti(L,LUA_REGISTRYINDEX,ref);//{element=ud_window, __meta=gui.window}
+ registerguielement(L);
iguielements[wi] = ref;
- registerguicallback(wi,EGET_ELEMENT_CLOSED,iguiwindowevent);
+ //registerguicallback(wi,EGET_ELEMENT_CLOSED,iguiwindowevent);
return 1;
}