1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00

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.
This commit is contained in:
Zoltán Kurucz 2020-05-14 23:39:25 +02:00
parent 71aea8107f
commit cae19b3363

View file

@ -166,6 +166,11 @@ namespace SDL2
} }
public virtual void HandleEvent(SDL.Event evt)
{
}
public void Draw(Image image, float x, float y) public void Draw(Image image, float x, float y)
{ {
SDL.Rect srcRect = .(0, 0, image.mSurface.w, image.mSurface.h); SDL.Rect srcRect = .(0, 0, image.mSurface.w, image.mSurface.h);
@ -226,8 +231,7 @@ namespace SDL2
default: default:
} }
if (event.type == .Quit) HandleEvent(event);
return;
waitTime = 0; waitTime = 0;
} }