Demo: Font selector combo sets default focus.

This commit is contained in:
ocornut
2025-01-07 14:53:00 +01:00
parent cec8ff1885
commit 3115ae0815
+2
View File
@@ -7851,6 +7851,8 @@ void ImGui::ShowFontSelector(const char* label)
ImGui::PushID((void*)font);
if (ImGui::Selectable(font->GetDebugName(), font == font_current))
io.FontDefault = font;
if (font == font_current)
ImGui::SetItemDefaultFocus();
ImGui::PopID();
}
ImGui::EndCombo();