Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ModdedScenarioComponent.c
Go to the documentation of this file.
1//------------------------------------------------------------------------------------------------
3{
6
7 //------------------------------------------------------------------------------------------------
8 override void HandlerAttached(Widget w)
9 {
10 super.HandlerAttached(w);
11 m_wRoot = w;
12 m_wPlayablePC = m_wRoot.FindAnyWidget("PlayablePC");
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);
43 return false;
44 }
45
46};
ArmaReforgerScripted GetGame()
Definition game.c:1398
InputManager GetInputManager()
Widget m_wRoot
ref ScriptInvoker< Widget > m_OnFocus
Deprecated button component. Still used in many prefabs, so it works, it's just stripped of most of t...
void ColorizeWidgets(Color colorBackground, Color colorContent, float speed=-1)
override bool OnFocus(Widget w, int x, int y)
override bool OnMouseButtonDown(Widget w, int x, int y, int button)
ref SCR_ButtonSplitComponent m_pButton
override void HandlerAttached(Widget w)
override void HandlerDeattached(Widget w)