From fde531e7c44ea917f745a9f800178fbe83fa19b5 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Mon, 22 Nov 2021 19:44:48 -0500 Subject: more refactor; draw samples grid and cursor; gen load fixes --- source/gui.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source/gui.cpp') diff --git a/source/gui.cpp b/source/gui.cpp index 9720442..515d471 100644 --- a/source/gui.cpp +++ b/source/gui.cpp @@ -108,8 +108,10 @@ void guiRender(void (*func)()) SDL_GL_SwapWindow(window); } -void guiHandleEvents(bool& done) +bool guiHandleEvents() { + bool done = false; + for (SDL_Event event; SDL_PollEvent(&event);) { ImGui_ImplSDL2_ProcessEvent(&event); if (event.type == SDL_QUIT) @@ -117,6 +119,8 @@ void guiHandleEvents(bool& done) if (event.type == SDL_WINDOWEVENT && event.window.event == SDL_WINDOWEVENT_CLOSE && event.window.windowID == SDL_GetWindowID(window)) done = true; } + + return done; } void guiShutdown() -- cgit v1.2.3