diff options
Diffstat (limited to 'src/client/lua_api/gui/iguielement.cpp')
| -rw-r--r-- | src/client/lua_api/gui/iguielement.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/client/lua_api/gui/iguielement.cpp b/src/client/lua_api/gui/iguielement.cpp index fa3d480..5ba998f 100644 --- a/src/client/lua_api/gui/iguielement.cpp +++ b/src/client/lua_api/gui/iguielement.cpp @@ -1,4 +1,9 @@ /*This file defines some things that all igui stuff can do*/ +/*** +@module gui + + +*/ extern "C" { #include <lua.h> #include <lauxlib.h> @@ -15,6 +20,11 @@ using namespace irr; using namespace core; using namespace gui; +/*** +Move a window (by an offset) +@function guielement:move() +@tparam vec2 position The offset to move this element by +*/ //move({element},{x,y}) -> nil int moveiguielement(lua_State* L){ //printf("Got call to move element\n"); @@ -31,6 +41,11 @@ int moveiguielement(lua_State* L){ return 0; } +/*** +Find the rectangle that an element occupies +@function guielement:getabsrect() +@treturn rect The rectangle that this element occupies +*/ //getabsrect({element})-> {{sx,sy},{ex,ey}} int getiguiclippingrect(lua_State* L){ printf("Getting iguiclipping elemnt\n"); @@ -48,6 +63,14 @@ int getiguiclippingrect(lua_State* L){ return 1; } +/*** +Sets the text of the element +This function may do different things to different gui elements. +For example, on a window, it sets the title. +On a button, it sets the button's text. +@function guielement:settext() +@tparam string text The text to set on the element +*/ //setText({guielement},"text") :: nil int setiguitext(lua_State* L){ const char* text = lua_tostring(L, -1); @@ -63,6 +86,10 @@ int setiguitext(lua_State* L){ return 0; } +/*** +Removes a gui element, and any child elements +@function guielement:remove() +*/ //remove({self}) int removeiguielement(lua_State* L){ lua_getfield(L,-1,"guielement"); |
