world convert progress info

This commit is contained in:
MihailRis
2024-03-01 13:26:09 +03:00
parent 3862dbda66
commit 8001a8bf86
17 changed files with 903 additions and 793 deletions
+5 -12
View File
@@ -34,6 +34,11 @@ std::shared_ptr<UINode> Container::getAt(glm::vec2 pos, std::shared_ptr<UINode>
}
void Container::act(float delta) {
for (auto node : nodes) {
if (node->isVisible()) {
node->act(delta);
}
}
for (IntervalEvent& event : intervalEvents) {
event.timer += delta;
if (event.timer > event.interval) {
@@ -50,12 +55,6 @@ void Container::act(float delta) {
return event.repeat == 0;
}
), intervalEvents.end());
for (auto node : nodes) {
if (node->isVisible()) {
node->act(delta);
}
}
}
void Container::scrolled(int value) {
@@ -109,12 +108,6 @@ void Container::drawBackground(const GfxContext* pctx, Assets* assets) {
batch->rect(coord.x, coord.y, size.x, size.y);
}
void Container::addBack(std::shared_ptr<UINode> node) {
nodes.insert(nodes.begin(), node);
node->setParent(this);
refresh();
}
void Container::add(std::shared_ptr<UINode> node) {
nodes.push_back(node);
node->setParent(this);