feat: expanded template demo logic

This commit is contained in:
Sara Gerretsen 2025-09-04 21:25:10 +02:00
parent 1e0a61eb59
commit 6754c406d3

View file

@ -25,12 +25,31 @@ void loop() {
void draw_scene(sf::RenderTarget &target) {
}
static bool dockspace = true;
void draw_main_menu_bar() {
if (ImGui::BeginMenu("Edit")) {
if (ImGui::MenuItem("Dockspace?")) {
dockspace = !dockspace;
}
ImGui::EndMenu();
}
}
void draw_gui() {
// draw your GUI
if (ImGui::Begin("MyWindow")) {
if (dockspace) {
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();
}
}