Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_HostButtonComponent.c
Go to the documentation of this file.
1
5
7{
8 SCR_ModularButtonComponent m_Button;
9 MissionWorkshopItem m_Scenario;
10
11 //------------------------------------------------------------------------------------------------
12 override void HandlerAttached(Widget w)
13 {
14 m_Button = SCR_ModularButtonComponent.FindComponent(w);
15
16 // Invokers actions
17 m_Button.m_OnClicked.Insert(OnClicked);
18 }
19
20 //------------------------------------------------------------------------------------------------
21 protected void OnClicked(SCR_ModularButtonComponent button)
22 {
23 // Open hosting menu
24 ServerHostingUI dialog = SCR_CommonDialogs.CreateServerHostingDialog();
25
26 if (m_Scenario && dialog)
27 dialog.SelectScenario(m_Scenario);
28 }
29
30 //------------------------------------------------------------------------------------------------
32 {
33 m_Scenario = scenario;
34 }
35
36 //------------------------------------------------------------------------------------------------
41};
void OnClicked(SCR_ModularButtonComponent button)
void SetScenario(MissionWorkshopItem scenario)
static SCR_HostButtonComponent FindComponent(Widget w)