8 protected ref array<EEditableEntityLabel> m_iSavedLabels;
11 protected int m_iPageIndex = 0;
13 [
Attribute(
desc:
"Search string that is set when state is loaded")]
14 protected string m_sSearchString;
20 int GetSavedLabelCount()
22 return m_iSavedLabels.Count();
30 void SetLabels(notnull array<EEditableEntityLabel> savedLabels,
bool checkForInvalid =
false)
34 m_iSavedLabels =
new array<EEditableEntityLabel>;
36 m_iSavedLabels.Clear();
38 array<EEditableEntityLabel> validLabels = {};
46 if (checkForInvalid && !validLabels.Contains(label))
49 m_iSavedLabels.Insert(label);
62 if (m_iSavedLabels.Contains(label))
65 m_iSavedLabels.Insert(label);
69 int count = m_iSavedLabels.Count();
71 for(
int i = 0; i < count; i++)
73 if (m_iSavedLabels[i] == label)
75 m_iSavedLabels.RemoveOrdered(i);
88 int GetLabels(out notnull array<EEditableEntityLabel> labels)
91 labels.Copy(m_iSavedLabels);
95 return labels.Count();
104 return m_iSavedLabels.Contains(label);
111 void SetPageIndex(
int pageIndex)
113 m_iPageIndex = pageIndex;
129 void SetSearchString(
string searchString)
131 m_sSearchString = searchString;
139 string GetSearchString()
141 return m_sSearchString;
148 bool HasSearchSaved()
150 return !m_sSearchString.IsEmpty();