mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-23 12:27:01 +00:00
Simplified example
This commit is contained in:
parent
91f8eb7b92
commit
de7552047b
17
imgui.cpp
17
imgui.cpp
@ -9437,18 +9437,15 @@ void ImGui::ShowTestWindow(bool* opened)
|
||||
popup_open = true;
|
||||
ImGui::SameLine();
|
||||
ImGui::Text(selected_fish == -1 ? "<None>" : fishes[selected_fish]);
|
||||
|
||||
if (popup_open)
|
||||
{
|
||||
if (ImGui::BeginPopup(&popup_open))
|
||||
{
|
||||
for (size_t i = 0; i < IM_ARRAYSIZE(fishes); i++)
|
||||
if (ImGui::Selectable(fishes[i], false))
|
||||
{
|
||||
selected_fish = i;
|
||||
popup_open = false;
|
||||
}
|
||||
}
|
||||
ImGui::BeginPopup(&popup_open);
|
||||
for (size_t i = 0; i < IM_ARRAYSIZE(fishes); i++)
|
||||
if (ImGui::Selectable(fishes[i], false))
|
||||
{
|
||||
selected_fish = i;
|
||||
popup_open = false;
|
||||
}
|
||||
ImGui::EndPopup();
|
||||
}
|
||||
ImGui::TreePop();
|
||||
|
Loading…
Reference in New Issue
Block a user