mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
settings menu update + UINode 'enabled' property
This commit is contained in:
parent
9b843817f8
commit
2380375f3c
15 changed files with 130 additions and 84 deletions
|
|
@ -304,6 +304,9 @@ static int l_gui_getattr(lua_State* L) {
|
|||
} else if (attr == "visible") {
|
||||
lua_pushboolean(L, node->isVisible());
|
||||
return 1;
|
||||
} else if (attr == "enabled") {
|
||||
lua_pushboolean(L, node->isEnabled());
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (getattr(L, dynamic_cast<Container*>(node), attr))
|
||||
|
|
@ -350,6 +353,8 @@ static int l_gui_setattr(lua_State* L) {
|
|||
node->setInteractive(lua_toboolean(L, 4));
|
||||
} else if (attr == "visible") {
|
||||
node->setVisible(lua_toboolean(L, 4));
|
||||
} else if (attr == "enabled") {
|
||||
node->setEnabled(lua_toboolean(L, 4));
|
||||
} else {
|
||||
if (setattr(L, dynamic_cast<Button*>(node), attr))
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue