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

◆ PrepareFilters()

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

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

901 {
902 filter.Trim();
903 filter.ToLower();
904
905 filters = new TStringArray;
906 TStringArray rawFilters = new TStringArray;
907 filter.Split(" ", rawFilters);
908
909 colors = new TIntArray;
910
911
912 foreach (int i, string f:rawFilters)
913 {
914 int color = -1;
915 if (f.IndexOf(":") == 1)//detect color prefix
916 {
917 string clr = f.Substring(0, 1);
918 f = f.Substring(2, f.Length() - 2);//crop off color prefix
919 color = GetFilterColor(clr);
920 }
921 else//autocolor
922 {
923 if (i%2 == 1)
924 {
925 color = ARGB(200,255,255,255);
926 }
927 }
928 filters.Insert(f);
929 colors.Insert(color);
930 }
931 }
int GetFilterColor(string color)
Определения ScriptConsoleItemsTab.c:882
array< string > TStringArray
Определения EnScript.c:685
array< int > TIntArray
Определения EnScript.c:687
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().

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