diff options
| author | Alexander Pickering <alex@cogarr.net> | 2018-08-12 15:03:08 -0400 |
|---|---|---|
| committer | Alexander Pickering <alex@cogarr.net> | 2018-08-12 15:03:08 -0400 |
| commit | d169407dbc6d54ed4eb0bee06c6169b6ea40761d (patch) | |
| tree | 859d9009286852ba68824af64dbda7cdadf15adc /src/client/lua_api/gui/iguibutton.cpp | |
| parent | 57a195bb6bcdcee16824a669270946ff284f629b (diff) | |
| download | brokengine-d169407dbc6d54ed4eb0bee06c6169b6ea40761d.tar.gz brokengine-d169407dbc6d54ed4eb0bee06c6169b6ea40761d.tar.bz2 brokengine-d169407dbc6d54ed4eb0bee06c6169b6ea40761d.zip | |
Changed files to use the common iguielement registry
Files now use the registry defined in iguielement, so they are
all in sync.
Diffstat (limited to 'src/client/lua_api/gui/iguibutton.cpp')
| -rw-r--r-- | src/client/lua_api/gui/iguibutton.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/client/lua_api/gui/iguibutton.cpp b/src/client/lua_api/gui/iguibutton.cpp index 0e16ef6..5da3773 100644 --- a/src/client/lua_api/gui/iguibutton.cpp +++ b/src/client/lua_api/gui/iguibutton.cpp @@ -17,6 +17,9 @@ extern "C" { #include <shared/util/hashmap.hpp> #include <shared/lua_api/common.hpp> +/*** +@module gui +*/ using namespace irr; using namespace core; using namespace gui; @@ -24,6 +27,15 @@ using namespace gui; extern IrrlichtDevice* device; char lhashkey[20]; +/*** +@function newbutton() +Creates a new checkbox +@tparam dimensions rect The rectangle to place the button at. If the box has a parent, +it is offset from the upper-left of the parent element. +@tparam parent (iguielement | nil) parent The parent element of the button. +@tparam default_text (string | nil) default_text The default text to have in the button +@treturn iguibutton The button element +*/ //gui.newbutton({{sx,sy},{ex,ey}},"text"[,parent]) static int newiguibutton(lua_State* L){ printf("Createing gui button!\n"); @@ -68,9 +80,6 @@ static const luaL_reg iguibutton_f[] = { }; static const luaL_reg iguibutton_m[] = { - {"move", moveiguielement}, - {"settext", setiguitext}, - {"remove", removeiguielement}, {0,0}, }; @@ -79,6 +88,7 @@ void iguibutton_register(lua_State* L){ luaL_newmetatable(L, "gui.iguibutton");//{m_iguibutton} lua_newtable(L);//{m_iguibutton},{} + luaL_register(L,NULL,iguielement_m); luaL_register(L,NULL,iguibutton_m);//{m_iguibutton},{} lua_setfield(L,-2,"__index");//{m_iguibutton} |
