DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ PrepareFilters()

void ScriptConsoleItemsTab::PrepareFilters ( string filter,
out TStringArray filters,
out TIntArray colors )
inlineprotected

См. определение в файле ScriptConsoleItemsTab.c строка 905

906 {
907 filter.Trim();
908 filter.ToLower();
909
910 filters = new TStringArray;
911 TStringArray rawFilters = new TStringArray;
912 filter.Split(" ", rawFilters);
913
914 colors = new TIntArray;
915
916
917 foreach (int i, string f:rawFilters)
918 {
919 int color = -1;
920 if (f.IndexOf(":") == 1)//detect color prefix
921 {
922 string clr = f.Substring(0, 1);
923 f = f.Substring(2, f.Length() - 2);//crop off color prefix
924 color = GetFilterColor(clr);
925 }
926 else//autocolor
927 {
928 if (i%2 == 1)
929 {
930 color = ARGB(200,255,255,255);
931 }
932 }
933 filters.Insert(f);
934 colors.Insert(color);
935 }
936 }
int GetFilterColor(string color)
Определения ScriptConsoleItemsTab.c:887
array< int > TIntArray
Определения EnScript.c:733
class array< Class T > TStringArray
proto string Trim()
Returns trimmed string with removed leading and trailing whitespaces.
void Split(string sample, out array< string > output)
Splits string into array of strings separated by 'sample'.
Определения EnString.c:396
proto int ToLower()
Changes string to lowercase. Returns length.
int ARGB(int a, int r, int g, int b)
Определения proto.c:322

Перекрестные ссылки ARGB(), GetFilterColor(), string::Split(), string::ToLower(), string::Trim() и TStringArray.

Используется в ChangeFilter().