36 super.HandlerAttached(w);
60 super.HandlerDeattached(w);
95 protected void OnHoveredStart(SCR_ModularButtonComponent comp,
bool mouseInput)
98 m_Widgets.m_TitleFrameComponent.AnimationStart();
104 protected void OnHoveredEnd(SCR_ModularButtonComponent comp,
bool mouseInput)
106 m_Widgets.m_TitleFrameComponent.AnimationStop();
107 m_Widgets.m_TitleFrameComponent.ResetPosition();
114 float frameX, frameY;
115 m_Widgets.m_wTitleFrame.GetScreenSize(frameX, frameY);
117 float titleX, titleY;
118 m_Widgets.m_wTaskTitle.GetScreenSize(titleX, titleY);
120 return frameX < titleX;
130 return m_Task.GetTaskAssigneePlayerCount();
165 m_Widgets.m_wSizeFoldButton.SetVisible(
true);
174 if (taskSystem.CanProgressBeShownForTask(
m_Task))
176 float progress = taskSystem.GetTaskProgress(
m_Task);
177 m_Widgets.m_wProgressBar.SetVisible(
true);
199 Color factionColor = faction.GetFactionColor();
232 toggled = !
m_Widgets.m_wChildTaskWrapper.IsVisible();
234 m_Widgets.m_wChildTaskWrapper.SetVisible(toggled);
281 if (
m_Task.IsTaskAssignedTo(player))
290 Color color = faction.GetFactionColor();
294 m_Widgets.m_wTaskIconBackground.SetColor(color);
298 Color color = faction.GetFactionColor();
332 m_Widgets.m_wOverlayTaskStates.SetVisible(
true);
337 m_Widgets.m_wIconOverlay.SetOpacity(0.5);
338 m_Widgets.m_wIconOverlayFinished.SetVisible(
true);
344 m_Widgets.m_wIconOverlay.SetOpacity(0.5);
345 m_Widgets.m_wIconOverlayFailed.SetVisible(
true);
351 m_Widgets.m_wIconOverlay.SetOpacity(0.5);
352 m_Widgets.m_wIconOverlayCancelled.SetVisible(
true);
358 forceRefresh =
false;
360 m_Widgets.m_wOverlayTaskStates.SetVisible(
false);
448 SCR_TaskListUIComponent taskListUIComponent =
m_TaskManager.GetTaskListComponent();
449 if (taskListUIComponent && !taskListUIComponent.IsTaskVisibleInListByTab(
m_Task))
477 info.SetIconTo(
m_Widgets.m_wTaskIconSymbol);
479 m_Widgets.m_wAssigneesAmountText.SetText(
m_Task.GetTaskAssigneePlayerCount().ToString());
497 if (!backgroundColor)
506 m_Widgets.m_wTaskIconBackground.SetColor(backgroundColor);
507 m_Widgets.m_wTaskIconSymbol.SetColor(iconColor);
508 m_Widgets.m_wTaskIconOutline.SetColor(outlineColor);
534 if (imageset.IsEmpty() || name.IsEmpty())
537 m_Widgets.m_wTaskIconBackground.LoadImageFromSet(0, imageset, name);
546 m_Widgets.m_ButtonComponent.SetToggled(selected);
573 m_Widgets.m_wTaskIconSymbol.LoadImageFromSet(0, imageset, iconName);
581 m_Widgets.m_wTaskIconSymbol.LoadImageTexture(0, texture);
589 m_Widgets.m_wProgressBar.SetVisible(show);
597 m_Widgets.m_ProgressBarComponent.SetValue(progress);
605 m_Widgets.m_wAssigneesLayout.SetVisible(show);
613 m_Widgets.m_wAssigneesAmountText.SetText(assigneesCount.ToString());
627 displayCount = count.ToString();
629 m_Widgets.m_wChildTasksCountText.SetText(displayCount);
630 m_Widgets.m_wChildTasksCount.SetVisible(
true);
ArmaReforgerScripted GetGame()
void SCR_FactionManager(IEntitySource src, IEntity parent)
void SCR_Task(IEntitySource src, IEntity parent)
ScriptInvokerBase< TaskWidgetSelected > SCR_TaskWidgetSelectedInvoker
ScriptInvokerBase< TaskVisualsUpdated > SCR_TaskVisualsChangedInvoker
ScriptInvokerFloat2 GetOnProgressChanged()
Color GetOutlineFactionColor()
bool IsPlayerCommander(int playerId)
static int GetLocalPlayerId()
Returns either a valid ID of local player or 0.
void SetTaskBackground(ResourceName imageset, string name)
void SetChildCount(int count)
void SetAssigneeCount(int assigneesCount)
void OnTaskVisibilityChanged(SCR_Task task, SCR_ETaskVisibility visible)
Invoked when task visibility is changed.
void CheckTaskVisibility()
void HandleTaskState(SCR_ETaskState state, bool forceRefresh=true)
void OnProgressChanged(float change, float newProgress)
ref SCR_TaskWidgetSelectedInvoker m_OnTaskSelected
void OnDisplayDataChanged()
Invoked when task visual data is changed.
void OnTaskGroupChanged(SCR_Task task, int id)
Invoked when task group is changed.
SCR_TaskManagerUIComponent m_TaskManager
void ShowProgressBar(bool show)
void OnTaskUIVisibilityChanged(SCR_Task task, SCR_ETaskUIVisibility visible)
Invoked when task visual data is changed.
void OnTaskStateChanged(SCR_Task task, SCR_ETaskState state)
bool CheckTitleOverflow()
const int MAX_CHILD_COUNT
void SetTaskTextColor(notnull Color color)
void SetIconFactionColor()
Sets the icon color to the faction color if local player has the task assigned or local player is fac...
void SetProgressValue(float progress=-1)
void SetIcon(ResourceName imageset, string iconName)
void OnTaskEntryClicked()
Invoked when task button is clicked.
ref Color m_UnassignedTaskColor
void ShowAssigneeCount(bool show)
ref SCR_TaskListEntryWidgets m_Widgets
void OnTaskFactionChanged(SCR_Task task, FactionKey key)
Invoked when task faction is changed.
void InitTask(notnull SCR_Task task, bool hasChild=false)
void SetTaskIconColors(Color backgroundColor=null, Color iconColor=null, Color outlineColor=null)
override void HandlerAttached(Widget w)
void SetEntrySelected(bool selected)
ref Color m_BackgroundColor
void OnWrapperFolded()
Toggles child tasks fold.
ref SCR_TaskVisualsChangedInvoker m_OnTaskVisualUpdated
void SetChildWrapperFolded(SCR_ModularButtonComponent comp=null, bool toggled=-1)
Toggles child tasks fold.
void OnHoveredStart(SCR_ModularButtonComponent comp, bool mouseInput)
void UpdateTaskIconColors(Color backgroundColor=null, Color iconColor=null, Color outlineColor=null)
override void HandlerDeattached(Widget w)
void UpdateTask()
Set task icon and title to the ones set in tasks' SCR_TaskUIInfo.
void OnHoveredEnd(SCR_ModularButtonComponent comp, bool mouseInput)
SCR_TaskVisualsChangedInvoker GetOnTaskVisualChanged()
void SetVisibility(bool show)
void SetIcon(ResourceName texture)
void OnTaskAssigneeAdded(notnull SCR_Task task, SCR_TaskExecutor assignee, int requesterID)
void OnTaskOwnershipChanged(SCR_Task task, SCR_ETaskOwnership ownership)
Invoked when task ownership is changed.
static SCR_TaskManagerUIComponent GetInstance()
override bool SetNameTo(TextWidget textWidget)
SCR_FieldOfViewSettings Attribute