27 super.HandlerAttached(w);
48 m_Widgets.m_wTaskTitleButton.SetVisible(
false);
62 super.HandlerDeattached(w);
114 super.OnMouseEnter(w, x, y);
120 m_Widgets.m_wTaskTitleButton.SetVisible(
true);
126 m_Widgets.m_wAuthorLayout.SetVisible(
true);
134 super.OnMouseLeave(w, enterW, x, y);
136 m_Widgets.m_wTaskTitleButton.SetVisible(
false);
141 m_Widgets.m_wAuthorLayout.SetVisible(
false);
150 m_Widgets.m_TitleFrameComponent.AnimationStart();
159 m_Widgets.m_TitleFrameComponent.AnimationStart();
167 m_Widgets.m_TitleFrameComponent.AnimationStop();
168 m_Widgets.m_TitleFrameComponent.ResetPosition();
172 protected void OnHoveredEnd(SCR_ModularButtonComponent comp,
bool mouseInput)
174 m_Widgets.m_TitleFrameComponent.AnimationStop();
175 m_Widgets.m_TitleFrameComponent.ResetPosition();
177 GetGame().GetWorkspace().SetFocusedWidget(null);
184 float frameX, frameY;
185 m_Widgets.m_wTitleFrame.GetScreenSize(frameX, frameY);
187 float titleX, titleY;
188 m_Widgets.m_wTaskTitle.GetScreenSize(titleX, titleY);
190 bool isOverflow = frameX < titleX;
194 witdh =
m_Widgets.m_wTitleSizeLayout.GetMaxDesiredWidth();
198 m_Widgets.m_wTitleSizeLayout.SetWidthOverride(witdh);
199 m_Widgets.m_wTitleSizeLayout.EnableWidthOverride(isOverflow);
211 SCR_MapCursorModule mapCursorModule = SCR_MapCursorModule.Cast(mapEntity.
GetMapModule(SCR_MapCursorModule));
212 if (mapCursorModule && mapCursorModule.GetCursorState() & SCR_MapCursorModule.STATE_POPUP_RESTRICTED)
285 if (!
m_Widgets.m_wTaskIconBackground || !player)
291 Color color = faction.GetFactionColor();
295 m_Widgets.m_wTaskIconBackground.SetColor(color);
340 if (taskFactions && !taskFactions.IsEmpty() && !taskFactions.Contains(faction.GetFactionKey()))
357 Color factionColor = faction.GetFactionColor();
420 info.SetIconTo(
m_Widgets.m_wTaskIconSymbol);
422 m_Widgets.m_wAuthorLayout.SetVisible(
false);
424 int authorId =
m_Task.GetAuthorID();
439 if (playerManager.IsPlayerConnected(authorId))
441 playerName = playerManager.GetPlayerName(authorId);
442 platformKind = playerManager.GetPlatformKind(authorId);
443 m_Widgets.m_wMarkerAuthor.SetText(playerName);
444 m_Widgets.m_wPlatformIcon.SetVisible(
false);
448 UUID playerIdentity =
m_Task.GetAuthorIdentityID();
452 platformKind =
m_Task.GetAuthorPlatformKind();
459 if (playerController)
461 bool showIconNametag =
true;
469 settings.Get(
"m_bPlatformIconNametag", showIconNametag);
472 playerController.SetPlatformImageToKind(platformKind,
m_Widgets.m_wPlatformIcon, showOnPC: showIconNametag, showOnXbox:
true);
516 if (!backgroundColor)
525 m_Widgets.m_wTaskIconBackground.SetColor(backgroundColor);
526 m_Widgets.m_wTaskIconSymbol.SetColor(iconColor);
527 m_Widgets.m_wTaskIconOutline.SetColor(outlineColor);
536 if (imageset.IsEmpty() || name.IsEmpty())
539 m_Widgets.m_wTaskIconBackground.LoadImageFromSet(0, imageset, name);
567 m_Widgets.m_wOverlayTaskStates.SetVisible(
true);
573 m_Widgets.m_wOverlayTaskStates.SetVisible(
false);
579 m_Widgets.m_wIconOverlay.SetOpacity(0.5);
580 m_Widgets.m_wIconOverlayFinished.SetVisible(
true);
585 if (
m_Widgets.m_TaskTitleButtonComponent)
593 m_Widgets.m_wIconOverlay.SetOpacity(0.5);
594 m_Widgets.m_wIconOverlayFailed.SetVisible(
true);
600 m_Widgets.m_wIconOverlay.SetOpacity(0.5);
601 m_Widgets.m_wIconOverlayCancelled.SetVisible(
true);
610 m_Widgets.m_wAssigneesCount.SetText(
m_Task.GetTaskAssigneePlayerCount().ToString());
620 if (visible == SCR_ETaskUIVisibility.ALL || visible == SCR_ETaskUIVisibility.MAP_ONLY)
ArmaReforgerScripted GetGame()
void SCR_FactionManager(IEntitySource src, IEntity parent)
ScriptInvokerBase< ScriptInvokerVoidMethod > ScriptInvokerVoid
void SCR_Task(IEntitySource src, IEntity parent)
Color GetOutlineFactionColor()
bool IsPlayerCommander(int playerId)
SCR_MapModuleBase GetMapModule(typename moduleType)
static SCR_MapEntity GetMapInstance()
Get map entity instance.
SCR_EIconType m_eIconType
static int GetLocalPlayerId()
Returns either a valid ID of local player or 0.
static SCR_TaskManagerUIComponent GetInstance()
void OnTaskSelected(SCR_Task task)
void OnTaskAssigneeAdded(SCR_Task task, SCR_TaskExecutor assignee, int requesterID)
void HandleTaskVisibilityChange(SCR_Task task)
Invoked when task visibility is changed.
ref ScriptInvokerVoid m_OnTaskIconClick
void OnTaskVisibilityChanged(SCR_Task task, SCR_ETaskVisibility visible)
Invoked when task visibility is changed.
void SetVisibility(bool show)
void OnTaskFactionChanged(SCR_Task task, FactionKey key)
Invoked when task faction is changed.
void InitTask(notnull SCR_Task task)
ref array< ref TextWidget > m_aWidgetsToUpdate
void OnTaskGroupChanged(SCR_Task task, int id)
Invoked when task group is changed.
void OnTaskUIVisibilityChanged(SCR_Task task, SCR_ETaskUIVisibility visible)
Invoked when task visual data is changed.
bool CheckTitleOverflow()
void OnTaskOwnershipChanged(SCR_Task task, SCR_ETaskOwnership ownership)
Invoked when task ownership is changed.
void UpdateTaskIconColors(Color backgroundColor=null, Color iconColor=null, Color outlineColor=null)
void OnHoveredIconStart(SCR_ModularButtonComponent comp, bool mouseInput)
void OnPlayerNameCacheUpdate(bool success)
void SetMapMarkerAssigneeCount()
SCR_TaskManagerUIComponent m_TaskManager
ScriptInvokerVoid GetOnTaskIconClick()
void CheckTaskVisibility()
ref Color m_BackgroundColor
override bool OnMouseEnter(Widget w, int x, int y)
void SetIconFactionColor()
Sets the icon color to the faction color if local player has the task assigned or local player is fac...
void SetTask(notnull SCR_Task task)
void OnHoveredEnd(SCR_ModularButtonComponent comp, bool mouseInput)
override bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
void OnHoveredTitleEnd(SCR_ModularButtonComponent comp, bool mouseInput)
void OnDisplayDataChanged()
Handles update of task visuals.
ref array< string > m_aPlayerIdentitiesToUpdate
void SetTaskBackground(ResourceName imageset, string name)
void UpdateTaskState(SCR_Task task, SCR_ETaskState state)
void OnTaskTitleClicked()
override void HandlerDeattached(Widget w)
void OnHoveredTitleStart(SCR_ModularButtonComponent comp, bool mouseInput)
void UpdateTaskInformation()
Updates task title and icon to the one provided in task SCR_TaskUIInfo.
SCR_TaskSystem m_TaskSystem
void UpdatePlayerNameCache()
Requests update of player name cache if requested by m_bRequestPlayerNameCacheUpdate.
override void HandlerAttached(Widget w)
void SetTaskIconColors(Color backgroundColor=null, Color iconColor=null, Color outlineColor=null)
ref SCR_TaskMapWidgets m_Widgets
bool m_bRequestPlayerNameCacheUpdate
override bool SetNameTo(TextWidget textWidget)
proto external PlayerController GetPlayerController()