aboutsummaryrefslogtreecommitdiff
path: root/src/client/lua_api/load_gui.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/load_gui.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/load_gui.cpp')
-rw-r--r--src/client/lua_api/load_gui.cpp47
1 files changed, 25 insertions, 22 deletions
diff --git a/src/client/lua_api/load_gui.cpp b/src/client/lua_api/load_gui.cpp
index c90c8f5..598f842 100644
--- a/src/client/lua_api/load_gui.cpp
+++ b/src/client/lua_api/load_gui.cpp
@@ -27,38 +27,41 @@ extern IrrlichtDevice* device;
//Things from guiparts.hpp
std::map<irr::gui::IGUIElement*,int> iguielements;
IrrlichtDevice* guidevice;
-long gui_elenum;
-std::vector<irr::gui::IGUIElement*> guielements(1);
+//long gui_elenum;
+//std::vector<irr::gui::IGUIElement*> guielements(1);
lua_State* tL;
int screenwidth(lua_State* L);
int screenheight(lua_State* L);
void load_guifuncs(lua_State* L){
- tL = L;
- guidevice = device;
- gui_elenum = 0;
- guielements[0] = NULL;
+ printf("Started loading gui...\n");
+ tL = L;
+ guidevice = device;
+ //gui_elenum = 0;
+ //guielements[0] = NULL;
- iguilabel_register(L,device);
- lua_pop(L, 1);
-
- //Various enums
- register_skin(L);
+ //Various enums
+ register_skin(L);
- lua_newtable(L);
- lua_setglobal(L,"gui");
- iguicheckbox_register(L);
- iguiwindow_register(L,device);
- iguiimage_register(L);
- iguibutton_register(L);
-
- lua_pushcfunction(L,screenwidth);
- lua_setglobal(L,"scrw");
+ lua_newtable(L);
+ lua_setglobal(L,"gui");
+ //printf("Registering label...\n");
+ iguilabel_register(L);
+ //printf("Registering checkbox...\n");
+ iguicheckbox_register(L);
+ //printf("Registering window...\n");
+ iguiwindow_register(L,device);
+ //printf("Registering guiimage\n");
+ iguiimage_register(L);
+ //printf("Registering button\n");
+ iguibutton_register(L);
- lua_pushcfunction(L,screenheight);
- lua_setglobal(L,"scrh");
+ lua_pushcfunction(L,screenwidth);
+ lua_setglobal(L,"scrw");
+ lua_pushcfunction(L,screenheight);
+ lua_setglobal(L,"scrh");
}