4 [
Attribute(
SCR_Enum.GetDefault(
EHint.UNDEFINED), UIWidgets.SearchComboBox,
"When defined, the hint can be shown only certain amount of times (defined by Show Limit attribute).\nAfter that, calls to show the hint will be ignored.", enums: ParamEnumArray.FromEnum(
EHint))]
5 protected EHint m_Type;
7 [
Attribute(
"1",
desc:
"How many times can the hint be shown. Valid only if Type is defined!")]
8 protected int m_iShowLimit;
11 protected int m_iPriority;
13 [
Attribute(
"0",
desc:
"For how long should the hint be shown.\nWhen 0, default duration from hint manager will be used.\nWhen -1, the hint will be shown until cleared manually.")]
14 protected float m_fDuration;
16 [
Attribute(
desc:
"Widgets to be highlighted when this hint is displayed")]
17 protected ref array<string> m_aHighlightWidgetsNames;
19 [
Attribute(
"0",
desc:
"Should the hint duration be animated.\nWhen false, the duration will not be visualised.")]
20 protected bool m_bIsTimerVisible;
25 protected int m_iSequencePage;
26 protected int m_iSequenceCount;
27 protected WorldTimestamp m_iTimeHintStarted;
51 return m_bIsTimerVisible;
73 WorldTimestamp GetTimeStarted()
75 return m_iTimeHintStarted;
83 m_iTimeHintStarted = world.GetServerTimestamp();
90 int GetHighlightWidgetNames(out notnull array<string> outWidgetNames)
92 if (m_aHighlightWidgetsNames)
93 return outWidgetNames.Copy(m_aHighlightWidgetsNames);
103 return m_FieldManualLink;
110 void InitSequence(
int page,
int count)
112 m_iSequencePage = page;
113 m_iSequenceCount = count;
118 int GetSequencePage()
120 return m_iSequencePage;
125 int GetSequenceCount()
127 return m_iSequenceCount;
134 return m_iSequenceCount != 0;
150 info.Description = description;
151 info.m_fDuration = duration;
153 info.m_FieldManualLink = fieldManualEntry;
154 info.m_bIsTimerVisible = isTimerVisible;
159 override bool SetDescriptionTo(TextWidget textWidget)
164 Color sRGBA = Color.FromInt(
UIColors.CONTRAST_COLOR.PackToInt());
166 if (m_aHighlightWidgetsNames && !m_aHighlightWidgetsNames.IsEmpty())
167 textWidget.SetTextFormat(GetDescription(),
string.Format(
"color rgba=%1",
UIColors.SRGBAFloatToInt(sRGBA)),
"/color");
169 textWidget.SetText(GetDescription());