From cae19b3363ef2c2825fce08684ae0bea5f1c37ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Kurucz?= Date: Thu, 14 May 2020 23:39:25 +0200 Subject: [PATCH] Added virtual HandleEvent to SDLApp for ease in case it's needed (imgui binding for example handles all events like this. Removed duplicated Quit event type handling. --- BeefLibs/SDL2/src/SDLApp.bf | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/BeefLibs/SDL2/src/SDLApp.bf b/BeefLibs/SDL2/src/SDLApp.bf index c4da5827..922a0fb8 100644 --- a/BeefLibs/SDL2/src/SDLApp.bf +++ b/BeefLibs/SDL2/src/SDLApp.bf @@ -166,6 +166,11 @@ namespace SDL2 } + public virtual void HandleEvent(SDL.Event evt) + { + + } + public void Draw(Image image, float x, float y) { SDL.Rect srcRect = .(0, 0, image.mSurface.w, image.mSurface.h); @@ -226,8 +231,7 @@ namespace SDL2 default: } - if (event.type == .Quit) - return; + HandleEvent(event); waitTime = 0; }