Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_DeviceSpecificComponent.c
Go to the documentation of this file.
1
class
SCR_DeviceSpecificComponent
:
ScriptedWidgetComponent
2
{
3
[
Attribute
(
"0"
,
UIWidgets
.Auto,
""
)]
4
private
bool
m_bControllerOnly;
5
6
private
Widget
m_Widget;
7
8
protected
void
OnInputDeviceIsGamepad
(
bool
isGamepad)
9
{
10
bool
enable = m_bControllerOnly == isGamepad;
11
m_Widget.SetEnabled(enable);
12
m_Widget.SetVisible(enable);
13
}
14
override
void
HandlerAttached
(
Widget
w)
15
{
16
if
(
SCR_Global
.
IsEditMode
())
return
;
17
18
m_Widget = w;
19
20
OnInputDeviceIsGamepad
(!
GetGame
().
GetInputManager
().IsUsingMouseAndKeyboard());
21
GetGame
().OnInputDeviceIsGamepadInvoker().Insert(
OnInputDeviceIsGamepad
);
22
}
23
override
void
HandlerDeattached
(
Widget
w)
24
{
25
if
(
SCR_Global
.
IsEditMode
())
return
;
26
27
GetGame
().OnInputDeviceIsGamepadInvoker().Remove(
OnInputDeviceIsGamepad
);
28
}
29
};
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
GetInputManager
InputManager GetInputManager()
Definition
SCR_BaseManualCameraComponent.c:205
SCR_DeviceSpecificComponent
Definition
SCR_DeviceSpecificComponent.c:2
SCR_DeviceSpecificComponent::OnInputDeviceIsGamepad
void OnInputDeviceIsGamepad(bool isGamepad)
Definition
SCR_DeviceSpecificComponent.c:8
SCR_DeviceSpecificComponent::HandlerAttached
override void HandlerAttached(Widget w)
Definition
SCR_DeviceSpecificComponent.c:14
SCR_DeviceSpecificComponent::HandlerDeattached
override void HandlerDeattached(Widget w)
Definition
SCR_DeviceSpecificComponent.c:23
SCR_Global
Definition
Functions.c:7
SCR_Global::IsEditMode
static bool IsEditMode()
Definition
Functions.c:1566
ScriptedWidgetComponent
Definition
ScriptedWidgetComponent.c:13
UIWidgets
Definition
attributes.c:40
Widget
Definition
Widget.c:13
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
UI
Components
SCR_DeviceSpecificComponent.c
Generated by
1.17.0