mirror of
https://github.com/ocornut/imgui.git
synced 2026-02-20 10:28:35 +00:00
Demo: tweaked ShowFontSelector() and ShowStyleSelector() to update selection while navigating and to not close popup automatically.
This commit is contained in:
@@ -17873,7 +17873,7 @@ void ImGui::ShowFontSelector(const char* label)
|
||||
for (ImFont* font : io.Fonts->Fonts)
|
||||
{
|
||||
PushID((void*)font);
|
||||
if (Selectable(font->GetDebugName(), font == font_current))
|
||||
if (Selectable(font->GetDebugName(), font == font_current, ImGuiSelectableFlags_SelectOnNav | ImGuiSelectableFlags_NoAutoClosePopups))
|
||||
io.FontDefault = font;
|
||||
if (font == font_current)
|
||||
SetItemDefaultFocus();
|
||||
|
||||
Reference in New Issue
Block a user