From b98dbac4ed2f755ce71bd9be17f26a3f86c1e3cc Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Tue, 4 Jul 2017 15:15:48 -0400 Subject: Lots of changes * client no longer crashes when closed * started work on adding physics types * some bugfixes to core lua api --- src/client/lua_api/load_gui.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/client/lua_api/load_gui.cpp') diff --git a/src/client/lua_api/load_gui.cpp b/src/client/lua_api/load_gui.cpp index 49c40e4..e1a6c99 100644 --- a/src/client/lua_api/load_gui.cpp +++ b/src/client/lua_api/load_gui.cpp @@ -19,6 +19,8 @@ using namespace irr; using namespace gui; using namespace core; +extern IrrlichtDevice* device; + //Things from guiparts.hpp std::map iguielements; IrrlichtDevice* guidevice; @@ -29,15 +31,15 @@ lua_State* tL; int screenwidth(lua_State* L); int screenheight(lua_State* L); -void load_guifuncs(lua_State* L, IrrlichtDevice* d){ +void load_guifuncs(lua_State* L){ tL = L; - guidevice = d; + guidevice = device; gui_elenum = 0; guielements[0] = NULL; - iguibutton_register(L,d); - iguilabel_register(L,d); - iguigeneric_register(L,d); + iguibutton_register(L,device); + iguilabel_register(L,device); + iguigeneric_register(L,device); lua_pop(L, 1); lua_newtable(L); -- cgit v1.2.3-70-g09d2