#include "defs.h" #include #include #include #include #include #include #include void configure(AppConfig &config) { config.window_title = "My Project"; config.frame_rate_limit = std::nullopt; config.vsync = true; } void setup() { ImGui::GetIO().ConfigFlags |= ( ImGuiConfigFlags_NavEnableKeyboard | ImGuiConfigFlags_NavEnableGamepad | ImGuiConfigFlags_DockingEnable ); } void loop(double delta) { } void draw_scene(sf::RenderTarget &target, sf::RenderStates const &states) { static sf::RectangleShape rect{ { 300, 300 } }; sf::RenderStates n_states{states}; n_states.transform.translate({ 20, 20 }); target.draw(rect, n_states); } void draw_main_menu_bar() { if (ImGui::BeginMenu("Edit")) { if (ImGui::MenuItem("Menu item!")) { std::println("Wahooo!!!"); } ImGui::EndMenu(); } } void draw_gui() { // draw your GUI ImGui::DockSpaceOverViewport(0, NULL, ImGuiDockNodeFlags_PassthruCentralNode); if (ImGui::Begin("My Window")) { ImGui::Text("A window with text and a button!!"); if (ImGui::Button("My Button")) { std::println("Yipeeee"); } ImGui::End(); } if (ImGui::Begin("Second Window :O")) { ImGui::Text("A window with text!"); ImGui::End(); } }