mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-09 23:54:20 +00:00
Selectable: moved ImGuiSelectableFlags_SelectOnNav to public API.
This commit is contained in:
parent
e66afbbbe0
commit
8e4955bb23
5 changed files with 5 additions and 3 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue