aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorfschildt <florian.schildt@protonmail.com>2025-12-11 02:26:56 +0100
committerfschildt <florian.schildt@protonmail.com>2025-12-11 02:56:04 +0100
commit6fffbbed46b903223f752faee7bbb870557665c9 (patch)
tree11c52ccd5fc3a6e3bae142052fa54c49bc6ba853 /src/main.cpp
parent69f46d34e9c6a25c63668423fd984d07c1f099a3 (diff)
refactor Game.hpp, add unfinished pong
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 6fb241e..677b01f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -37,6 +37,9 @@ DrawGameMenu()
if (ImGui::Button("Snake")) {
type = Game::snake;
}
+ if (ImGui::Button("Pong")) {
+ type = Game::pong;
+ }
ImGui::End();
return type;
@@ -151,6 +154,7 @@ main(int argc, char** argv)
SDL_Event event;
while (cur_game_events < max_game_events && SDL_PollEvent(&event)) {
if (event.type == SDL_EVENT_KEY_DOWN ||
+ event.type == SDL_EVENT_KEY_UP ||
event.type == SDL_EVENT_MOUSE_BUTTON_DOWN)
{
game_events.emplace_back(event);