From 04655283852b1b332ae9f8610aca20a553b3791f Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 17 Nov 2025 02:23:10 -0700 Subject: Better window focus --- src/game.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/game.c') diff --git a/src/game.c b/src/game.c index 317f96b..4818e79 100644 --- a/src/game.c +++ b/src/game.c @@ -60,8 +60,7 @@ FocusCommand testFloatingWindowCallback(FloatingWindow* window, Game* game) } // Button test. - if (GuiButton((Rectangle){x + 10.0, y + 50.0, 40.0, 20.0}, "A") - && window->hasFocus) + if (GuiButton((Rectangle){x + 10.0, y + 50.0, 40.0, 20.0}, "A")) { puts("hi"); } @@ -255,10 +254,12 @@ void enableGameCursor(Game* game) { game->isCursorEnabled = true; EnableCursor(); + enableWindowManager(&game->wm); } void disableGameCursor(Game* game) { game->isCursorEnabled = false; DisableCursor(); + disableWindowManager(&game->wm); } -- cgit v1.2.3