Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_TaskListFocus.c
Go to the documentation of this file.
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 {
38 if (!mapEntity)
39 return;
40
42 if (!taskListUI)
43 return;
44
45 taskListUI.SetMapContextAllowed(val);
46 }
47}
ArmaReforgerScripted GetGame()
Definition game.c:1398
InputManager GetInputManager()
SCR_MapUIBaseComponent GetMapUIComponent(typename componentType)
static SCR_MapEntity GetMapInstance()
Get map entity instance.
void SetMapContextAllowed(bool val)