You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On 17 May 2017, at 04:45, JJscott ***@***.***> wrote:
When writing MenuItems in the MainMenuBar, OpenPopup does not trigger the Popup to be open.
Minimum example where the Popup will not open:
if (ImGui::BeginMainMenuBar())
{
if (ImGui::BeginMenu("Test Popup"))
{
if (ImGui::MenuItem("Open Popup"))
{
ImGui::OpenPopup("Some Popup");
}
ImGui::EndMenu();
}
ImGui::EndMainMenuBar();
}
if (ImGui::BeginPopup("Some Popup"))
{
ImGui::Text("Hello World");
ImGui::EndPopup();
}
Minimum example where the Popup will open:
bool open_popup = false;
if (ImGui::BeginMainMenuBar())
{
if (ImGui::BeginMenu("Test Popup"))
{
if (ImGui::MenuItem("Open Popup"))
{
open_popup = true;
}
ImGui::EndMenu();
}
ImGui::EndMainMenuBar();
}
if (open_popup ) ImGui::OpenPopup("Some Popup");
if (ImGui::BeginPopup("Some Popup"))
{
ImGui::Text("Hello World");
ImGui::EndPopup();
}
―
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
When writing MenuItems in the MainMenuBar, OpenPopup does not trigger the Popup to be open.
Minimum example where the Popup will not open:
Minimum example where the Popup will open:
The text was updated successfully, but these errors were encountered: