mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
ctrl-f to search, ctrl-x to exclude, ctrl-r to reason
This commit is contained in:
parent
402a71527a
commit
bcec0f1bb1
|
@ -490,6 +490,8 @@ void CMenus::RenderServerbrowserServerList(CUIRect View)
|
|||
QuickSearch.VSplitLeft(5.0f, 0, &QuickSearch);
|
||||
QuickSearch.VSplitLeft(QuickSearch.w-15.0f, &QuickSearch, &Button);
|
||||
static float Offset = 0.0f;
|
||||
if(Input()->KeyPress(KEY_F) && (Input()->KeyIsPressed(KEY_LCTRL) || Input()->KeyIsPressed(KEY_RCTRL)))
|
||||
UI()->SetActiveItem(&g_Config.m_BrFilterString);
|
||||
if(DoEditBox(&g_Config.m_BrFilterString, &QuickSearch, g_Config.m_BrFilterString, sizeof(g_Config.m_BrFilterString), 12.0f, &Offset, false, CUI::CORNER_L, Localize("Search")))
|
||||
Client()->ServerBrowserUpdate();
|
||||
}
|
||||
|
@ -516,6 +518,8 @@ void CMenus::RenderServerbrowserServerList(CUIRect View)
|
|||
QuickExclude.VSplitLeft(5.0f, 0, &QuickExclude);
|
||||
QuickExclude.VSplitLeft(QuickExclude.w-15.0f, &QuickExclude, &Button);
|
||||
static float Offset = 0.0f;
|
||||
if(Input()->KeyPress(KEY_X) && (Input()->KeyIsPressed(KEY_LCTRL) || Input()->KeyIsPressed(KEY_RCTRL)))
|
||||
UI()->SetActiveItem(&g_Config.m_BrExcludeString);
|
||||
if(DoEditBox(&g_Config.m_BrExcludeString, &QuickExclude, g_Config.m_BrExcludeString, sizeof(g_Config.m_BrExcludeString), 12.0f, &Offset, false, CUI::CORNER_L, Localize("Exclude")))
|
||||
Client()->ServerBrowserUpdate();
|
||||
}
|
||||
|
|
|
@ -622,6 +622,8 @@ void CMenus::RenderServerControl(CUIRect MainView)
|
|||
QuickSearch.VSplitLeft(QuickSearch.w-15.0f, &QuickSearch, &Button2);
|
||||
static float Offset = 0.0f;
|
||||
//static char aFilterString[25];
|
||||
if(Input()->KeyPress(KEY_F) && (Input()->KeyIsPressed(KEY_LCTRL) || Input()->KeyIsPressed(KEY_RCTRL)))
|
||||
UI()->SetActiveItem(&m_aFilterString);
|
||||
if(DoEditBox(&m_aFilterString, &QuickSearch, m_aFilterString, sizeof(m_aFilterString), 14.0f, &Offset, false, CUI::CORNER_L, Localize("Search"))) {
|
||||
// TODO: Implement here
|
||||
}
|
||||
|
@ -681,6 +683,8 @@ void CMenus::RenderServerControl(CUIRect MainView)
|
|||
float w = TextRender()->TextWidth(0, 14.0f, pLabel, -1);
|
||||
Reason.VSplitLeft(w+10.0f, 0, &Reason);
|
||||
static float s_Offset = 0.0f;
|
||||
if(Input()->KeyPress(KEY_R) && (Input()->KeyIsPressed(KEY_LCTRL) || Input()->KeyIsPressed(KEY_RCTRL)))
|
||||
UI()->SetActiveItem(&m_aCallvoteReason);
|
||||
DoEditBox(&m_aCallvoteReason, &Reason, m_aCallvoteReason, sizeof(m_aCallvoteReason), 14.0f, &s_Offset, false, CUI::CORNER_ALL);
|
||||
|
||||
// extended features (only available when authed in rcon)
|
||||
|
|
|
@ -616,6 +616,8 @@ void CMenus::RenderSettingsTee(CUIRect MainView)
|
|||
QuickSearch.VSplitLeft(5.0f, 0, &QuickSearch);
|
||||
QuickSearch.VSplitLeft(QuickSearch.w-15.0f, &QuickSearch, &QuickSearchClearButton);
|
||||
static float Offset = 0.0f;
|
||||
if(Input()->KeyPress(KEY_F) && (Input()->KeyIsPressed(KEY_LCTRL) || Input()->KeyIsPressed(KEY_RCTRL)))
|
||||
UI()->SetActiveItem(&g_Config.m_ClSkinFilterString);
|
||||
if(DoEditBox(&g_Config.m_ClSkinFilterString, &QuickSearch, g_Config.m_ClSkinFilterString, sizeof(g_Config.m_ClSkinFilterString), 14.0f, &Offset, false, CUI::CORNER_L, Localize("Search")))
|
||||
s_InitSkinlist = true;
|
||||
|
||||
|
|
Loading…
Reference in a new issue