mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 03:51:50 +00:00
Panels scrolling, scissors test fix
This commit is contained in:
parent
e6c9a38f0c
commit
be807535f5
10 changed files with 97 additions and 15 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue