How can I change the title of “Debug” window in ofxImGui?I mean for example I want to make that window’s bar name “App” instead of “Debug”, is it possible?
You can use the following to set the initial window properties:
//set window properties static bool no_titlebar = false; static bool no_border = true; static bool no_resize = true; static bool no_move = true; static bool no_scrollbar = false; static bool no_collapse = true; static bool no_menu = true; static bool no_settings = true; static float bg_alpha = -0.01f; // <0: default bool show = true; // Demonstrate the various window flags. // Typically you would just use the default. ImGuiWindowFlags window_flags = 0; if (no_titlebar) window_flags |= ImGuiWindowFlags_NoTitleBar; if (!no_border) window_flags |= ImGuiWindowFlags_ShowBorders; if (no_resize) window_flags |= ImGuiWindowFlags_NoResize; if (no_move) window_flags |= ImGuiWindowFlags_NoMove; if (no_scrollbar) window_flags |= ImGuiWindowFlags_NoScrollbar; if (no_collapse) window_flags |= ImGuiWindowFlags_NoCollapse; if (!no_menu) window_flags |= ImGuiWindowFlags_MenuBar; if (no_settings) window_flags |= ImGuiWindowFlags_NoSavedSettings; ImGui::Begin("My Title", &show, ImVec2(myWidth, myHeight), bg_alpha, window_flags);
Thanks for your answer.My main problem was actually,when I run the app a “Debug” titled window was being created firstly (although I wrote
ImGui::Begin("My title"),) and next to it there would be a “My title” titled window.
Today I discovered that I was either forgetting using
ImGui::End() at the end of
ImGui::Begin(...) ... or I was just writing
ImGui::End without function parantheses.Now I recognized my error and it doesn’t create the “Debug” titled window automatically.
I also tried what you suggested and it is a nice additional information for me, to disable the titlebar,resizing etc… Thanks