Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_CompareLocalizeProperty.c
Go to the documentation of this file.
1 //-------------------------------------------------------------------------------------------
3 class SCR_CompareLocalizeProperty : SCR_SortCompare<SCR_LocalizedProperty>
4 {
5  //-------------------------------------------------------------------------------------------
6  override static int Compare(SCR_LocalizedProperty left, SCR_LocalizedProperty right)
7  {
8  if (!left || !right)
9  return -1;
10 
11  string name1 = ResolveName(left.m_sLabel);
12  string name2 = ResolveName(right.m_sLabel);
13 
14  if (name1.Compare(name2) == -1)
15  return 1;
16  else
17  return 0;
18  }
19 
20  //-------------------------------------------------------------------------------------------
21  static string ResolveName(string name)
22  {
23  if (name.StartsWith("#"))
24  return WidgetManager.Translate(name);
25  else
26  return name;
27  }
28 };
SCR_CompareLocalizeProperty
Sort by localized property labels.
Definition: SCR_CompareLocalizeProperty.c:3
SCR_LocalizedProperty
Variable that is using localized label.
Definition: SCR_WidgetListEntry.c:74