Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_TutorialFastTravelMap.c
Go to the documentation of this file.
2{
3 protected vector m_vPosition;
5
6 //------------------------------------------------------------------------------
7 void SetFastTravelEntity(string entName)
8 {
9 m_TargetEntity = GetGame().GetWorld().FindEntityByName(entName);
10 }
11
12 //------------------------------------------------------------------------------
13 void SetFastTravelName(string name)
14 {
15 TextWidget textWidget = TextWidget.Cast(m_wRoot.FindAnyWidget("Name"));
16 if (textWidget)
17 textWidget.SetText(name);
18
19 }
20
21 //------------------------------------------------------------------------------
22 override vector GetPos()
23 {
24 return m_vPosition;
25 }
26
27 // ------------------------------------------------------------------------------
28 override bool OnClick(Widget w, int x, int y, int button)
29 {
30 SCR_TutorialGamemodeComponent m_TutorialComponent = SCR_TutorialGamemodeComponent.Cast(GetGame().GetGameMode().FindComponent(SCR_TutorialGamemodeComponent));
32 return false;
33
34 if (!m_TargetEntity)
35 return false;
36
37 MenuManager menuMan = GetGame().GetMenuManager();
38 menuMan.FindMenuByPreset(ChimeraMenuPreset.TutorialFastTravel).Close();
39
41 return false;
42 }
43}
ChimeraMenuPreset
Menu presets.
ArmaReforgerScripted GetGame()
Definition game.c:1398
SCR_BaseGameMode GetGameMode()
SCR_TutorialGamemodeComponent m_TutorialComponent
proto external MenuBase FindMenuByPreset(ScriptMenuPresetEnum preset)
Finds first menu/dialog with given preset index, or nullptr when there is no such menu opened.
override bool OnClick(Widget w, int x, int y, int button)