add in-game chat & update gui post-runnables timing & fix panel elements removal

This commit is contained in:
MihailRis
2025-01-18 07:17:52 +03:00
parent 731c72da7c
commit c6951e0965
11 changed files with 100 additions and 7 deletions
+8 -6
View File
@@ -178,12 +178,6 @@ void GUI::actFocused() {
}
void GUI::act(float delta, const Viewport& vp) {
while (!postRunnables.empty()) {
runnable callback = postRunnables.back();
postRunnables.pop();
callback();
}
container->setSize(vp.size());
container->act(delta);
auto prevfocus = focus;
@@ -206,6 +200,14 @@ void GUI::act(float delta, const Viewport& vp) {
}
}
void GUI::postAct() {
while (!postRunnables.empty()) {
runnable callback = postRunnables.back();
postRunnables.pop();
callback();
}
}
void GUI::draw(const DrawContext& pctx, const Assets& assets) {
auto ctx = pctx.sub(batch2D.get());