Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_TutorialTaskMapUIComponent.c
Go to the documentation of this file.
2{
4
5 [Attribute(UIColors.GetColorAttribute(Color.FromSRGBA(137, 137, 137, 255)), UIWidgets.ColorPicker, desc: "Color of finished task")]
7
8 protected const string m_sWidgetNameTaskIconFinished = "TaskIconFinished";
9 protected const string m_sWidgetNameTaskIconFinishedBG = "TaskIconFinishedBG";
10 protected const string m_sWidgetNameTaskIconFocus = "TaskIconFocus";
11
12 //------------------------------------------------------------------------------------------------
13 override void InitTask(notnull SCR_Task task)
14 {
15 SCR_TutorialGamemodeComponent tutorial = SCR_TutorialGamemodeComponent.GetInstance();
16 if (!tutorial)
17 return;
18
19 m_Task = task;
20
21 m_TaskSystem = SCR_TaskSystem.GetInstance();
22 if (!m_TaskSystem && !m_TaskSystem.IsTaskVisibleOnMap(task))
23 return;
24
25 SCR_Faction faction = SCR_Faction.Cast(GetGame().GetFactionManager().GetFactionByKey("US"));
26 if (!faction)
27 return;
28
29 m_FactionColor = faction.GetFactionColor();
33
35
36 if (SCR_Enum.HasFlag(tutorial.GetFinishedCourses(), task.GetTaskID().ToInt()))
37 {
39
41 if (w)
42 w.SetVisible(true);
43
45 if (w)
46 w.SetVisible(true);
47
49 }
50
52 }
53
54 //------------------------------------------------------------------------------------------------
55 void SetSelected(bool select)
56 {
57 Widget focus = m_wRoot.FindAnyWidget(m_sWidgetNameTaskIconFocus);
58 if (!focus)
59 return;
60
61 focus.SetVisible(select);
62 }
63
64 //------------------------------------------------------------------------------------------------
65 void IgnoreStandardInputs(bool ignore)
66 {
67 Widget w = GetRoot();
68 if (!w)
69 return;
70
71 SCR_ModularButtonComponent buttonComp = SCR_ModularButtonComponent.Cast(w.FindHandler(SCR_ModularButtonComponent));
72 if (buttonComp)
73 buttonComp.IgnoreStandardInputs(ignore);
74
75 w = w.FindAnyWidget("m_wTaskIconButton");
76 if (!w)
77 return;
78
79 buttonComp = SCR_ModularButtonComponent.Cast(w.FindHandler(SCR_ModularButtonComponent));
80 if (buttonComp)
81 buttonComp.IgnoreStandardInputs(ignore);
82 }
83
84 //------------------------------------------------------------------------------------------------
85 override void HandlerAttached(Widget w)
86 {
87 super.HandlerAttached(w);
88
89 MenuManager menuMan = GetGame().GetMenuManager();
90 if (!menuMan)
91 return;
92
95 return;
96 }
97
98 //------------------------------------------------------------------------------------------------
99 // Sets task as selected on task icon click
100 override protected void OnTaskIconClicked()
101 {
102 super.OnTaskIconClicked();
103
105 return;
106
107 m_TutorialMapMenu.OnTaskClick(m_Task);
108 }
109 //------------------------------------------------------------------------------------------------
110 override protected void OnTaskTitleClicked()
111 {
112 super.OnTaskTitleClicked();
113
114 InputManager inputManager = GetGame().GetInputManager();
115 if (!inputManager)
116 return;
117
118 if (inputManager.IsUsingMouseAndKeyboard())
119 return;
120
122 return;
123
124 m_TutorialMapMenu.OnTaskClick(m_Task);
125 }
126
127 //------------------------------------------------------------------------------------------------
128 override protected void OnTaskSelected(SCR_Task task)
129 {
130 super.OnTaskSelected(task);
131
133 return;
134
135 m_TutorialMapMenu.OnTaskClick(m_Task);
136 }
137}
ChimeraMenuPreset
Menu presets.
ArmaReforgerScripted GetGame()
Definition game.c:1398
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
void SCR_Task(IEntitySource src, IEntity parent)
Definition SCR_Task.c:1938
Definition Color.c:13
Input management system for user interactions.
proto external MenuBase FindMenuByPreset(ScriptMenuPresetEnum preset)
Finds first menu/dialog with given preset index, or nullptr when there is no such menu opened.
Color GetOutlineFactionColor()
void UpdateTaskIconColors(Color backgroundColor=null, Color iconColor=null, Color outlineColor=null)
void SetTask(notnull SCR_Task task)
override void InitTask(notnull SCR_Task task)
SCR_TutorialFastTravelMapMenuUI m_TutorialMapMenu
SCR_FieldOfViewSettings Attribute
FactionManagerClass GenericEntityClass GetFactionByKey(FactionKey factionKey)