6 [
Attribute(
"{F6609064A9ECD900}UI/layouts/Menus/Tooltips/Tooltip_ListLine_NoBG_Medium.layout")]
7 protected ResourceName m_sLineLayout;
9 protected VerticalLayoutWidget m_wListWrapper;
10 protected Widget m_wSeparator;
11 protected ref array<string> m_aMessages = {};
14 protected override void HandlerAttached(Widget w)
16 m_wListWrapper = VerticalLayoutWidget.Cast(w.FindAnyWidget(
"List"));
17 if (m_wListWrapper &&
GetGame().InPlayMode())
18 m_wListWrapper.SetVisible(
false);
20 m_wSeparator = w.FindAnyWidget(
"Separator");
22 super.HandlerAttached(w);
26 void Init(array<string> messages,
bool showSeparator =
false)
31 m_wListWrapper.SetVisible(!messages.IsEmpty());
32 m_wSeparator.SetVisible(showSeparator);
34 foreach (
string message : messages)
36 if (!m_aMessages.IsEmpty() && m_aMessages.Contains(message))
39 Widget w =
GetGame().GetWorkspace().CreateWidgets(m_sLineLayout, m_wListWrapper);
43 TextWidget text = TextWidget.Cast(w.FindAnyWidget(
"Text"));
45 text.SetText(message);
47 m_aMessages.Insert(message);