#include "render/gui/FrameMenu.h" #include "render/gui/imgui/imgui.h" #include "game/client/Client.h" #include namespace td { namespace gui { FrameMenu::FrameMenu(client::Client* client) : GuiWidget(client), m_VSync(true), m_IsometricView(true), m_ShowDemoWindow(false) { } void FrameMenu::Render() { ImGui::Begin("FPS Counter"); ImGui::Text("FPS : %i", (int)ImGui::GetIO().Framerate); if (ImGui::Checkbox("V-Sync", &m_VSync)) { SDL_GL_SetSwapInterval(m_VSync); } if (ImGui::Checkbox("Vue Isometrique ?", &m_IsometricView)) { GetClient()->GetRenderer()->SetIsometricView(m_IsometricView); } #if !defined(NDEBUG) ImGui::Checkbox("Demo Window", &m_ShowDemoWindow); #endif ImGui::End(); #if !defined(NDEBUG) if (m_ShowDemoWindow) ImGui::ShowDemoWindow(&m_ShowDemoWindow); #endif } } // namespace gui } // namespace td