Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ServerHostingSettingsSubMenu.c
Go to the documentation of this file.
1
5{
8
10
12
15
16 //------------------------------------------------------------------------------------------------
17 override void HandlerDeattached(Widget w)
18 {
19 super.HandlerDeattached(w);
20
23 }
24
25 //------------------------------------------------------------------------------------------------
26 override void OnTabCreate(Widget menuRoot, ResourceName buttonsLayout, int index)
27 {
28 super.OnTabCreate(menuRoot, buttonsLayout, index);
29
31
32 m_NavHost = CreateNavigationButton(UIConstants.MENU_ACTION_SELECT_HOLD, "#AR-ServerHosting_HostLocally", true);
33 if (m_NavHost)
34 m_NavHost.m_OnActivated.Insert(OnHost);
35
37
38 // Tempory disabled saving
40 {
41 m_NavSave = CreateNavigationButton("MenuSave", "#AR-PauseMenu_Save", true);
42 if (m_NavSave)
43 m_NavSave.m_OnActivated.Insert(OnSave);
44 }
45
46 // Hide
48 }
49
50 //------------------------------------------------------------------------------------------------
63
64 //------------------------------------------------------------------------------------------------
65 override void OnTabHide()
66 {
67 super.OnTabHide();
68
71 }
72
73 //------------------------------------------------------------------------------------------------
74 protected void UpdateHostButton()
75 {
76 if (!m_NavHost)
77 return;
78
80 }
81
82 //------------------------------------------------------------------------------------------------
83 protected void OnCommStatusCheckFinished(SCR_ECommStatus status, float responseTime, float lastSuccessTime, float lastFailTime)
84 {
86 }
87
88 //------------------------------------------------------------------------------------------------
89 protected void OnHost()
90 {
91 if (m_OnHost)
92 m_OnHost.Invoke();
93 }
94
95 //------------------------------------------------------------------------------------------------
96 protected void OnSave()
97 {
98 if (m_OnSave)
99 m_OnSave.Invoke();
100 }
101
102 //-------------------------------------------------------------------------------------------
103 // API
104 //-------------------------------------------------------------------------------------------
109
110 //-------------------------------------------------------------------------------------------
112 {
113 if (!m_OnHost)
115
116 return m_OnHost;
117 }
118
119 //-------------------------------------------------------------------------------------------
121 {
122 if (!m_OnSave)
124
125 return m_OnSave;
126 }
127}
bool IsPlatformGameConsole()
Definition game.c:1357
ArmaReforgerScripted GetGame()
Definition game.c:1398
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
ScriptInvokerBase< ScriptInvokerVoidMethod > ScriptInvokerVoid
SCR_ECommStatus
This class may become obsolete on BackendAPI update.
void OnCommStatusCheckFinished(SCR_ECommStatus status, float responseTime, float lastSuccessTime, float lastFailTime)
override void OnTabCreate(Widget menuRoot, ResourceName buttonsLayout, int index)
static ScriptInvokerCommStatus GetOnCommStatusCheckFinished()
static const string SERVICE_BI_BACKEND_MULTIPLAYER
SCR_InputButtonComponent CreateNavigationButton(string actionName, string label, bool rightFooter=false, bool show=true)
void ShowNavigationButtons(bool show)