aboutsummaryrefslogtreecommitdiff
path: root/src/client/lua_api/gui/iguielement.cpp
diff options
context:
space:
mode:
authorAlexander Pickering <alex@cogarr.net>2018-06-30 21:20:51 -0600
committerAlexander Pickering <alex@cogarr.net>2018-06-30 21:20:51 -0600
commit06203d8767e7da55deb4947c7660ff0136a31f29 (patch)
tree91bc57f8b6372d5d585e3bd83b366421d8da8855 /src/client/lua_api/gui/iguielement.cpp
parente2568651c4dc1e42f123b6e8e8c7597ed50fd355 (diff)
downloadbrokengine-06203d8767e7da55deb4947c7660ff0136a31f29.tar.gz
brokengine-06203d8767e7da55deb4947c7660ff0136a31f29.tar.bz2
brokengine-06203d8767e7da55deb4947c7660ff0136a31f29.zip
Removed some dead code
Removed a lot of commented out old code
Diffstat (limited to 'src/client/lua_api/gui/iguielement.cpp')
-rw-r--r--src/client/lua_api/gui/iguielement.cpp71
1 files changed, 0 insertions, 71 deletions
diff --git a/src/client/lua_api/gui/iguielement.cpp b/src/client/lua_api/gui/iguielement.cpp
index bdc13df..0fb25f1 100644
--- a/src/client/lua_api/gui/iguielement.cpp
+++ b/src/client/lua_api/gui/iguielement.cpp
@@ -15,17 +15,6 @@ using namespace irr;
using namespace core;
using namespace gui;
-//static LIGUIElement* toiguielement(lua_State* L,int index){
- //LIGUIElement* ret = (LIGUIElement*)lua_touserdata(L,index);
- //if(ret == NULL)
- //luaL_typerror(L,index,"LIGUIButton");
- //return ret;
-//}
-
-//static LIGUIElement* toiguielement(lua_State* L){
- //return toiguielement(L,1);
-//}
-
//move({element},{x,y}) -> nil
int moveiguielement(lua_State* L){
//printf("Got call to move element\n");
@@ -58,15 +47,6 @@ int getiguiclippingrect(lua_State* L){
);
return 1;
}
-/*
-int moveiguielement(lua_State* L){
- LIGUIElement* ele = toiguielement(L,1);
- int x = luaL_optint(L,2,0);
- int y = luaL_optint(L,3,0);
- ele->e->move(position2d<s32>(x,y));
- return 0;
-}
-*/
//setText({guielement},"text") :: nil
int setiguitext(lua_State* L){
@@ -122,60 +102,9 @@ public:
//{guielement}
//popelementcallback(lua_State* L, gui::EGUI_EVENT_TYPE, char*)
void setelementcallback(lua_State* L,gui::EGUI_EVENT_TYPE et, const char* funcname){
- //lua_getfield(L,-1,"guielement");//{guielement}
- //IGUIElement* el = (IGUIElement*)lua_touserdata(L,-1);//{guielement},ud_element
- //lua_pop(L,1);//{guielement}
registerguielement(L);
- //int ref = luaL_ref(L,LUA_REGISTRYINDEX);//
- //guicallback* gc = new guicallback(L,ref,funcname);//TODO:Clean this up somehow
- //popregisterguicallback(el,et, gc);
- //lua_rawgeti(L,LUA_REGISTRYINDEX,ref);//{guielement}
}
-//int guigethandeler(lua_State* L){
- //printf("Called the get index handeler!\n");
- //LIGUIElement* button = toiguielement(L);
- //if(!lua_isstring(L,2)){
- //luaL_error(L,"index of iguibutton must be of type 'string'");
- //}
- //const char* lstr = lua_tostring(L,2);
- //char* hashkey = (char*)malloc(sizeof(char)*strlen(lstr));
- //strcpy(hashkey,lstr);
- //int ref;
- //if(hashmap_get(button->funcmap,hashkey,(void**)&ref) == MAP_OK){
- ////We found the value in our hashmap!
- //lua_rawgeti(L,LUA_REGISTRYINDEX,ref);
- //return 1;
- //}else{
- ////Could not find in hashmap, check parrent
- //lua_getglobal(L,button->type);
- //printf("Button's type is %s\n",button->type);
- //lua_getfield(L,-1,lstr);
- //return 1;
- //}
-//}
-
-//int guisethandeler(lua_State* L){
- //printf("Called the set index handeler\n");
- //LIGUIElement* button = toiguielement(L);
- //if(!lua_isstring(L,2)){
- //luaL_error(L,"index of iguibutton must be of type 'string'");
- //}
- //const char* lstr = lua_tostring(L,2);
- //char* hashkey = (char*)malloc(sizeof(char)*strlen(lstr));
- //strcpy(hashkey,lstr);
- //int oldref;
- //if(hashmap_get(button->funcmap,hashkey,(void**)&oldref) == MAP_OK){
- //luaL_unref(L,LUA_REGISTRYINDEX,oldref);
- //hashmap_remove(button->funcmap,hashkey);
- //}
- //int ref = luaL_ref(L,LUA_REGISTRYINDEX);
- //if(hashmap_put(button->funcmap,hashkey,(void*)ref) != MAP_OK){
- //luaL_error(L,"Error while setting the hashkey on iguibutton");
- //}
- //return 0;
-//}
-
//ud_iguielement
int guigetid(lua_State* L){
IGUIElement* el = (IGUIElement*)lua_touserdata(L,-1);