aboutsummaryrefslogtreecommitdiff
path: root/src/client/lua_api
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/lua_api')
-rw-r--r--src/client/lua_api/gui/iguielement.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/client/lua_api/gui/iguielement.cpp b/src/client/lua_api/gui/iguielement.cpp
index bf83230..a777c44 100644
--- a/src/client/lua_api/gui/iguielement.cpp
+++ b/src/client/lua_api/gui/iguielement.cpp
@@ -262,6 +262,17 @@ int sendtoback(lua_State *L){
return 0;
}
+//{iguielement},{v2 w,h}
+int setminsize(lua_State *L){
+ long x,y;
+ popvector2i(L,&x,&y); //{element}
+ lua_getfield(L,-1,"guielement");
+ IGUIElement *ele = (IGUIElement*)lua_touserdata(L,-1);
+ lua_pop(L,2);
+ ele->setMinSize(dimension2du(x,y));
+ return 0;
+}
+
class guicallback{
private:
int luaitem;
@@ -318,5 +329,6 @@ extern const luaL_Reg iguielement_m[] = {
{"enable", setelementenabled},
{"sendfront", sendtofront},
{"sendback", sendtoback},
+ {"setminsize", setminsize},
{NULL, NULL}
};