Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_TaskCompleteDescriptionTooltipDetail.c
Go to the documentation of this file.
3 {
4  [Attribute()]
5  protected LocalizedString m_sManualCompleteOnlyText;
6 
7  [Attribute(defvalue: "255,255,255,255", desc: "Color of images within the notification message")]
8  protected ref Color m_cManualCompleteColor;
9 
10  protected SCR_EditorTask m_Task;
11  protected RichTextWidget m_Text;
12 
13  protected ref Color m_cDefaultColor;
14 
15  //------------------------------------------------------------------------------------------------
16  override void UpdateDetail(SCR_EditableEntityComponent entity)
17  {
18  if (m_Task.GetTaskCompletionType() == EEditorTaskCompletionType.MANUAL || m_Task.GetTaskCompletionType() == EEditorTaskCompletionType.ALWAYS_MANUAL)
19  {
20  m_Text.SetText(m_sManualCompleteOnlyText);
21  m_Text.SetColor(m_cManualCompleteColor);
22  }
23  else
24  {
25  m_Text.SetText(m_Task.GetDescription());
26  m_Text.SetColor(m_cDefaultColor);
27  }
28  }
29 
30  //------------------------------------------------------------------------------------------------
31  override bool InitDetail(SCR_EditableEntityComponent entity, Widget widget)
32  {
33  m_Text = RichTextWidget.Cast(widget);
34  if (!m_Text)
35  return false;
36 
37  m_Task = SCR_EditorTask.Cast(entity.GetOwner());
38  if (!SCR_EditorTask)
39  return false;
40 
41  if (m_Task.GetTaskCompletionType() != EEditorTaskCompletionType.MANUAL && m_Task.GetTaskCompletionType() != EEditorTaskCompletionType.ALWAYS_MANUAL)
42  {
43  //~ If the same as description do not show
44  if (entity.GetInfo().GetDescription() == m_Task.GetDescription())
45  return false;
46  }
47 
48  m_cDefaultColor = m_Text.GetColor();
49 
50  return true;
51  }
52 }
m_Task
SCR_EditableTaskComponentClass m_Task
Editable SCR_BaseTask.
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
BaseContainerCustomTitleField
class SCR_KeyBindingFilter BaseContainerCustomTitleField("m_sBindString")
Definition: SCR_KeyBindingMenuConfig.c:113
Attribute
typedef Attribute
Post-process effect of scripted camera.
SCR_EditorTask
Definition: SCR_EditorTask.c:7
SCR_EntityTooltipDetail
Definition: SCR_EntityTooltipDetail.c:2
SCR_EditableEntityComponent
Definition: SCR_EditableEntityComponent.c:13
EEditorTaskCompletionType
EEditorTaskCompletionType
Way of determening if a task is completed automaticly, manually or always manually (In the latter cas...
Definition: EEditorTaskCompletionType.c:2
SCR_TaskCompleteDescriptionTooltipDetail
Definition: SCR_TaskCompleteDescriptionTooltipDetail.c:2
LocalizedString
Definition: LocalizedString.c:21
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition: SCR_AIGoalReaction.c:468