diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2018-04-11 19:36:41 -0400 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2018-04-11 19:36:41 -0400 |
| commit | 5fc253ce728c6e078886e092376c2e0f0320ebd9 (patch) | |
| tree | 44a1edc2d3b166a350bf09a84d714ba8e2edf825 /src/client | |
| parent | 14cf4b9ef17b01fa60014505db86fe01166c068f (diff) | |
| download | brokengine-5fc253ce728c6e078886e092376c2e0f0320ebd9.tar.gz brokengine-5fc253ce728c6e078886e092376c2e0f0320ebd9.tar.bz2 brokengine-5fc253ce728c6e078886e092376c2e0f0320ebd9.zip | |
Fixed some warnings in iguiwindow
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/lua_api/gui/iguiwindow.cpp | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/src/client/lua_api/gui/iguiwindow.cpp b/src/client/lua_api/gui/iguiwindow.cpp index 14fba99..f11fbd6 100644 --- a/src/client/lua_api/gui/iguiwindow.cpp +++ b/src/client/lua_api/gui/iguiwindow.cpp @@ -20,44 +20,20 @@ extern "C" { using namespace irr; using namespace gui; -static LIGUIElement* checkiguiwindow(lua_State* L, int index){ - void* ud = luaL_checkudata(L,index,"gui.iguiwindow"); - luaL_argcheck(L,ud != NULL, index, "'gui.iguiwindow' expected"); - return (LIGUIElement*) ud; -} - -static LIGUIElement* checkiguiwindow(lua_State* L){ - return checkiguiwindow(L,1); -} - static bool iguiwindowevent(irr::SEvent e){ - printf("I got a guiwindow event on %p!\n",e.GUIEvent.Caller); int ref = iguielements[e.GUIEvent.Caller]; - printf("Ref for this guielement is:%d\n",ref); lua_rawgeti(tL,LUA_REGISTRYINDEX,ref); lua_getfield(tL,-1,"close"); - int i = lua_isfunction(tL,-1); - printf("Is function: %d\n",i); lua_rawgeti(tL,LUA_REGISTRYINDEX,ref); lua_call(tL,1,1); int shouldclose = lua_toboolean(tL,-1); - printf("Should close: %d\n",shouldclose); return shouldclose == 1; - - return false; -} - -//window:close() -static int iguiwindowclose(lua_State* L){ - IGUIElement* self = (IGUIElement*)lua_touserdata(L,-1); - lua_pop(L,1); } //new({posx,posy},{width,height},"title"[,parent]) static int newiguiwindow(lua_State* L){ - printf("Creating window\n"); IGUIElement* parent = NULL; int numargs = lua_gettop(L); @@ -74,8 +50,6 @@ static int newiguiwindow(lua_State* L){ popvector2i(L,&w,&h); popvector2i(L,&x,&y); - printf("I want to make a frame at (%d,%d) size (%d,%d)\n",x,y,w,h); - //Create the window IGUIEnvironment* env = guidevice->getGUIEnvironment(); IGUIWindow* wi = env->addWindow( |
