Skip to content

Commit 3115ae0

Browse files
committed
Demo: Font selector combo sets default focus.
1 parent cec8ff1 commit 3115ae0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

imgui_demo.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -7851,6 +7851,8 @@ void ImGui::ShowFontSelector(const char* label)
78517851
ImGui::PushID((void*)font);
78527852
if (ImGui::Selectable(font->GetDebugName(), font == font_current))
78537853
io.FontDefault = font;
7854+
if (font == font_current)
7855+
ImGui::SetItemDefaultFocus();
78547856
ImGui::PopID();
78557857
}
78567858
ImGui::EndCombo();

0 commit comments

Comments
 (0)