diff --git a/example/color_node_editor.cpp b/example/color_node_editor.cpp index 549bd81..13b06a2 100644 --- a/example/color_node_editor.cpp +++ b/example/color_node_editor.cpp @@ -130,6 +130,7 @@ class ColorNodeEditor void show() { + static bool first_show = true; // Update timer context current_time_seconds = 0.001f * SDL_GetTicks(); @@ -640,6 +641,10 @@ class ColorNodeEditor } } + if (first_show) + { + ImGui::Dummy(ImVec2(500, 500)); + } ImGui::End(); // The color output window @@ -647,7 +652,13 @@ class ColorNodeEditor const ImU32 color = root_node_id_ != -1 ? evaluate(graph_, root_node_id_) : IM_COL32(255, 20, 147, 255); ImGui::PushStyleColor(ImGuiCol_WindowBg, color); + ImGui::SetNextWindowPos(ImVec2(600, 60), ImGuiCond_FirstUseEver); ImGui::Begin("output color"); + if (first_show) + { + ImGui::Dummy(ImVec2(150, 150)); + first_show = false; + } ImGui::End(); ImGui::PopStyleColor(); } diff --git a/example/hello.cpp b/example/hello.cpp index 7a8619b..d321999 100644 --- a/example/hello.cpp +++ b/example/hello.cpp @@ -31,7 +31,12 @@ class HelloWorldNodeEditor ImNodes::EndNode(); ImNodes::EndNodeEditor(); - + static bool first_show = true; + if (first_show) + { + ImGui::Dummy(ImVec2(500, 500)); + first_show = false; + } ImGui::End(); } }; diff --git a/example/multi_editor.cpp b/example/multi_editor.cpp index cb9fb1d..ed25aa9 100644 --- a/example/multi_editor.cpp +++ b/example/multi_editor.cpp @@ -30,6 +30,7 @@ struct Editor std::vector nodes; std::vector links; int current_id = 0; + bool first_show = true; }; void show_editor(const char* editor_name, Editor& editor) @@ -106,6 +107,11 @@ void show_editor(const char* editor_name, Editor& editor) } } + if (editor.first_show) + { + ImGui::Dummy(ImVec2(300, 300)); + editor.first_show = false; + } ImGui::End(); } @@ -130,6 +136,7 @@ void NodeEditorInitialize() void NodeEditorShow() { show_editor("editor1", editor1); + ImGui::SetNextWindowPos(ImVec2(400, 60), ImGuiCond_FirstUseEver); show_editor("editor2", editor2); } diff --git a/example/save_load.cpp b/example/save_load.cpp index 01f3293..e1eb4df 100644 --- a/example/save_load.cpp +++ b/example/save_load.cpp @@ -110,6 +110,12 @@ class SaveLoadEditor } } + static bool first_show = true; + if (first_show) + { + ImGui::Dummy(ImVec2(600, 500)); + first_show = false; + } ImGui::End(); }