mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
add 'edited' read-only textbox property
This commit is contained in:
parent
433c12a17a
commit
93f20b1746
5 changed files with 30 additions and 4 deletions
|
|
@ -294,6 +294,13 @@ static int p_get_editable(UINode* node, lua::State* L) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int p_get_edited(UINode* node, lua::State* L) {
|
||||
if (auto box = dynamic_cast<TextBox*>(node)) {
|
||||
return lua::pushboolean(L, box->isEdited());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int p_get_line_numbers(UINode* node, lua::State* L) {
|
||||
if (auto box = dynamic_cast<TextBox*>(node)) {
|
||||
return lua::pushboolean(L, box->isShowLineNumbers());
|
||||
|
|
@ -451,6 +458,7 @@ static int l_gui_getattr(lua::State* L) {
|
|||
{"caret", p_get_caret},
|
||||
{"text", p_get_text},
|
||||
{"editable", p_get_editable},
|
||||
{"edited", p_get_edited},
|
||||
{"lineNumbers", p_get_line_numbers},
|
||||
{"lineAt", p_get_line_at},
|
||||
{"linePos", p_get_line_pos},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue