aboutsummaryrefslogtreecommitdiff
path: root/src/client/lua_api/gui/iguicheckbox.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/iguicheckbox.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/iguicheckbox.cpp')
-rw-r--r--src/client/lua_api/gui/iguicheckbox.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/client/lua_api/gui/iguicheckbox.cpp b/src/client/lua_api/gui/iguicheckbox.cpp
index 6413883..365b75d 100644
--- a/src/client/lua_api/gui/iguicheckbox.cpp
+++ b/src/client/lua_api/gui/iguicheckbox.cpp
@@ -8,9 +8,6 @@ extern "C" {
#include "iguielement.hpp"
#include <shared/lua_api/common.hpp>
-/***
-@module gui
-*/
using namespace irr;
using namespace gui;
using namespace core;
@@ -26,11 +23,11 @@ following fields, which they will call for callbacks:
It may additionally call any @{iguielement} callbacks
-@function newcheckbox()
+@function gui.newcheckbox()
@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 string default_text The default text to have in the edit box
-@tparam ?iguielement parent The parent element of the edit box
+@tparam? iguielement parent The parent element of the edit box
@treturn iguieditbox The edit box element
*/
//new({startx,starty},{endx,endy},"checkbox_name"[,ud_parent])
@@ -59,6 +56,11 @@ int newiguicheckbox(lua_State* L){
return 1;
}
+/***
+Is the checkbox checked.
+@function iguicheckbox:ischecked()
+@treturn boolean Is this checkbox checked?
+*/
//ischecked(self)
int ischecked(lua_State *L){
lua_getfield(L,-1,"guielement");
@@ -69,6 +71,11 @@ int ischecked(lua_State *L){
return 1;
}
+/***
+Set the state of the checkbox.
+@function iguicheckbox:setchecked(set)
+@tparam boolean set Should this checkbox be checked? (false to uncheck)
+*/
//setchecked(self, checked)
int setchecked(lua_State *L){
int should = lua_toboolean(L,-1);