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

◆ DisplayActions()

void DisplayActions ( int pType)
protected

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

692 {
693 m_CurrentType = pType;
694 TStringArray sortedNames = new TStringArray();
695 m_ActionsSelector.ClearItems();
696 string filterTextLower = m_ActionsFilter.GetText();
697 filterTextLower.ToLower();
698
699 TStringArray filterTokens = new TStringArray;
700 filterTextLower.Split(" ", filterTokens);
701
703 {
704 string nameLower = dta.GetName();
705 nameLower.ToLower();
706 bool add = false;
707 if (pType == -1 || pType == dta.GetCategory())
708 {
709 if (filterTextLower)
710 {
711 foreach (string token:filterTokens)
712 {
713 if (nameLower.Contains(token))
714 add = true;
715 }
716 }
717 else
718 add = true;
719 }
720 if (add)
721 sortedNames.Insert(dta.GetNameUnique());
722 }
723 sortedNames.Sort();
724 foreach (int i, string sortedNameUnique:sortedNames)
725 {
726 PluginDayzPlayerDebugUserData data = m_AnimationListMappings.Get(sortedNameUnique);
727 string sortedName = data.GetName();
728 string typeName;
729
730 if (m_TypeNameMappings.Contains(data.GetCategory()))
731 {
732 typeName = m_TypeNameMappings.Get(data.GetCategory());
733 }
734
735 m_ActionsSelector.AddItem(sortedName, data, 0,i);
736 if (typeName)
737 m_ActionsSelector.SetItem(i, typeName, null, 1);
738 }
739 }
TextListboxWidget m_ActionsSelector
Определения PluginDayzPlayerDebug.c:220
ref map< string, ref PluginDayzPlayerDebugUserData > m_AnimationListMappings
Определения PluginDayzPlayerDebug.c:199
int m_CurrentType
Определения PluginDayzPlayerDebug.c:260
ref array< ref PluginDayzPlayerDebugUserData > m_AnimationList
Определения PluginDayzPlayerDebug.c:198
EditBoxWidget m_ActionsFilter
Определения PluginDayzPlayerDebug.c:231
ref map< int, string > m_TypeNameMappings
Определения PluginDayzPlayerDebug.c:200
array< string > TStringArray
Определения EnScript.c:685
bool Contains(string sample)
Returns true if sample is substring of string.
Определения EnString.c:286
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.

Перекрестные ссылки string::Contains(), PluginDayzPlayerDebugUserData::GetCategory(), PluginDayzPlayerDebugUserData::GetName(), m_ActionsFilter, m_ActionsSelector, m_AnimationList, m_AnimationListMappings, m_CurrentType, m_TypeNameMappings, string::Split() и string::ToLower().

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