From ed58795eaf03bdee0b1fae8d05ce5b86d17549f7 Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Sat, 30 Jun 2018 16:15:05 -0600 Subject: Warning-less build All compile warning for -Wall have been fixed --- src/client/lua_api/gui/iguiwindow.cpp | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'src/client/lua_api/gui/iguiwindow.cpp') 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; } -- cgit v1.2.3-70-g09d2