Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_TutorialTaskMapUIComponent.c
Go to the documentation of this file.
1
class
SCR_TutorialTaskMapUIComponent
:
SCR_TaskMapUIComponent
2
{
3
protected
SCR_TutorialFastTravelMapMenuUI
m_TutorialMapMenu
;
4
5
[
Attribute
(
UIColors
.GetColorAttribute(
Color
.FromSRGBA(137, 137, 137, 255)),
UIWidgets
.ColorPicker,
desc
:
"Color of finished task"
)]
6
protected
ref
Color
m_CourseFinishedColor
;
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();
30
m_BackgroundColor
=
m_FactionColor
;
31
m_OutlineColor
= faction.
GetOutlineFactionColor
();
32
m_IconColor
=
m_OutlineColor
;
33
34
UpdateTaskIconColors
(
m_FactionColor
);
35
36
if
(
SCR_Enum
.HasFlag(tutorial.GetFinishedCourses(),
task
.GetTaskID().ToInt()))
37
{
38
m_FactionColor
=
m_CourseFinishedColor
;
39
40
Widget
w =
m_wRoot
.FindAnyWidget(
m_sWidgetNameTaskIconFinished
);
41
if
(w)
42
w.SetVisible(
true
);
43
44
w =
m_wRoot
.FindAnyWidget(
m_sWidgetNameTaskIconFinishedBG
);
45
if
(w)
46
w.SetVisible(
true
);
47
48
UpdateTaskIconColors
(
m_FactionColor
);
49
}
50
51
SetTask
(
task
);
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
93
m_TutorialMapMenu
=
SCR_TutorialFastTravelMapMenuUI
.Cast(menuMan.
FindMenuByPreset
(
ChimeraMenuPreset
.TutorialFastTravel));
94
if
(!
m_TutorialMapMenu
)
95
return
;
96
}
97
98
//------------------------------------------------------------------------------------------------
99
// Sets task as selected on task icon click
100
override
protected
void
OnTaskIconClicked
()
101
{
102
super.OnTaskIconClicked();
103
104
if
(!
m_TutorialMapMenu
)
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
121
if
(!
m_TutorialMapMenu
)
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
132
if
(!
m_TutorialMapMenu
)
133
return
;
134
135
m_TutorialMapMenu
.OnTaskClick(
m_Task
);
136
}
137
}
ChimeraMenuPreset
ChimeraMenuPreset
Menu presets.
Definition
ChimeraMenuBase.c:4
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
SCR_Task
void SCR_Task(IEntitySource src, IEntity parent)
Definition
SCR_Task.c:1938
task
from task
Definition
SCR_TaskNotificationConfigs.c:12
Color
Definition
Color.c:13
InputManager
Input management system for user interactions.
Definition
InputManager.c:20
MenuManager
Definition
MenuManager.c:13
MenuManager::FindMenuByPreset
proto external MenuBase FindMenuByPreset(ScriptMenuPresetEnum preset)
Finds first menu/dialog with given preset index, or nullptr when there is no such menu opened.
SCR_Enum
Definition
SCR_Enum.c:2
SCR_Faction
Definition
SCR_Faction.c:6
SCR_Faction::GetOutlineFactionColor
Color GetOutlineFactionColor()
Definition
SCR_Faction.c:306
SCR_MapUIElement::GetRoot
Widget GetRoot()
Definition
SCR_MapUIElement.c:104
SCR_ScriptedWidgetComponent::m_wRoot
Widget m_wRoot
Definition
SCR_ScriptedWidgetComponent.c:9
SCR_TaskMapUIComponent
Definition
SCR_TaskMapUIComponent.c:2
SCR_TaskMapUIComponent::m_OutlineColor
ref Color m_OutlineColor
Definition
SCR_TaskMapUIComponent.c:4
SCR_TaskMapUIComponent::m_FactionColor
ref Color m_FactionColor
Definition
SCR_TaskMapUIComponent.c:6
SCR_TaskMapUIComponent::UpdateTaskIconColors
void UpdateTaskIconColors(Color backgroundColor=null, Color iconColor=null, Color outlineColor=null)
Definition
SCR_TaskMapUIComponent.c:514
SCR_TaskMapUIComponent::m_BackgroundColor
ref Color m_BackgroundColor
Definition
SCR_TaskMapUIComponent.c:5
SCR_TaskMapUIComponent::SetTask
void SetTask(notnull SCR_Task task)
Definition
SCR_TaskMapUIComponent.c:381
SCR_TaskMapUIComponent::m_IconColor
ref Color m_IconColor
Definition
SCR_TaskMapUIComponent.c:3
SCR_TaskMapUIComponent::m_TaskSystem
SCR_TaskSystem m_TaskSystem
Definition
SCR_TaskMapUIComponent.c:9
SCR_TaskMapUIComponent::m_Task
SCR_Task m_Task
Definition
SCR_TaskMapUIComponent.c:8
SCR_TaskSystem
Definition
SCR_TaskSystem.c:6
SCR_TutorialFastTravelMapMenuUI
Tutorial fast travel map menu.
Definition
SCR_TutorialFastTravelMapMenuUI.c:5
SCR_TutorialTaskMapUIComponent
Definition
SCR_TutorialTaskMapUIComponent.c:2
SCR_TutorialTaskMapUIComponent::SetSelected
void SetSelected(bool select)
Definition
SCR_TutorialTaskMapUIComponent.c:55
SCR_TutorialTaskMapUIComponent::m_sWidgetNameTaskIconFinishedBG
const string m_sWidgetNameTaskIconFinishedBG
Definition
SCR_TutorialTaskMapUIComponent.c:9
SCR_TutorialTaskMapUIComponent::InitTask
override void InitTask(notnull SCR_Task task)
Definition
SCR_TutorialTaskMapUIComponent.c:13
SCR_TutorialTaskMapUIComponent::m_sWidgetNameTaskIconFocus
const string m_sWidgetNameTaskIconFocus
Definition
SCR_TutorialTaskMapUIComponent.c:10
SCR_TutorialTaskMapUIComponent::OnTaskIconClicked
void OnTaskIconClicked()
Definition
SCR_TutorialTaskMapUIComponent.c:100
SCR_TutorialTaskMapUIComponent::HandlerAttached
override void HandlerAttached(Widget w)
Definition
SCR_TutorialTaskMapUIComponent.c:85
SCR_TutorialTaskMapUIComponent::m_sWidgetNameTaskIconFinished
const string m_sWidgetNameTaskIconFinished
Definition
SCR_TutorialTaskMapUIComponent.c:8
SCR_TutorialTaskMapUIComponent::IgnoreStandardInputs
void IgnoreStandardInputs(bool ignore)
Definition
SCR_TutorialTaskMapUIComponent.c:65
SCR_TutorialTaskMapUIComponent::m_TutorialMapMenu
SCR_TutorialFastTravelMapMenuUI m_TutorialMapMenu
Definition
SCR_TutorialTaskMapUIComponent.c:3
SCR_TutorialTaskMapUIComponent::m_CourseFinishedColor
ref Color m_CourseFinishedColor
Definition
SCR_TutorialTaskMapUIComponent.c:6
SCR_TutorialTaskMapUIComponent::OnTaskSelected
void OnTaskSelected(SCR_Task task)
Definition
SCR_TutorialTaskMapUIComponent.c:128
SCR_TutorialTaskMapUIComponent::OnTaskTitleClicked
void OnTaskTitleClicked()
Definition
SCR_TutorialTaskMapUIComponent.c:110
UIColors
Definition
Constants.c:17
UIWidgets
Definition
attributes.c:40
Widget
Definition
Widget.c:13
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
GetFactionByKey
FactionManagerClass GenericEntityClass GetFactionByKey(FactionKey factionKey)
scripts
Game
UI
Tasks
SCR_TutorialTaskMapUIComponent.c
Generated by
1.17.0