mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge #6539
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:
commit
10567cbef2
|
@ -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))
|
||||||
|
|
|
@ -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"));
|
||||||
|
|
Loading…
Reference in a new issue