mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
Demo: tweaked ShowFontSelector() and ShowStyleSelector() to update selection while navigating and to not close popup automatically.
This commit is contained in:
parent
8e4955bb23
commit
045645e5f1
3 changed files with 20 additions and 10 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue