add gui.get_active_frame, set_active_frame & update cursor lock behavior

This commit is contained in:
MihailRis 2026-02-06 14:16:30 +03:00
parent 463098aa1e
commit 8468ab184d
11 changed files with 123 additions and 50 deletions

View file

@ -302,10 +302,12 @@ void Engine::startPauseLoop() {
}
void Engine::renderFrame() {
if (input->isCursorLocked() != (gui->getActiveFrame() == nullptr)) {
input->toggleCursor();
}
screen->draw(time.getDelta());
DrawContext ctx(nullptr, *window, nullptr);
gui->renderFrames(ctx, *assets->getStorage());
gui->draw(ctx, *assets->getStorage());
}