diff options
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/main.cpp b/src/main.cpp index 8129c68..c830443 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -21,10 +21,12 @@ Game::GameType DrawGameMenu() { Game::GameType type = Game::no_game; - - //ImGuiWindowFlags flags = ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove; ImGuiWindowFlags flags = 0; + ImVec2 pos = {100, 200}; + ImGui::SetNextWindowPos(pos); + + ImGui::Begin("Game Selection", nullptr, flags); if (ImGui::Button("Tetris")) { type = Game::tetris; @@ -38,11 +40,6 @@ DrawGameMenu() ImGui::End(); - Color clear_color = {0.4f, 0.4f, 0.4f, 1.0f}; - g_renderer.SetCameraSize(4.0f, 3.0f); - g_renderer.Clear(clear_color); - - return type; } @@ -175,6 +172,8 @@ main(int argc, char** argv) int w, h; SDL_GetWindowSize(window, &w, &h); g_renderer.SetScreenSize(w, h); + g_renderer.SetClearColor({0.3f, 0.3f, 0.3f}); + g_renderer.SetCameraSize(4.0f, 3.0f); if (game) { |
