aboutsummaryrefslogtreecommitdiff
path: root/src/client/lua_api/gui/iguieditbox.cpp
diff options
context:
space:
mode:
authorAlexander <alex@cogarr.net>2020-06-29 15:29:03 -0400
committerAlexander <alex@cogarr.net>2020-06-29 15:29:03 -0400
commit80789508b9655d25629223b9dcc84b4cfb77ce45 (patch)
tree37e140e532af61c1ca4699c8b6254cf2cb07ed02 /src/client/lua_api/gui/iguieditbox.cpp
parent44a1421c393632978d59c0698a93ae22243b97e9 (diff)
downloadbrokengine-80789508b9655d25629223b9dcc84b4cfb77ce45.tar.gz
brokengine-80789508b9655d25629223b9dcc84b4cfb77ce45.tar.bz2
brokengine-80789508b9655d25629223b9dcc84b4cfb77ce45.zip
Updates for mdoc
Also more tests
Diffstat (limited to 'src/client/lua_api/gui/iguieditbox.cpp')
-rw-r--r--src/client/lua_api/gui/iguieditbox.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/client/lua_api/gui/iguieditbox.cpp b/src/client/lua_api/gui/iguieditbox.cpp
index 7de3f37..409c2fc 100644
--- a/src/client/lua_api/gui/iguieditbox.cpp
+++ b/src/client/lua_api/gui/iguieditbox.cpp
@@ -12,10 +12,6 @@ extern "C" {
#include <shared/util/hashmap.hpp>
#include <shared/lua_api/common.hpp>
-/***
-@module gui
-*/
-
using namespace irr;
using namespace core;
using namespace gui;
@@ -23,11 +19,11 @@ using namespace gui;
extern IrrlichtDevice* device;
/***
-@function neweditbox()
-Creates a new text entry box
+Creates a new text entry box.
+@function gui.neweditbox()
@tparam rect dimensions The rectangle to place the box at. If the box has a parent, it is offset from the upper-left of the parent element.
-@tparam ?iguielement parent The parent element of the edit box
-@tparam ?string default_text The default text to have in the edit box
+@tparam? iguielement parent The parent element of the edit box
+@tparam? string default_text The default text to have in the edit box
@treturn iguieditbox The edit box element
*/
//gui.neweditbox({{sx,sy},{ex,ey}}[,parent][,"default text"])
@@ -73,6 +69,12 @@ static int newiguieditbox(lua_State* L){
return 1;
}
+/***
+Set the edit box to multiline mode.
+Allow / disallow the edit box to accept newlines.
+@function iguieditbox:setmultiline(enable)
+@tparam boolean enable Should the edit box allow newlines?
+*/
//self:setmultiline(bool_enabled)
int set_multiline(lua_State *L){
int should = lua_toboolean(L,-1);