Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_ModdedScenarioComponent.c
Go to the documentation of this file.
1 //------------------------------------------------------------------------------------------------
3 {
4  protected Widget m_wPlayablePC;
5  protected ref SCR_ButtonSplitComponent m_pButton;
6 
7  //------------------------------------------------------------------------------------------------
8  override void HandlerAttached(Widget w)
9  {
10  super.HandlerAttached(w);
11  m_wRoot = w;
12  m_wPlayablePC = m_wRoot.FindAnyWidget("PlayablePC");
13  m_pButton = SCR_ButtonSplitComponent.Cast(w.FindHandler(SCR_ButtonSplitComponent));
14 
15  OnInputDeviceIsGamepad(!GetGame().GetInputManager().IsUsingMouseAndKeyboard());
16  GetGame().OnInputDeviceIsGamepadInvoker().Insert(OnInputDeviceIsGamepad);
17  }
18 
19  //------------------------------------------------------------------------------------------------
20  override void HandlerDeattached(Widget w)
21  {
22  GetGame().OnInputDeviceIsGamepadInvoker().Remove(OnInputDeviceIsGamepad);
23  }
24 
25  //------------------------------------------------------------------------------------------------
26  void OnInputDeviceIsGamepad(bool isGamepad)
27  {
28  m_wPlayablePC.SetVisible(!isGamepad);
29  }
30 
31  //------------------------------------------------------------------------------------------------
32  override bool OnMouseButtonDown(Widget w, int x, int y, int button)
33  {
34  return false;
35  }
36 
37  //------------------------------------------------------------------------------------------------
38  override bool OnFocus(Widget w, int x, int y)
39  {
40  m_OnFocus.Invoke(w);
41  super.OnFocus(w, x, y);
42  ColorizeWidgets(COLOR_BACKGROUND_HOVERED, COLOR_CONTENT_HOVERED);
43  //GetGame().GetInputManager().AddActionListener("MenuSelect", EActionTrigger.DOWN, OnMenuSelect);
44  return false;
45  }
46 
47 };
SCR_ButtonSplitComponent
Definition: SCR_ButtonSplitComponent.c:5
SCR_ModdedScenarioComponent
Definition: SCR_ModdedScenarioComponent.c:2
m_wRoot
protected Widget m_wRoot
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:59
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
SCR_ButtonComponent
Deprecated button component. Still used in many prefabs, so it works, it's just stripped of most of t...
Definition: SCR_ButtonComponent.c:4
GetInputManager
protected InputManager GetInputManager()
Definition: SCR_BaseManualCameraComponent.c:65
m_OnFocus
ref ScriptInvoker m_OnFocus
Definition: SCR_ModularButtonComponent.c:63