From 6fffbbed46b903223f752faee7bbb870557665c9 Mon Sep 17 00:00:00 2001 From: fschildt Date: Thu, 11 Dec 2025 02:26:56 +0100 Subject: refactor Game.hpp, add unfinished pong --- src/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/main.cpp') 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); -- cgit v1.2.3