added cl_skin_filter_string for skin quick search

This commit is contained in:
Tim Schumacher 2016-02-14 19:51:49 +01:00
parent 94f3da4a47
commit 9e6e062793
3 changed files with 5 additions and 5 deletions

View file

@ -21,6 +21,7 @@ MACRO_CONFIG_INT(ClCpuThrottleInactive, cl_cpu_throttle_inactive, 1, 0, 1, CFGFL
MACRO_CONFIG_INT(ClEditor, cl_editor, 0, 0, 1, CFGFLAG_CLIENT, "")
MACRO_CONFIG_INT(ClEditorUndo, cl_editorundo, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Undo function in editor")
MACRO_CONFIG_INT(ClLoadCountryFlags, cl_load_country_flags, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Load and show country flags")
MACRO_CONFIG_STR(ClSkinFilterString, cl_skin_filter_string, 25, "", CFGFLAG_SAVE|CFGFLAG_CLIENT, "Skin filtering string")
MACRO_CONFIG_INT(ClAutoDemoRecord, cl_auto_demo_record, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Automatically record demos")
MACRO_CONFIG_INT(ClAutoDemoMax, cl_auto_demo_max, 10, 0, 1000, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Maximum number of automatically recorded demos (0 = no limit)")

View file

@ -131,7 +131,6 @@ class CMenus : public CComponent
bool m_NeedSendinfo;
bool m_NeedSendDummyinfo;
int m_SettingPlayerPage;
char m_aSkinFilterString[25];
//
bool m_EscapePressed;

View file

@ -490,7 +490,7 @@ void CMenus::RenderSettingsTee(CUIRect MainView)
const CSkins::CSkin *s = m_pClient->m_pSkins->Get(i);
// filter quick search
if(m_aSkinFilterString[0] != '\0' && !str_find_nocase(s->m_aName, m_aSkinFilterString))
if(g_Config.m_ClSkinFilterString[0] != '\0' && !str_find_nocase(s->m_aName, g_Config.m_ClSkinFilterString))
continue;
// no special skins
@ -575,7 +575,7 @@ 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(DoEditBox(&m_aSkinFilterString, &QuickSearch, m_aSkinFilterString, sizeof(m_aSkinFilterString), 14.0f, &Offset, false, CUI::CORNER_L, Localize("Search")))
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;
// clear button
@ -585,8 +585,8 @@ void CMenus::RenderSettingsTee(CUIRect MainView)
UI()->DoLabel(&QuickSearchClearButton, "×", QuickSearchClearButton.h*ms_FontmodHeight, 0);
if(UI()->DoButtonLogic(&s_ClearButton, "×", 0, &QuickSearchClearButton))
{
m_aSkinFilterString[0] = 0;
UI()->SetActiveItem(&m_aSkinFilterString);
g_Config.m_ClSkinFilterString[0] = 0;
UI()->SetActiveItem(&g_Config.m_ClSkinFilterString);
s_InitSkinlist = true;
}
}