fix ingame chat size
This commit is contained in:
parent
0db778b4c2
commit
7b90fa15db
@ -1,5 +1,5 @@
|
||||
<panel size="300,0" margin="0,0,0,70" max-length='300' min-length='0'
|
||||
size-func="gui.get_viewport()[1]/2,-1"
|
||||
size-func="gui.get_viewport()[1]/2,0"
|
||||
padding="0"
|
||||
min-size="0"
|
||||
color="0"
|
||||
|
||||
@ -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…
x
Reference in New Issue
Block a user