aboutsummaryrefslogtreecommitdiff
path: root/src/client/lua_api/gui
diff options
context:
space:
mode:
authorAlexander <alex@cogarr.net>2019-07-10 14:23:51 -0400
committerAlexander <alex@cogarr.net>2019-07-10 14:23:51 -0400
commitc9db55cdc2f69c3dc7aefabe0cc828a64e377024 (patch)
treeb6735e6b43660ea77f59654f8dd4ad1339b6f9e3 /src/client/lua_api/gui
parent456ee9baefb343e98dc94678e05335a547786c2a (diff)
parent6539fbff3d4ecd686676f7c0de6672de38023764 (diff)
downloadbrokengine-c9db55cdc2f69c3dc7aefabe0cc828a64e377024.tar.gz
brokengine-c9db55cdc2f69c3dc7aefabe0cc828a64e377024.tar.bz2
brokengine-c9db55cdc2f69c3dc7aefabe0cc828a64e377024.zip
Started work on cross-platform refactor
Started refactoring the code to work on windows and linux
Diffstat (limited to 'src/client/lua_api/gui')
-rw-r--r--src/client/lua_api/gui/simple.cpp55
-rw-r--r--src/client/lua_api/gui/simple.hpp0
2 files changed, 0 insertions, 55 deletions
diff --git a/src/client/lua_api/gui/simple.cpp b/src/client/lua_api/gui/simple.cpp
deleted file mode 100644
index 130240c..0000000
--- a/src/client/lua_api/gui/simple.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-#include <irrlicht.h>
-extern "C" {
- #include <lua.h>
- #include <lauxlib.h>
- #include <lualib.h>
-}
-
-// {{startx, starty},{endx,endy}}
-lua_torecti(lua_State* L, int number, int* sx, int* sy, int* ex, int* ey){
- lua_pushnumber(L,1);// ...,{},...,1
- lua_gettable(L,number);// ...,{{sx,sy},{ex,ey}},...,{sx,sy}
-
- lua_pushnumber(L,1);// ...,{{sx,sy},{ex,ey}},...,{sx,sy},1
- lua_gettable(L,-2);// ...,{{sx,sy},{ex,ey}},...,{sx,sy},sx
- *sx = lua_tonumber(L,-1);// ...,{{sx,sy},{ex,ey}},...,{sx,sy},sx
-
- lua_pop(1);// ...,{{sx,sy},{ex,ey}},...,{sx,sy}
-
- lua_pushnumber(L,2);// ...,{{sx,sy},{ex,ey}},...,{sx,sy},2
- lua_gettable(L,-2);// ...,{{sx,sy},{ex,ey}},...,{sx,sy},sy
- *sy = lua_tonumber(L,-1);
-
- lua_pop(2);// ...,{{sx,sy},{ex,ey}},...
-
-
- lua_pushnumber(L,2);// ...,{{sx,sy},{ex,ey}},...,2
- lua_gettable(L,number);// ...,{{sx,sy},{ex,ey}},...,{ex,ey}
- lua_pushnumber(L,1);// ...,{{sx,sy},{ex,ey}},...,{ex,ey},1
-
- lua_gettable(L,-2);// ...,{{sx,sy},{ex,ey}},...,{ex,ey},ex
- *ex = lua_tonumber(L,-1);// ...,{{sx,sy},{ex,ey}},...,{ex,ey},ex
- lua_pop(L,1);// ...,{{sx,sy},{ex,ey}},...,{ex,ey}
-
- lua_pushnumber(L,2);// ...,{{sx,sy},{ex,ey}},...,{ex,ey},2
- lua_gettable(L,-2);// ...,{{sx,sy},{ex,ey}},...,{ex,ey},ey
- *ey = lua_tonumber(L,-1);// ...,{{sx,sy},{ex,ey}},...,{ex,ey},ey
-
- lua_pop(L,2);// ...,{{sx,sy},{ex,ey}},...
-}
-
-int addIGUIButton(lua_State* L){
- IGUIEnvironment env = lua_touserdata(L,1);
- IGUIElement parent = lua_touserdata(L,2);
- s32 id = lua_tonumber(L,3);
- s32 sx,sy,ex,ey;
- lua_torecti(L,4,&sx,&sy,&ex,&ey);
- core::rect<s32> rect = core::rect<s32>(sx,sy,ex,ey);
- IGUIElement* button = env->addButton(rect,parent,id,
-
-}
-
-void add_gui(lua_State* L){
-
-}
-blah
diff --git a/src/client/lua_api/gui/simple.hpp b/src/client/lua_api/gui/simple.hpp
deleted file mode 100644
index e69de29..0000000
--- a/src/client/lua_api/gui/simple.hpp
+++ /dev/null