feat: expanded template demo logic
This commit is contained in:
parent
1e0a61eb59
commit
6754c406d3
|
|
@ -25,12 +25,31 @@ void loop() {
|
||||||
void draw_scene(sf::RenderTarget &target) {
|
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() {
|
void draw_gui() {
|
||||||
// draw your 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")) {
|
if (ImGui::Button("My Button")) {
|
||||||
std::println("Yipeeee");
|
std::println("Yipeeee");
|
||||||
}
|
}
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
}
|
}
|
||||||
|
if (ImGui::Begin("Second Window :O")) {
|
||||||
|
ImGui::Text("A window with text!");
|
||||||
|
ImGui::End();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue