Fix Ctrl+F not activating search box in browser and tee settings

Closes #6537.
This commit is contained in:
Robert Müller 2023-04-28 17:17:05 +02:00
parent 22c6e7ebeb
commit 11cb72be32
2 changed files with 2 additions and 2 deletions

View file

@ -506,7 +506,7 @@ void CMenus::RenderServerbrowserServerList(CUIRect View)
static CLineInput s_FilterInput(g_Config.m_BrFilterString, sizeof(g_Config.m_BrFilterString)); static CLineInput s_FilterInput(g_Config.m_BrFilterString, sizeof(g_Config.m_BrFilterString));
if(Input()->KeyPress(KEY_F) && Input()->ModifierIsPressed()) if(Input()->KeyPress(KEY_F) && Input()->ModifierIsPressed())
{ {
UI()->SetActiveItem(&g_Config.m_BrFilterString); UI()->SetActiveItem(&s_FilterInput);
s_FilterInput.SelectAll(); s_FilterInput.SelectAll();
} }
if(UI()->DoClearableEditBox(&s_FilterInput, &QuickSearch, 12.0f)) if(UI()->DoClearableEditBox(&s_FilterInput, &QuickSearch, 12.0f))

View file

@ -929,7 +929,7 @@ void CMenus::RenderSettingsTee(CUIRect MainView)
static CLineInput s_SkinFilterInput(g_Config.m_ClSkinFilterString, sizeof(g_Config.m_ClSkinFilterString)); static CLineInput s_SkinFilterInput(g_Config.m_ClSkinFilterString, sizeof(g_Config.m_ClSkinFilterString));
if(Input()->KeyPress(KEY_F) && Input()->ModifierIsPressed()) if(Input()->KeyPress(KEY_F) && Input()->ModifierIsPressed())
{ {
UI()->SetActiveItem(&g_Config.m_ClSkinFilterString); UI()->SetActiveItem(&s_SkinFilterInput);
s_SkinFilterInput.SelectAll(); s_SkinFilterInput.SelectAll();
} }
s_SkinFilterInput.SetEmptyText(Localize("Search")); s_SkinFilterInput.SetEmptyText(Localize("Search"));