Fixed world name label behaviour

This commit is contained in:
MihailRis
2024-01-18 20:11:47 +03:00
parent b12d242335
commit 9c110b83d3
4 changed files with 23 additions and 2 deletions
+11
View File
@@ -78,9 +78,20 @@ bool UINode::isInside(glm::vec2 pos) {
}
shared_ptr<UINode> UINode::getAt(vec2 pos, shared_ptr<UINode> self) {
if (!interactive) {
return nullptr;
}
return isInside(pos) ? self : nullptr;
}
bool UINode::isInteractive() const {
return interactive;
}
void UINode::setInteractive(bool flag) {
interactive = flag;
}
vec2 UINode::calcCoord() const {
if (parent) {
return coord + parent->calcCoord() + parent->contentOffset();