mirror of
https://github.com/ocornut/imgui.git
synced 2026-02-05 18:51:14 +08:00
Selectable: moved ImGuiSelectableFlags_SelectOnNav to public API.
This commit is contained in:
@@ -9288,10 +9288,9 @@ static void ShowExampleAppLayout(bool* p_open)
|
||||
ImGui::BeginChild("left pane", ImVec2(150, 0), ImGuiChildFlags_Borders | ImGuiChildFlags_ResizeX);
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
// FIXME: Good candidate to use ImGuiSelectableFlags_SelectOnNav
|
||||
char label[128];
|
||||
sprintf(label, "MyObject %d", i);
|
||||
if (ImGui::Selectable(label, selected == i))
|
||||
if (ImGui::Selectable(label, selected == i, ImGuiSelectableFlags_SelectOnNav))
|
||||
selected = i;
|
||||
}
|
||||
ImGui::EndChild();
|
||||
|
||||
Reference in New Issue
Block a user