mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
misc hud-related updates
This commit is contained in:
parent
1f3d1e2640
commit
11bb9e5926
23 changed files with 400 additions and 165 deletions
|
|
@ -115,6 +115,7 @@ void Container::addBack(std::shared_ptr<UINode> node) {
|
|||
void Container::add(std::shared_ptr<UINode> node) {
|
||||
nodes.push_back(node);
|
||||
node->setParent(this);
|
||||
node->reposition();
|
||||
refresh();
|
||||
}
|
||||
|
||||
|
|
@ -138,8 +139,15 @@ void Container::listenInterval(float interval, ontimeout callback, int repeat) {
|
|||
}
|
||||
|
||||
void Container::setSize(glm::vec2 size) {
|
||||
if (size == getSize()) {
|
||||
refresh();
|
||||
return;
|
||||
}
|
||||
UINode::setSize(size);
|
||||
refresh();
|
||||
for (auto& node : nodes) {
|
||||
node->reposition();
|
||||
}
|
||||
}
|
||||
|
||||
void Container::refresh() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue