Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_ViewProfileButtonComponent.c
Go to the documentation of this file.
1 // Simple class to change the view profile button label automatically
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;
27  label = PROFILE_BUTTON_TEXT_CONSOLE;
28 
29  m_ViewProfile.SetLabel(label);
30  }
31 }
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
IsPlatformGameConsole
bool IsPlatformGameConsole()
Definition: game.c:1393
GetRootWidget
Widget GetRootWidget()
Definition: SCR_UITaskManagerComponent.c:160
SCR_ScriptedWidgetComponent
Definition: SCR_ScriptedWidgetComponent.c:7
SCR_ViewProfileButtonComponent
Definition: SCR_ViewProfileButtonComponent.c:2
SCR_InputButtonComponent
Definition: SCR_InputButtonComponent.c:1