Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_TaskPlayerListEntryHandler.c
Go to the documentation of this file.
1 //------------------------------------------------------------------------------------------------
3 {
4  protected SCR_BaseTaskExecutor m_Executor;
5  protected Widget m_wMainWidget;
6  protected bool m_bIsHovered;
7 
8  //------------------------------------------------------------------------------------------------
9  SCR_BaseTaskExecutor GetExecutor()
10  {
11  return m_Executor;
12  }
13 
14  //------------------------------------------------------------------------------------------------
15  void SetExecutor(SCR_BaseTaskExecutor executor)
16  {
17  m_Executor = executor;
18  }
19 
20  //------------------------------------------------------------------------------------------------
21  override bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
22  {
23  super.OnMouseLeave(w, enterW, x, y);
24 
25  return false;
26  }
27 
28  //------------------------------------------------------------------------------------------------
29  override bool OnMouseEnter(Widget w, int x, int y)
30  {
31  super.OnMouseEnter(w, x, y);
32 
33  if (GetGame().GetInputManager().GetLastUsedInputDevice() != EInputDeviceType.GAMEPAD)
34  return false;
35 
36  w.GetWorkspace().SetFocusedWidget(w);
37  return false;
38  }
39 
40  //------------------------------------------------------------------------------------------------
41  override bool OnFocusLost(Widget w, int x, int y)
42  {
43  super.OnFocusLost(w, x, y);
44 
45  w.FindAnyWidget("Outline").SetVisible(false);
46 
47  return false;
48  }
49 
50  //------------------------------------------------------------------------------------------------
51  override bool OnFocus(Widget w, int x, int y)
52  {
53  super.OnFocus(w, x, y);
54 
55  SCR_UITaskManagerComponent uiTaskManager = SCR_UITaskManagerComponent.GetInstance();
56  if (!uiTaskManager)
57  return false;
58 
59  SCR_PickAssigneeDialog menu = SCR_PickAssigneeDialog.Cast(GetGame().GetMenuManager().FindMenuByPreset(ChimeraMenuPreset.PickAssignee));
60  menu.SelectTaskExecutor(m_Executor);
61  w.FindAnyWidget("Outline").SetVisible(true);
62 
63  return false;
64  }
65 
66  //------------------------------------------------------------------------------------------------
67  override void HandlerAttached(Widget w)
68  {
69  super.HandlerAttached(w);
70 
71  m_wMainWidget = w;
72  }
73 };
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
SCR_TaskPlayerListEntryHandler
Definition: SCR_TaskPlayerListEntryHandler.c:2
SCR_UITaskManagerComponent
void SCR_UITaskManagerComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition: SCR_UITaskManagerComponent.c:1096
SCR_PickAssigneeDialog
Definition: SCR_PickAssigneeDialog.c:2
SCR_ButtonBaseComponent
Base class for any button, regardless its own content.
Definition: SCR_ButtonBaseComponent.c:3
SCR_BaseTaskExecutor
Definition: SCR_BaseTaskExecutor.c:7
GetInputManager
protected InputManager GetInputManager()
Definition: SCR_BaseManualCameraComponent.c:65
ChimeraMenuPreset
ChimeraMenuPreset
Menu presets.
Definition: ChimeraMenuBase.c:3