Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_AttributesButtonEditorUIComponent.c
Go to the documentation of this file.
2 {
3  [Attribute("0", uiwidget: UIWidgets.ComboBox, "Attribute target type.", enums: { ParamEnum("Global", "0"), ParamEnum("Camera", "1"), ParamEnum("FactionsOnly", "2") })]
4  protected int m_iTarget;
5 
6  [Attribute(desc: "Config of the category that should be selected upon opening attribute window.", params: "conf class=SCR_EditorAttributeCategory")]
7  protected ResourceName m_Category;
8 
9  protected void OnButtonAction()
10  {
11  SCR_AttributesManagerEditorComponent attributesManager = SCR_AttributesManagerEditorComponent.Cast(SCR_AttributesManagerEditorComponent.GetInstance(SCR_AttributesManagerEditorComponent));
12  if (!attributesManager)
13  return;
14 
15  if (m_Category)
16  attributesManager.SetCurrentCategory(m_Category);
17 
18  switch (m_iTarget)
19  {
20  case 0:
21  attributesManager.StartEditing(GetGame().GetGameMode());
22  break;
23  case 1:
24  attributesManager.StartEditing(SCR_CameraEditorComponent.GetCameraInstance());
25  break;
26  case 2:
27  attributesManager.StartEditing(GetTaskManager());
28  break;
29  }
30  }
31 
32  override bool IsUnique()
33  {
34  return false;
35  }
36 
37  override void HandlerAttachedScripted(Widget w)
38  {
40  if (navButton)
41  navButton.m_OnActivated.Insert(OnButtonAction);
42  else
43  ButtonActionComponent.GetOnAction(w, true).Insert(OnButtonAction);
44  }
45 };
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
SCR_CameraEditorComponent
Definition: SCR_CameraEditorComponent.c:13
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
GetGameMode
SCR_BaseGameMode GetGameMode()
Definition: SCR_BaseGameModeComponent.c:15
Attribute
typedef Attribute
Post-process effect of scripted camera.
GetTaskManager
SCR_BaseTaskManager GetTaskManager()
Definition: SCR_BaseTaskManager.c:7
ButtonActionComponent
Component to execute action when the button or its shortcut is pressed.
Definition: ButtonActionComponent.c:2
SCR_BaseEditorUIComponent
Definition: SCR_BaseEditorUIComponent.c:3
SCR_AttributesButtonEditorUIComponent
Definition: SCR_AttributesButtonEditorUIComponent.c:1
params
Configs ServerBrowser KickDialogs params
Definition: SCR_NotificationSenderComponent.c:24
SCR_InputButtonComponent
Definition: SCR_InputButtonComponent.c:1