diff options
| author | Alexander Pickering <alex@cogarr.net> | 2018-07-31 16:42:13 -0400 |
|---|---|---|
| committer | Alexander Pickering <alex@cogarr.net> | 2018-07-31 16:42:13 -0400 |
| commit | 1d677927e73e2d66591738777f6a1559527dbab2 (patch) | |
| tree | a4a0190ac748191dd863c19440c82e8d4f5aa427 /src/shared/lua_api | |
| parent | 11857adbdce423ca93980c884d3dc94a974f735f (diff) | |
| download | brokengine-1d677927e73e2d66591738777f6a1559527dbab2.tar.gz brokengine-1d677927e73e2d66591738777f6a1559527dbab2.tar.bz2 brokengine-1d677927e73e2d66591738777f6a1559527dbab2.zip | |
Added an editbox
Added bindings to Irrlicht's EditBox gui element.
Diffstat (limited to 'src/shared/lua_api')
| -rw-r--r-- | src/shared/lua_api/common.cpp | 21 | ||||
| -rw-r--r-- | src/shared/lua_api/common.hpp | 1 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/shared/lua_api/common.cpp b/src/shared/lua_api/common.cpp index b190bdb..55f2b23 100644 --- a/src/shared/lua_api/common.cpp +++ b/src/shared/lua_api/common.cpp @@ -37,6 +37,27 @@ void loadLLibs(lua_State* L){ */ } +int pushvector4i(lua_State* L,long a, long b, long c, long d){ + lua_newtable(L);//{} + + lua_pushinteger(L,1);//{},1 + lua_pushinteger(L,a);//{},1,a + lua_settable(L,-3);//{} + + lua_pushinteger(L,2);//{},2 + lua_pushinteger(L,b);//{},2,b + lua_settable(L,-3);//{} + + lua_pushinteger(L,3);//{},3 + lua_pushinteger(L,c);//{},3,c + lua_settable(L,-3);//{} + + lua_pushinteger(L,4);//{},4 + lua_pushinteger(L,d);//{},4,d + lua_settable(L,-3);{} + + return 1; +} int pushvector3i(lua_State* L,long a,long b,long c){ lua_newtable(L);//{} diff --git a/src/shared/lua_api/common.hpp b/src/shared/lua_api/common.hpp index 66da29a..afc9ff9 100644 --- a/src/shared/lua_api/common.hpp +++ b/src/shared/lua_api/common.hpp @@ -7,6 +7,7 @@ extern "C" { void loadLLibs(lua_State*); +int pushvector4i(lua_State*,long,long,long,long); int pushvector3i(lua_State*,long,long,long); int pushvector3d(lua_State*,double,double,double); int pushvector2i(lua_State*,long,long); |
