Merge branch 'master' into docking

# Conflicts:
#	backends/imgui_impl_opengl3.cpp
#	backends/imgui_impl_osx.h
#	backends/imgui_impl_osx.mm
#	imgui.cpp
This commit is contained in:
ocornut
2021-12-15 12:10:03 +01:00
17 changed files with 398 additions and 166 deletions

View File

@ -3418,11 +3418,26 @@ static void ShowDemoWindowPopups()
}
// Call the more complete ShowExampleMenuFile which we use in various places of this demo
if (ImGui::Button("File Menu.."))
if (ImGui::Button("With a menu.."))
ImGui::OpenPopup("my_file_popup");
if (ImGui::BeginPopup("my_file_popup"))
if (ImGui::BeginPopup("my_file_popup", ImGuiWindowFlags_MenuBar))
{
ShowExampleMenuFile();
if (ImGui::BeginMenuBar())
{
if (ImGui::BeginMenu("File"))
{
ShowExampleMenuFile();
ImGui::EndMenu();
}
if (ImGui::BeginMenu("Edit"))
{
ImGui::MenuItem("Dummy");
ImGui::EndMenu();
}
ImGui::EndMenuBar();
}
ImGui::Text("Hello from popup!");
ImGui::Button("This is a dummy button..");
ImGui::EndPopup();
}