diff options
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} |
