Add capture IO flags to UI, for better input handling

This commit is contained in:
2024-01-07 14:18:53 +01:00
parent b8b36d9cb7
commit 5f4bb3316c
3 changed files with 57 additions and 4 deletions

View File

@@ -296,6 +296,10 @@ void update(float dt, void *userData) {
BZ_ASSERT(game->stackAlloc.allocated == 0);
bzStackAllocReset(&game->stackAlloc);
ImGuiIO *io = igGetIO();
bzUISetCaptureMouse(UI, !io->WantCaptureMouse);
bzUISetCaptureKeyboard(UI, !io->WantCaptureKeyboard);
updateInputState(input, game->camera, dt);
switch (game->screen) {