Panels scrolling, scissors test fix

This commit is contained in:
MihailRis
2023-11-23 13:36:24 +03:00
parent e6c9a38f0c
commit be807535f5
10 changed files with 97 additions and 15 deletions
+7 -6
View File
@@ -83,11 +83,17 @@ shared_ptr<UINode> UINode::getAt(vec2 pos, shared_ptr<UINode> self) {
vec2 UINode::calcCoord() const {
if (parent) {
return coord + parent->calcCoord();
return coord + parent->calcCoord() + parent->contentOffset();
}
return coord;
}
void UINode::scrolled(int value) {
if (parent) {
parent->scrolled(value);
}
}
void UINode::setCoord(vec2 coord) {
this->coord = coord;
}
@@ -100,11 +106,6 @@ void UINode::size(vec2 size) {
if (sizelock)
return;
this->size_ = size;
if (parent) {
sizelock = true;
//parent->refresh();
sizelock = false;
}
}
void UINode::_size(vec2 size) {