Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_MANW_Banner.c
Go to the documentation of this file.
2{
3 protected const string NAME_BUTTON = "m_wBannerButtonMain";
4 protected const string NAME_TEXT = "BannerText";
5 protected const int IMAGES_COUNT = 2;
6
7 protected int m_iImagesReadyCount;
8
10
12
13 //------------------------------------------------------------------------------------------------
14 override void HandlerAttached(Widget w)
15 {
16 super.HandlerAttached(w);
17
18 m_wRoot.SetVisible(false);
19
22 }
23
24 //------------------------------------------------------------------------------------------------
25 protected void Init()
26 {
27 if (GetGame().GetBackendApi().GetPopupCount() < 1)
28 return;
29
30 PopupFeedItem popupItem = GetGame().GetBackendApi().GetPopupItem(0);
31 if (!popupItem)
32 return;
33
34 m_wRoot.SetVisible(true);
35
36 TextWidget textTitle = TextWidget.Cast(m_wRoot.FindAnyWidget(NAME_TEXT));
37 textTitle.SetText(popupItem.BannerText());
38
39 //ImageWidget imgTitle = ImageWidget.Cast(m_wRoot.FindAnyWidget("BG"));
40 //imgTitle.LoadImageTexture(0, popupItem.BackgroundImagePath());
41
43 }
44
45 //------------------------------------------------------------------------------------------------
46 override bool OnClick(Widget w, int x, int y, int button)
47 {
48 bool result = super.OnClick(w, x, y, button);
49
50 if (w != m_wBannerButtonMain)
51 return result;
52
54
55 return result;
56 }
57
58 //------------------------------------------------------------------------------------------------
59 protected void OnPopupReady()
60 {
63 return;
64
65 GetGame().GetCallqueue().Call(Init);
66 }
67
68 //------------------------------------------------------------------------------------------------
69 protected void OnCommStatusCheckFinished(SCR_ECommStatus status, float responseTime, float lastSuccessTime, float lastFailTime)
70 {
72 {
73 Init();
74
75 //m_Callback = new BackendCallback();
76 //GetGame().GetBackendApi().OnPopupReady(m_Callback);
77 //m_Callback.SetOnSuccess(OnPopupReady);
78 }
79 }
80}
ArmaReforgerScripted GetGame()
Definition game.c:1398
SCR_ECommStatus
This class may become obsolete on BackendAPI update.
Popup Feed data structure.
override void HandlerAttached(Widget w)
ref BackendCallback m_Callback
override bool OnClick(Widget w, int x, int y, int button)
Widget m_wBannerButtonMain
void OnCommStatusCheckFinished(SCR_ECommStatus status, float responseTime, float lastSuccessTime, float lastFailTime)
const int IMAGES_COUNT
const string NAME_BUTTON
const string NAME_TEXT
static void CreateBannerDialog()
static ScriptInvokerCommStatus GetOnCommStatusCheckFinished()