Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ContentBrowser_AddonsTooltipComponent.c
Go to the documentation of this file.
1
5{
6 [Attribute("{30907DAA2D89E065}UI/layouts/Menus/Tooltips/Tooltip_ListLine_NoBG.layout")]
8
9 [Attribute("30")]
10 protected int m_iMaxDisplayed;
11
13
14 //------------------------------------------------------------------------------------------------
15 protected override void HandlerAttached(Widget w)
16 {
17 m_wAddonsList = VerticalLayoutWidget.Cast(w.FindAnyWidget("AddonsList"));
18
19 super.HandlerAttached(w);
20 }
21
22 //------------------------------------------------------------------------------------------------
23 void Init(array<ref SCR_WorkshopItem> addons)
24 {
25 foreach (int i, SCR_WorkshopItem addon : addons)
26 {
27 bool last = i >= m_iMaxDisplayed;
28
29 string message = "...";
30 if (!last)
31 message = addon.GetName();
32
33 Widget w = GetGame().GetWorkspace().CreateWidgets(m_sAddonLineLayout, m_wAddonsList);
34 TextWidget wText = TextWidget.Cast(w.FindAnyWidget("Text"));
35 if (wText)
36 wText.SetText(message);
37
38 if (last)
39 {
40 Widget dot = w.FindAnyWidget("Dot");
41 if (dot)
42 dot.SetVisible(false);
43 break;
44 }
45 }
46 }
47
48 //------------------------------------------------------------------------------------------------
53}
ArmaReforgerScripted GetGame()
Definition game.c:1398
static SCR_ContentBrowser_AddonsTooltipComponent FindComponent(notnull Widget w)
SCR_FieldOfViewSettings Attribute