12 protected string m_sCustomTitle;
18 m_sCustomTitle = customTitle;
22 override bool _WB_GetCustomTitle(BaseContainer source, out
string title)
27 title = m_sCustomTitle;
45 protected string m_sPropertyName;
46 protected string m_sFormat;
56 override bool _WB_GetCustomTitle(BaseContainer source, out
string title)
77 protected ref array<string> m_aPropertyNames;
78 protected string m_sFormat;
83 m_aPropertyNames = propertyNames;
88 override bool _WB_GetCustomTitle(BaseContainer source, out
string title)
90 if (!m_aPropertyNames)
96 int count = m_aPropertyNames.Count();
97 array<string> arguments = {};
98 arguments.Resize(count);
100 for (
int i = 0; i < count; i++)
103 if (!source.Get(m_aPropertyNames[i], title) || title ==
"<°))))-<")
105 ResourceName tempResourceName;
106 if (source.Get(m_aPropertyNames[i], tempResourceName))
107 title = FilePath.StripPath(tempResourceName);
112 arguments[i] = title;
132 protected string m_sPropertyName;
133 protected string m_sFormat;
143 override bool _WB_GetCustomTitle(BaseContainer source, out
string title)
148 title =
string.Format(
m_sFormat, WidgetManager.Translate(title));
164 protected ref array<string> m_aPropertyNames;
165 protected string m_sFormat;
168 void SCR_BaseContainerMultipleParametersTitleField(array<string> propertyNames,
string format =
"%1")
170 m_aPropertyNames = propertyNames;
175 override bool _WB_GetCustomTitle(BaseContainer source, out
string title)
177 if (!m_aPropertyNames)
183 int count = m_aPropertyNames.Count();
184 array<string> arguments = {};
185 arguments.Resize(count);
187 for (
int i = 0; i < count; i++)
190 if (!source.Get(m_aPropertyNames[i], title) || title ==
"<°))))-<")
192 ResourceName tempResourceName;
193 if (source.Get(m_aPropertyNames[i], tempResourceName) && title !=
"<°))))-<")
194 title = FilePath.StripPath(tempResourceName);
199 arguments[i] = title;
220 protected string m_sPropertyName;
221 protected string m_sFormat;
231 override bool _WB_GetCustomTitle(BaseContainer source, out
string title)
233 ResourceName resourceName;
237 title =
string.Format(
m_sFormat, FilePath.StripPath(resourceName));
255 protected typename m_EnumType;
256 protected string m_PropertyName;
257 protected string m_sFormat;
262 m_EnumType = enumType;
263 m_PropertyName = propertyName;
268 override bool _WB_GetCustomTitle(BaseContainer source, out
string title)
271 if (!source.Get(m_PropertyName, enumValue))
276 title =
string.Format(
m_sFormat,
typename.EnumToString(m_EnumType, enumValue));
297 protected typename m_EnumType;
298 protected string m_sEnumName;
299 protected string m_sValueName;
300 protected string m_sDefaultValue;
301 protected string m_sFormat;
306 m_EnumType = enumType;
307 m_sEnumName = enumName;
308 m_sValueName = valueName;
309 m_sDefaultValue = defaultValue;
314 override bool _WB_GetCustomTitle(BaseContainer source, out
string title)
317 if (!source.Get(m_sEnumName, enumValue))
321 if (!source.Get(m_sValueName, value))
326 value = m_sDefaultValue;
328 title =
string.Format(
m_sFormat,
typename.EnumToString(m_EnumType, enumValue), value);
346 protected typename m_EnumType;
347 protected string m_PropertyName;
348 protected string m_sFormat;
353 m_EnumType = enumType;
354 m_PropertyName = propertyName;
359 override bool _WB_GetCustomTitle(BaseContainer source, out
string title)
362 if (!source.Get(m_PropertyName, enumValue))
365 array<int> values = {};
367 for (
int i = 0, count =
SCR_Enum.BitToIntArray(enumValue, values); i < count; i++)
372 enumName +=
typename.EnumToString(m_EnumType, values[i]);
375 title =
string.Format(
m_sFormat, enumName);
393 protected string m_sPropertyName;
394 protected bool m_bFileNameOnly;
395 protected string m_sFormat;
401 m_bFileNameOnly = fileNameOnly;
406 override bool _WB_GetCustomTitle(BaseContainer source, out
string title)
412 title = path.GetPath();
414 title =
string.Format(
m_sFormat, FilePath.StripPath(title));
433 protected string m_sPropertyName;
434 protected string m_sFormat;
444 override bool _WB_GetCustomTitle(BaseContainer source, out
string title)
450 title =
string.Format(
m_sFormat,
object.GetClassName());
475 override bool _WB_GetCustomTitle(BaseContainer source, out
string title)
478 return !title.IsEmpty();
495 protected string m_sPropertyName1;
496 protected string m_sPropertyName2;
497 protected string m_sFormat;
502 m_sPropertyName1 = propertyName1;
503 m_sPropertyName2 = propertyName2;
508 override bool _WB_GetCustomTitle(BaseContainer source, out
string title)
510 string title1, title2;
512 if (!source.Get(m_sPropertyName1, title1))
515 if (!source.Get(m_sPropertyName2, title2))
518 title =
string.Format(
m_sFormat, title1, title2);
540 protected string m_sCheckVar;
541 protected string m_sPropertyName;
542 protected string m_sFormatTrue;
543 protected string m_sFormatFalse;
544 protected string m_sCheckVarEqual;
549 m_sCheckVar = checkVar;
551 m_sFormatTrue = formatTrue;
552 m_sFormatFalse = formatFalse;
553 m_sCheckVarEqual = checkVarEqual;
557 override bool _WB_GetCustomTitle(BaseContainer source, out
string title)
559 string checkVar, titleName;
561 if (!source.Get(m_sCheckVar, checkVar))
567 if (checkVar == m_sCheckVarEqual)
568 title =
string.Format(m_sFormatTrue, titleName);
570 title =
string.Format(m_sFormatFalse, titleName);
593 protected string m_sCheckVar;
594 protected string m_sPropertyName;
595 protected string m_sFormatTrue;
596 protected string m_sFormatFalse;
597 protected float m_iCheckVarEqual;
598 protected bool m_bFileNameOnly;
603 m_sCheckVar = checkVar;
605 m_sFormatTrue = formatTrue;
606 m_sFormatFalse = formatFalse;
607 m_iCheckVarEqual = checkVarEqual;
608 m_bFileNameOnly = fileNameOnly;
612 override bool _WB_GetCustomTitle(BaseContainer source, out
string title)
617 if (!source.Get(m_sCheckVar, checkVar))
625 pathString =
"NO PREFAB";
627 pathString = path.GetPath();
629 if (checkVar == m_iCheckVarEqual)
631 if (!m_bFileNameOnly || path.IsEmpty())
632 title =
string.Format(m_sFormatTrue, pathString);
634 title =
string.Format(m_sFormatTrue, FilePath.StripPath(pathString));
638 if (!m_bFileNameOnly || path.IsEmpty())
639 title =
string.Format(m_sFormatFalse, pathString);
641 title =
string.Format(m_sFormatFalse, FilePath.StripPath(pathString));
661 protected string m_sCheckVar;
662 protected string m_sConditionTrueText;
663 protected string m_sConditionFalseText;
664 protected int m_iCheckVarEqual;
669 m_sCheckVar = checkVar;
670 m_sConditionTrueText = conditionTrueText;
671 m_sConditionFalseText = conditionFalseText;
672 m_iCheckVarEqual = checkVarEqual;
676 override bool _WB_GetCustomTitle(BaseContainer source, out
string title)
680 if (!source.Get(m_sCheckVar, checkVar))
683 if (checkVar == m_iCheckVarEqual)
684 title = m_sConditionTrueText;
686 title = m_sConditionFalseText;
708 protected typename m_FlagEnumType;
709 protected string m_sFlagName;
710 protected string m_sFlagDivider;
711 protected string m_sCheckVar;
712 protected string m_sConditionTrueText;
713 protected string m_sConditionFalseText;
714 protected int m_iCheckVarEqual;
717 void BaseContainerCustomCheckIntWithFlagTitleField(
typename flagEnumType,
string flagName,
string checkVar,
int checkVarEqual,
string conditionTrueText =
"DEFAULT TRUE - %1",
string conditionFalseText =
"DEFAULT FALSE - %2",
string flagDivider =
" & ")
719 m_FlagEnumType = flagEnumType;
720 m_sFlagName = flagName;
721 m_sFlagDivider = flagDivider;
722 m_sCheckVar = checkVar;
723 m_sConditionTrueText = conditionTrueText;
724 m_sConditionFalseText = conditionFalseText;
725 m_iCheckVarEqual = checkVarEqual;
729 override bool _WB_GetCustomTitle(BaseContainer source, out
string title)
733 if (!source.Get(m_sCheckVar, checkVar))
736 if (checkVar == m_iCheckVarEqual)
738 title = m_sConditionTrueText;
742 title = m_sConditionFalseText;
746 string enumName =
"NONE";
749 if (source.Get(m_sFlagName, enumValue))
751 array<int> values = {};
752 for (
int i = 0, count =
SCR_Enum.BitToIntArray(enumValue, values); i < count; i++)
755 enumName =
string.Empty;
758 enumName += m_sFlagDivider;
760 enumName +=
typename.EnumToString(m_FlagEnumType, values[i]);
765 title = title.Format(title, enumName);
798 if (!info || !info.Get(
"Name", title))
801 title =
string.Format(
m_sFormat, WidgetManager.Translate(title));