5 protected ref array<ref SCR_SubBlockUIName> m_aDescriptionBlocks;
7 override bool HasDescription()
9 return super.HasDescription() || m_aDescriptionBlocks && !m_aDescriptionBlocks.IsEmpty();
14 if (m_aDescriptionBlocks)
16 for (
int i, count = m_aDescriptionBlocks.Count(); i < count; i++)
18 if (m_aDescriptionBlocks[i].HasName())
20 if (m_aDescriptionBlocks[i].IsInline() || description.IsEmpty())
21 description += m_aDescriptionBlocks[i].GetName();
23 description +=
"<br/>" + m_aDescriptionBlocks[i].GetName();
38 if (
index > m_aDescriptionBlocks.Count())
41 return m_aDescriptionBlocks[
index].Name;
53 if (
index > m_aDescriptionBlocks.Count())
64 protected bool m_bInline;
76 return "<image set='{73BAE6966DBC17CB}UI/Imagesets/Hint/Hint.imageset' name='Bullet' scale='1'/>" +
" " + super.GetName();
84 return "<color rgba='255,255,255,160'><image set='{73BAE6966DBC17CB}UI/Imagesets/Hint/Hint.imageset' name='Tip' scale='1'/>" +
" " + super.GetName() +
"</color>";
90 [
Attribute(
"0", uiwidget: UIWidgets.ComboBox, enums: { ParamEnum(
"Any",
"0"), ParamEnum(
"Mouse & Keyboard",
"1"), ParamEnum(
"Gamepad",
"2")})]
91 protected int m_iDevice;
93 override bool HasName()
95 bool isInputMatch =
true;
98 case 1: isInputMatch =
GetGame().GetInputManager().IsUsingMouseAndKeyboard();
break;
99 case 2: isInputMatch = !
GetGame().GetInputManager().IsUsingMouseAndKeyboard();
break;
108 protected string m_sActionName;
110 protected const string m_sDelimiter =
"<br/>";
115 Color sRGBA = Color.FromInt(
UIColors.CONTRAST_COLOR.PackToInt());
117 return m_sDelimiter + super.GetName() +
"<br/><br/>" +
string.Format(
"<color rgba=%2><action name='%1' scale='1.7'/></color>",
m_sActionName,
UIColors.SRGBAFloatToInt(sRGBA)) +
"</br>";
124 protected ref array<ref SCR_KeyBlockEntry> m_aKeys;
127 protected const LocalizedString m_sDoubleModifier =
"#ENF-DoubleModifier";
128 protected const LocalizedString m_sComboModifier =
"#ENF-ComboModifier";
135 Color sRGBA = Color.FromInt(
UIColors.CONTRAST_COLOR.PackToInt());
142 switch (entry.m_iDelimiter)
144 case 0: keys += m_sComboModifier;
break;
145 case 1: keys += m_sEllipsisModifier;
break;
149 switch (entry.m_iModifier)
151 case 1: keys += m_sHoldModifier;
break;
152 case 2: keys += m_sDoubleModifier;
break;
154 keys +=
string.Format(
"<%2 name='%1' scale='1.7'/>", entry.m_sKey, entry.m_Tag);
156 return m_sDelimiter + super.GetName() +
"<br/>" +
string.Format(
"<color rgba='%2'>%1</color>", keys,
UIColors.SRGBAFloatToInt(sRGBA)) +
"</br>";
165 [
Attribute(
"0", uiwidget: UIWidgets.ComboBox, enums: { ParamEnum(
" + ",
"0"), ParamEnum(
"...",
"1")})]
168 [
Attribute(
"0", uiwidget: UIWidgets.ComboBox, enums: { ParamEnum(
"None",
"0"), ParamEnum(
"Hold",
"1"), ParamEnum(
"Double",
"2")})]
171 [
Attribute(
"key", uiwidget: UIWidgets.ComboBox, enums: { ParamEnum(
"key",
"key"), ParamEnum(
"action",
"action")})]
178 [
Attribute(
"0", uiwidget: UIWidgets.Flags, enums: { ParamEnum(
"<p>",
"1"), ParamEnum(
"<b>",
"2"), ParamEnum(
"<i>",
"4"), ParamEnum(
"<h1>",
"8"), ParamEnum(
"<h2>",
"16") })]
179 protected int m_iTags;
185 if (m_iTags & 1) text +=
"<p>";
186 if (m_iTags & 2) text +=
"<b>";
187 if (m_iTags & 4) text +=
"<i>";
188 if (m_iTags & 8) text +=
"<h1>";
189 if (m_iTags & 16) text +=
"<h2>";
191 text += super.GetName();
193 if (m_iTags & 1) text +=
"</p>";
194 if (m_iTags & 2) text +=
"</b>";
195 if (m_iTags & 4) text +=
"</i>";
196 if (m_iTags & 8) text +=
"</h1>";
197 if (m_iTags & 16) text +=
"</h2>";
201 override bool IsInline()
203 return super.IsInline() || m_iTags & 1;
210 [
Attribute(
params:
"imageset", uiwidget: UIWidgets.ResourcePickerThumbnail)]
211 protected ResourceName m_sImageSet;
213 [
Attribute(
desc:
"This defines name of the image in the set.")]
214 protected string m_sImage;
216 [
Attribute(
desc:
"Defines the scale of the Icon.", defvalue:
"1")]
217 protected float m_fScale;
220 protected ref Color m_fColor;
226 if (m_sImage ==
string.Empty)
228 Print(
"HINT SYSTEM: No Icon name defined! Check 'Image'!", LogLevel.WARNING);
232 return "</br>" +
string.Format(
"<color rgba=%1><image set='%2' name='%3' scale='%4'/></color>",
UIColors.SRGBAFloatToInt(m_fColor),
m_sImageSet, m_sImage,
m_fScale) +
"</br>";