mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +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
|
|
@ -20,6 +20,18 @@ void UINode::setVisible(bool flag) {
|
|||
visible = flag;
|
||||
}
|
||||
|
||||
void UINode::setEnabled(bool flag) {
|
||||
enabled = flag;
|
||||
if (!flag) {
|
||||
defocus();
|
||||
hover = false;
|
||||
}
|
||||
}
|
||||
|
||||
bool UINode::isEnabled() const {
|
||||
return enabled;
|
||||
}
|
||||
|
||||
Align UINode::getAlign() const {
|
||||
return align;
|
||||
}
|
||||
|
|
@ -82,7 +94,7 @@ bool UINode::isInside(glm::vec2 point) {
|
|||
}
|
||||
|
||||
std::shared_ptr<UINode> UINode::getAt(glm::vec2 point, std::shared_ptr<UINode> self) {
|
||||
if (!interactive) {
|
||||
if (!interactive || !enabled) {
|
||||
return nullptr;
|
||||
}
|
||||
return isInside(point) ? self : nullptr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue