mirror of
https://github.com/ocornut/imgui.git
synced 2025-02-02 20:47:23 +01:00
Demo: Font selector combo sets default focus.
This commit is contained in:
parent
cec8ff1885
commit
3115ae0815
@ -7851,6 +7851,8 @@ void ImGui::ShowFontSelector(const char* label)
|
|||||||
ImGui::PushID((void*)font);
|
ImGui::PushID((void*)font);
|
||||||
if (ImGui::Selectable(font->GetDebugName(), font == font_current))
|
if (ImGui::Selectable(font->GetDebugName(), font == font_current))
|
||||||
io.FontDefault = font;
|
io.FontDefault = font;
|
||||||
|
if (font == font_current)
|
||||||
|
ImGui::SetItemDefaultFocus();
|
||||||
ImGui::PopID();
|
ImGui::PopID();
|
||||||
}
|
}
|
||||||
ImGui::EndCombo();
|
ImGui::EndCombo();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user