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_TaskListFocus.c
Go to the documentation of this file.
1
class
SCR_TaskListFocusComponent
:
ScriptedWidgetComponent
2
{
3
//------------------------------------------------------------------------------------------------
4
override
void
HandlerAttached(
Widget
w)
5
{
6
if
(
GetGame
().
GetInputManager
().IsUsingMouseAndKeyboard())
7
return
;
8
9
SetMapContextAllowed(
false
);
10
}
11
12
//------------------------------------------------------------------------------------------------
13
override
bool
OnMouseEnter(
Widget
w,
int
x,
int
y)
14
{
15
SetMapContextAllowed(
false
);
16
return
false
;
17
}
18
19
//------------------------------------------------------------------------------------------------
20
override
bool
OnMouseLeave(
Widget
w,
Widget
enterW,
int
x,
int
y)
21
{
22
if
(enterW)
23
{
24
// enterW is null in map, but in deploy menu mouse enters a root widget of deploy screen so to filter it out we check if the enterW has a deployHandler.
25
SCR_DeployMenuHandler
deployMenu =
SCR_DeployMenuHandler
.Cast(enterW.FindHandler(
SCR_DeployMenuHandler
));
26
if
(!deployMenu)
27
return
false
;
28
}
29
30
SetMapContextAllowed(
true
);
31
return
false
;
32
}
33
34
//------------------------------------------------------------------------------------------------
35
private
void
SetMapContextAllowed(
bool
val)
36
{
37
SCR_MapEntity
mapEntity =
SCR_MapEntity
.
GetMapInstance
();
38
if
(!mapEntity)
39
return
;
40
41
SCR_MapTaskListUI
taskListUI =
SCR_MapTaskListUI
.Cast(mapEntity.
GetMapUIComponent
(
SCR_MapTaskListUI
));
42
if
(!taskListUI)
43
return
;
44
45
taskListUI.
SetMapContextAllowed
(val);
46
}
47
}
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
GetInputManager
InputManager GetInputManager()
Definition
SCR_BaseManualCameraComponent.c:205
SCR_DeployMenuHandler
Definition
SCR_DeployMenuHandler.c:7
SCR_MapEntity
Definition
SCR_MapEntity.c:18
SCR_MapEntity::GetMapUIComponent
SCR_MapUIBaseComponent GetMapUIComponent(typename componentType)
Definition
SCR_MapEntity.c:261
SCR_MapEntity::GetMapInstance
static SCR_MapEntity GetMapInstance()
Get map entity instance.
Definition
SCR_MapEntity.c:112
SCR_MapTaskListUI
Definition
SCR_MapTaskListUI.c:2
SCR_MapTaskListUI::SetMapContextAllowed
void SetMapContextAllowed(bool val)
Definition
SCR_MapTaskListUI.c:186
SCR_TaskListFocusComponent
Definition
SCR_TaskListFocus.c:2
ScriptedWidgetComponent
Definition
ScriptedWidgetComponent.c:13
Widget
Definition
Widget.c:13
scripts
Game
Tasks
UI
SCR_TaskListFocus.c
Generated by
1.17.0