mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
fix ingame chat size
This commit is contained in:
parent
0db778b4c2
commit
7b90fa15db
2 changed files with 5 additions and 3 deletions
|
|
@ -300,11 +300,13 @@ const std::string& UINode::getId() const {
|
|||
|
||||
void UINode::reposition() {
|
||||
if (sizefunc) {
|
||||
auto newSize = sizefunc();
|
||||
auto defsize = newSize;
|
||||
glm::ivec2 newSize = sizefunc();
|
||||
glm::ivec2 defsize = newSize;
|
||||
if (parent) {
|
||||
defsize = parent->getSize();
|
||||
}
|
||||
newSize.x = newSize.x == 0 ? size.x : newSize.x;
|
||||
newSize.y = newSize.y == 0 ? size.y : newSize.y;
|
||||
setSize(
|
||||
{newSize.x < 0 ? defsize.x + (newSize.x + 1) : newSize.x,
|
||||
newSize.y < 0 ? defsize.y + (newSize.y + 1) : newSize.y}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue