6539: Fix Ctrl+F not activating search box in browser and tee settings r=Jupeyy a=Robyt3

Closes #6537.

## Checklist

- [X] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Robert Müller <robytemueller@gmail.com>
This commit is contained in:
bors[bot] 2023-04-28 15:26:17 +00:00 committed by GitHub
commit 10567cbef2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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"));