mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-09 23:54:20 +00:00
Demo: Font selector combo sets default focus.
This commit is contained in:
parent
cec8ff1885
commit
3115ae0815
1 changed files with 2 additions and 0 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue