Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_MouseAreaEditorUIComponent.c
Go to the documentation of this file.
1
2
4{
5 protected bool m_bIsMouseOn;
7
8 //------------------------------------------------------------------------------------------------
11 bool IsMouseOn()
12 {
14 }
15
16 //------------------------------------------------------------------------------------------------
17 protected void OnInputDeviceIsGamepad(bool isGamepad)
18 {
19 //--- Cache the value
20 m_bIsUsingMouseAndKeyboard = !isGamepad;
21 }
22
23 //------------------------------------------------------------------------------------------------
24 override bool OnMouseEnter(Widget w, int x, int y)
25 {
26 m_bIsMouseOn = true;
27 return false;
28 }
29
30 //------------------------------------------------------------------------------------------------
31 override bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
32 {
33 m_bIsMouseOn = false;
34 return false;
35 }
36
37 //------------------------------------------------------------------------------------------------
39 {
40 OnInputDeviceIsGamepad(!GetGame().GetInputManager().IsUsingMouseAndKeyboard());
41 GetGame().OnInputDeviceIsGamepadInvoker().Insert(OnInputDeviceIsGamepad);
42 }
43
44 //------------------------------------------------------------------------------------------------
45 override void HandlerDeattached(Widget w)
46 {
47 GetGame().OnInputDeviceIsGamepadInvoker().Remove(OnInputDeviceIsGamepad);
48 }
49}
ArmaReforgerScripted GetGame()
Definition game.c:1398
InputManager GetInputManager()
override bool OnMouseEnter(Widget w, int x, int y)
override bool OnMouseLeave(Widget w, Widget enterW, int x, int y)