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_ViewProfileButtonComponent.c
Go to the documentation of this file.
1
// Simple class to change the view profile button label automatically
2
class
SCR_ViewProfileButtonComponent
:
SCR_ScriptedWidgetComponent
3
{
4
protected
static
const
string
PROFILE_BUTTON_TEXT
=
"#AR-PlayerLists_ShowProfile"
;
5
protected
static
const
string
PROFILE_BUTTON_TEXT_CONSOLE
=
"#AR-PlayerLists_ShowGamercard"
;
6
7
protected
SCR_InputButtonComponent
m_ViewProfile
;
8
9
//------------------------------------------------------------------------------------------------
10
override
void
HandlerAttached
(
Widget
w)
11
{
12
super.HandlerAttached(w);
13
14
Init
();
15
}
16
17
//------------------------------------------------------------------------------------------------
19
void
Init
()
20
{
21
m_ViewProfile
=
SCR_InputButtonComponent
.
FindComponent
(
GetRootWidget
());
22
if
(!
m_ViewProfile
)
23
return
;
24
25
string
label =
PROFILE_BUTTON_TEXT
;
26
27
if
(
GetGame
().
IsPlatformGameConsole
() &&
GetGame
().GetPlatformService().GetLocalPlatformKind() !=
PlatformKind
.PSN)
28
label =
PROFILE_BUTTON_TEXT_CONSOLE
;
29
30
m_ViewProfile
.SetLabel(label);
31
}
32
}
IsPlatformGameConsole
bool IsPlatformGameConsole()
Definition
game.c:1357
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
PlatformKind
PlatformKind
Definition
PlatformKind.c:8
SCR_InputButtonComponent
Definition
SCR_InputButtonComponent.c:2
SCR_InputButtonComponent::FindComponent
static SCR_InputButtonComponent FindComponent(notnull Widget w)
Definition
SCR_InputButtonComponent.c:1078
SCR_ScriptedWidgetComponent
Definition
SCR_ScriptedWidgetComponent.c:8
SCR_ScriptedWidgetComponent::GetRootWidget
Widget GetRootWidget()
Definition
SCR_ScriptedWidgetComponent.c:51
SCR_ViewProfileButtonComponent
Definition
SCR_ViewProfileButtonComponent.c:3
SCR_ViewProfileButtonComponent::Init
void Init()
Definition
SCR_ViewProfileButtonComponent.c:19
SCR_ViewProfileButtonComponent::HandlerAttached
override void HandlerAttached(Widget w)
Definition
SCR_ViewProfileButtonComponent.c:10
SCR_ViewProfileButtonComponent::m_ViewProfile
SCR_InputButtonComponent m_ViewProfile
Definition
SCR_ViewProfileButtonComponent.c:7
SCR_ViewProfileButtonComponent::PROFILE_BUTTON_TEXT_CONSOLE
static const string PROFILE_BUTTON_TEXT_CONSOLE
Definition
SCR_ViewProfileButtonComponent.c:5
SCR_ViewProfileButtonComponent::PROFILE_BUTTON_TEXT
static const string PROFILE_BUTTON_TEXT
Definition
SCR_ViewProfileButtonComponent.c:4
Widget
Definition
Widget.c:13
scripts
Game
UI
Components
ButtonComponents
SCR_ViewProfileButtonComponent.c
Generated by
1.17.0