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_ModdedScenarioComponent.c
Go to the documentation of this file.
1
//------------------------------------------------------------------------------------------------
2
class
SCR_ModdedScenarioComponent
:
SCR_ButtonComponent
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
return
false
;
44
}
45
46
};
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
GetInputManager
InputManager GetInputManager()
Definition
SCR_BaseManualCameraComponent.c:205
m_wRoot
Widget m_wRoot
Definition
SCR_GameModeCleanSweep.c:25
SCR_ButtonBaseComponent::m_OnFocus
ref ScriptInvoker< Widget > m_OnFocus
Definition
SCR_ButtonBaseComponent.c:56
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:5
SCR_ButtonComponent::COLOR_CONTENT_HOVERED
ref Color COLOR_CONTENT_HOVERED
Definition
SCR_ButtonComponent.c:18
SCR_ButtonComponent::ColorizeWidgets
void ColorizeWidgets(Color colorBackground, Color colorContent, float speed=-1)
Definition
SCR_ButtonComponent.c:129
SCR_ButtonComponent::COLOR_BACKGROUND_HOVERED
ref Color COLOR_BACKGROUND_HOVERED
Definition
SCR_ButtonComponent.c:13
SCR_ButtonSplitComponent
Definition
SCR_ButtonSplitComponent.c:6
SCR_ModdedScenarioComponent
Definition
SCR_ModdedScenarioComponent.c:3
SCR_ModdedScenarioComponent::m_wPlayablePC
Widget m_wPlayablePC
Definition
SCR_ModdedScenarioComponent.c:4
SCR_ModdedScenarioComponent::OnInputDeviceIsGamepad
void OnInputDeviceIsGamepad(bool isGamepad)
Definition
SCR_ModdedScenarioComponent.c:26
SCR_ModdedScenarioComponent::OnFocus
override bool OnFocus(Widget w, int x, int y)
Definition
SCR_ModdedScenarioComponent.c:38
SCR_ModdedScenarioComponent::OnMouseButtonDown
override bool OnMouseButtonDown(Widget w, int x, int y, int button)
Definition
SCR_ModdedScenarioComponent.c:32
SCR_ModdedScenarioComponent::m_pButton
ref SCR_ButtonSplitComponent m_pButton
Definition
SCR_ModdedScenarioComponent.c:5
SCR_ModdedScenarioComponent::HandlerAttached
override void HandlerAttached(Widget w)
Definition
SCR_ModdedScenarioComponent.c:8
SCR_ModdedScenarioComponent::HandlerDeattached
override void HandlerDeattached(Widget w)
Definition
SCR_ModdedScenarioComponent.c:20
Widget
Definition
Widget.c:13
scripts
Game
UI
Components
SCR_ModdedScenarioComponent.c
Generated by
1.17.0