Closed BrianBeuken closed 1 year ago
Hello, I don't understand the "disable" part of your question, but controlling the "collapsed state" of a window is definitely possible :
static bool bShowWindow = true;
// ImGui::SetNextWindowCollapsed(true, ImGuiCond_Always); // Before opening the window
if(ImGui::Begin("MyWindow", &bShowWindow)){
if(ImGui::Button("HIT ME !")){
ImGui::SetWindowCollapsed(true, ImGuiCond_Always); // Within the same window
}
}
ImGui::End();
Thanks that looks like the missing piece, I'll let you know.
Closing, feel free to re-open to post feedback.
Sorry, this should be clear and I see some people have made suggestions, but don't want to disable the actual |>name tag, so the window can be re-opened or expanded when wanted, I just want to close/fold the window that was opened, but from within the window. I can't seem to find a way to do that?