Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_TaskMapUIComponent.c
Go to the documentation of this file.
2{
3 protected ref Color m_IconColor;
4 protected ref Color m_OutlineColor;
5 protected ref Color m_BackgroundColor;
6 protected ref Color m_FactionColor;
7
8 protected SCR_Task m_Task;
10
11 protected bool m_bEnableContext;
12 protected bool m_bSelected;
13 protected bool m_bDisplayAssigned = 1;
14 protected bool m_bShowAuthor;
15
17 protected ref array<string> m_aPlayerIdentitiesToUpdate = {};
18 protected ref array<ref TextWidget> m_aWidgetsToUpdate = {};
19
23
24 //------------------------------------------------------------------------------------------------
25 override void HandlerAttached(Widget w)
26 {
27 super.HandlerAttached(w);
28
29 m_Widgets.Init(w);
30
31 if (m_Widgets.m_TaskIconButtonComponent)
32 {
33 m_Widgets.m_TaskIconButtonComponent.m_OnMouseEnter.Insert(OnHoveredIconStart);
34 m_Widgets.m_TaskIconButtonComponent.m_OnMouseLeave.Insert(OnHoveredEnd);
35 m_Widgets.m_TaskIconButtonComponent.m_OnClicked.Insert(OnTaskIconClicked);
36 }
37
38 if (m_Widgets.m_TaskTitleButtonComponent)
39 {
40 m_Widgets.m_TaskTitleButtonComponent.m_OnClicked.Insert(OnTaskTitleClicked);
41 m_Widgets.m_TaskTitleButtonComponent.m_OnMouseLeave.Insert(OnHoveredTitleEnd);
42 m_Widgets.m_TaskTitleButtonComponent.m_OnMouseEnter.Insert(OnHoveredTitleStart);
43 }
44
46
47 if (m_Widgets.m_wTaskTitleButton)
48 m_Widgets.m_wTaskTitleButton.SetVisible(false);
49
51 if (m_TaskManager)
52 {
53 m_TaskManager.GetOnTaskColorsUpdated().Insert(SetTaskIconColors);
54 m_TaskManager.GetOnTaskBackgroundUpdated().Insert(SetTaskBackground);
55 m_bDisplayAssigned = m_TaskManager.GetDisplayAssigneesOnMap();
56 }
57 }
58
59 //------------------------------------------------------------------------------------------------
60 override void HandlerDeattached(Widget w)
61 {
62 super.HandlerDeattached(w);
63
64 if (m_Widgets.m_TaskIconButtonComponent)
65 {
66 m_Widgets.m_TaskIconButtonComponent.m_OnMouseEnter.Remove(OnHoveredIconStart);
67 m_Widgets.m_TaskIconButtonComponent.m_OnMouseLeave.Remove(OnHoveredEnd);
68 m_Widgets.m_TaskIconButtonComponent.m_OnClicked.Remove(OnTaskIconClicked);
69 }
70
71 if (m_Widgets.m_TaskTitleButtonComponent)
72 {
73 m_Widgets.m_TaskTitleButtonComponent.m_OnClicked.Remove(OnTaskTitleClicked);
74 m_Widgets.m_TaskTitleButtonComponent.m_OnMouseLeave.Remove(OnHoveredTitleEnd);
75 m_Widgets.m_TaskTitleButtonComponent.m_OnMouseEnter.Remove(OnHoveredTitleStart);
76 }
77
78 if (!m_Task)
79 return;
80
81 m_Task.GetOnTaskStateChanged().Remove(UpdateTaskState);
82 m_Task.GetOnTaskAssigneeAdded().Remove(OnTaskAssigneeAdded);
83 m_Task.GetOnTaskAssigneeRemoved().Remove(OnTaskAssigneeAdded);
84 m_Task.GetOnDisplayDataChanged().Remove(OnDisplayDataChanged);
85 m_Task.GetOnTaskUIVisibilityChanged().Remove(OnTaskUIVisibilityChanged);
86 m_Task.GetOnTaskVisibilityChanged().Remove(OnTaskVisibilityChanged);
87 m_Task.GetOnTaskOwnershipChanged().Remove(OnTaskOwnershipChanged);
88 m_Task.GetOnOwnerFactionAdded().Remove(OnTaskFactionChanged);
89 m_Task.GetOnOwnerFactionRemoved().Remove(OnTaskFactionChanged);
90 m_Task.GetOnOwnerGroupAdded().Remove(OnTaskGroupChanged);
91 m_Task.GetOnOwnerGroupRemoved().Remove(OnTaskGroupChanged);
92
93 if (m_TaskManager)
94 {
95 m_TaskManager.GetOnTaskColorsUpdated().Remove(SetTaskIconColors);
96 m_TaskManager.GetOnTaskBackgroundUpdated().Remove(SetTaskBackground);
97 }
98 }
99
100 //------------------------------------------------------------------------------------------------
103 override vector GetPos()
104 {
105 if (!m_TaskSystem || !m_Task)
106 return vector.Zero;
107
108 return m_TaskSystem.GetTaskLocation(m_Task);
109 }
110
111 //------------------------------------------------------------------------------------------------
112 override bool OnMouseEnter(Widget w, int x, int y)
113 {
114 super.OnMouseEnter(w, x, y);
115
116 if (w != m_Widgets.m_wTaskIconButton)
117 return false;
118
119 m_bEnableContext = true;
120 m_Widgets.m_wTaskTitleButton.SetVisible(true);
121 m_Widgets.m_wAssignedPlayers.SetVisible(m_bDisplayAssigned);
122
123 m_wRoot.Update();
124 m_TaskManager.SetHoveredTask(m_Task);
125 if (m_bShowAuthor)
126 m_Widgets.m_wAuthorLayout.SetVisible(true);
127
128 return false;
129 }
130
131 //------------------------------------------------------------------------------------------------
132 override bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
133 {
134 super.OnMouseLeave(w, enterW, x, y);
135
136 m_Widgets.m_wTaskTitleButton.SetVisible(false);
137
138 m_bEnableContext = false;
139 m_TaskManager.SetHoveredTask(null);
140 if (m_bShowAuthor)
141 m_Widgets.m_wAuthorLayout.SetVisible(false);
142
143 return false;
144 }
145
146 //------------------------------------------------------------------------------------------------
147 protected void OnHoveredIconStart(SCR_ModularButtonComponent comp, bool mouseInput)
148 {
149 if (CheckTitleOverflow())
150 m_Widgets.m_TitleFrameComponent.AnimationStart();
151
152 GetGame().GetWorkspace().SetFocusedWidget(m_Widgets.m_wTaskIconButton);
153 }
154
155 //------------------------------------------------------------------------------------------------
156 protected void OnHoveredTitleStart(SCR_ModularButtonComponent comp, bool mouseInput)
157 {
158 if (CheckTitleOverflow())
159 m_Widgets.m_TitleFrameComponent.AnimationStart();
160
161 GetGame().GetWorkspace().SetFocusedWidget(m_Widgets.m_wTaskTitleButton);
162 }
163
164 //------------------------------------------------------------------------------------------------
165 protected void OnHoveredTitleEnd(SCR_ModularButtonComponent comp, bool mouseInput)
166 {
167 m_Widgets.m_TitleFrameComponent.AnimationStop();
168 m_Widgets.m_TitleFrameComponent.ResetPosition();
169 }
170
171 //------------------------------------------------------------------------------------------------
172 protected void OnHoveredEnd(SCR_ModularButtonComponent comp, bool mouseInput)
173 {
174 m_Widgets.m_TitleFrameComponent.AnimationStop();
175 m_Widgets.m_TitleFrameComponent.ResetPosition();
176
177 GetGame().GetWorkspace().SetFocusedWidget(null);
178 }
179
180 //------------------------------------------------------------------------------------------------
182 protected bool CheckTitleOverflow()
183 {
184 float frameX, frameY;
185 m_Widgets.m_wTitleFrame.GetScreenSize(frameX, frameY);
186
187 float titleX, titleY;
188 m_Widgets.m_wTaskTitle.GetScreenSize(titleX, titleY);
189
190 bool isOverflow = frameX < titleX;
191
192 float witdh;
193 if (isOverflow)
194 witdh = m_Widgets.m_wTitleSizeLayout.GetMaxDesiredWidth();
195 else
196 witdh = 0;
197
198 m_Widgets.m_wTitleSizeLayout.SetWidthOverride(witdh);
199 m_Widgets.m_wTitleSizeLayout.EnableWidthOverride(isOverflow);
200
201 return isOverflow;
202 }
203
204 //------------------------------------------------------------------------------------------------
205 // Sets task as selected on task icon click
206 protected void OnTaskIconClicked()
207 {
209 if (mapEntity)
210 {
211 SCR_MapCursorModule mapCursorModule = SCR_MapCursorModule.Cast(mapEntity.GetMapModule(SCR_MapCursorModule));
212 if (mapCursorModule && mapCursorModule.GetCursorState() & SCR_MapCursorModule.STATE_POPUP_RESTRICTED)
213 return;
214 }
215
216 if (!m_Task)
217 return;
218
220 m_OnTaskIconClick.Invoke();
221
222 if (m_bSelected)
223 {
224 m_bSelected = false;
226 }
227 else if (m_TaskManager)
228 {
229 m_TaskManager.SetSelectedTask(m_Task);
230 m_TaskManager.SetTaskListVisibility(true);
231 }
232 }
233
234 //------------------------------------------------------------------------------------------------
235 // Assigns task on task title click
236 protected void OnTaskTitleClicked()
237 {
238 if (m_Task && m_TaskManager)
239 m_TaskManager.AssignTask(m_Task);
240 }
241
242 //------------------------------------------------------------------------------------------------
243 // Sets task visuals to selected state
246 {
247 if (!m_TaskManager || !m_Task)
248 return;
249
250 if (task == m_Task)
251 {
252 UpdateTaskIconColors(UIColors.CONTRAST_COLOR);
253 return;
254 }
255
256 int playerID = SCR_PlayerController.GetLocalPlayerId();
257 SCR_TaskExecutor player = SCR_TaskExecutor.FromPlayerID(playerID);
258 if (!player)
259 return;
260
261 SCR_Faction faction = SCR_Faction.Cast(SCR_FactionManager.SGetPlayerFaction(playerID));
262 if (m_Task.IsTaskAssignedTo(player) || (faction && faction.IsPlayerCommander(playerID) && m_Task.GetTaskAssigneeCount() > 0))
263 {
265 return;
266 }
267
269 }
270
271 //------------------------------------------------------------------------------------------------
276 protected void OnTaskAssigneeAdded(SCR_Task task, SCR_TaskExecutor assignee, int requesterID)
277 {
278 if (!m_Task || !m_TaskSystem)
279 return;
280
282
283 int playerID = SCR_PlayerController.GetLocalPlayerId();
284 SCR_TaskExecutor player = SCR_TaskExecutor.FromPlayerID(playerID);
285 if (!m_Widgets.m_wTaskIconBackground || !player)
286 return;
287
288 SCR_Faction faction = SCR_Faction.Cast(SCR_FactionManager.SGetPlayerFaction(playerID));
289 if (faction && (m_Task.IsTaskAssignedTo(player) || (faction.IsPlayerCommander(playerID) && m_Task.GetTaskAssigneeCount() > 0)))
290 {
291 Color color = faction.GetFactionColor();
292 if (!color)
293 return;
294
295 m_Widgets.m_wTaskIconBackground.SetColor(color);
296 }
297 else
298 {
299 if (m_Task == m_TaskManager.GetSelectedTask())
300 {
301 UpdateTaskIconColors(UIColors.CONTRAST_COLOR);
302 return;
303 }
304
305 m_Widgets.m_wTaskIconBackground.SetColor(m_BackgroundColor);
306 }
307 }
308
309 //------------------------------------------------------------------------------------------------
319
320 //------------------------------------------------------------------------------------------------
323 void InitTask(notnull SCR_Task task)
324 {
325 m_Task = task;
326
327 m_TaskSystem = SCR_TaskSystem.GetInstance();
328 if (!m_TaskSystem && !m_TaskSystem.IsTaskVisibleOnMap(task))
329 return;
330
331 GetGame().GetCallqueue().Call(CheckTaskVisibility);
332
333 int playerID = SCR_PlayerController.GetLocalPlayerId();
334
335 SCR_Faction faction = SCR_Faction.Cast(SCR_FactionManager.SGetPlayerFaction(playerID));
336 if (!faction)
337 return;
338
339 array<string> taskFactions = m_TaskSystem.GetTaskFactions(task);
340 if (taskFactions && !taskFactions.IsEmpty() && !taskFactions.Contains(faction.GetFactionKey()))
341 return;
342
344 SetTask(task);
345 }
346
347 //------------------------------------------------------------------------------------------------
350 {
351 int playerID = SCR_PlayerController.GetLocalPlayerId();
352
353 SCR_Faction faction = SCR_Faction.Cast(SCR_FactionManager.SGetPlayerFaction(playerID));
354 if (!faction)
355 return;
356
357 Color factionColor = faction.GetFactionColor();
358 if (factionColor)
359 m_FactionColor = factionColor;
360
361 Color color = faction.GetOutlineFactionColor();
362 if (color)
363 {
364 m_IconColor = color;
365 m_OutlineColor = color;
366 }
367
368 m_BackgroundColor = UIColors.NEUTRAL_INFORMATION;
369
370 SCR_TaskExecutor player = SCR_TaskExecutor.FromPlayerID(playerID);
371 if (!player)
372 return;
373
374 if (m_FactionColor && (m_Task.IsTaskAssignedTo(player) || (faction.IsPlayerCommander(playerID) && m_Task.GetTaskAssigneeCount() > 0)))
376 else
378 }
379
380 //------------------------------------------------------------------------------------------------
381 void SetTask(notnull SCR_Task task)
382 {
383 m_Task = task;
384
387
389
390 m_Task.GetOnTaskStateChanged().Insert(UpdateTaskState);
391 m_Task.GetOnTaskAssigneeAdded().Insert(OnTaskAssigneeAdded);
392 m_Task.GetOnTaskAssigneeRemoved().Insert(OnTaskAssigneeAdded);
393 m_Task.GetOnDisplayDataChanged().Insert(OnDisplayDataChanged);
394 m_Task.GetOnTaskUIVisibilityChanged().Insert(OnTaskUIVisibilityChanged);
395 m_Task.GetOnTaskVisibilityChanged().Insert(OnTaskVisibilityChanged);
396 m_Task.GetOnTaskOwnershipChanged().Insert(OnTaskOwnershipChanged);
397 m_Task.GetOnOwnerFactionAdded().Insert(OnTaskFactionChanged);
398 m_Task.GetOnOwnerFactionRemoved().Insert(OnTaskFactionChanged);
399 m_Task.GetOnOwnerGroupAdded().Insert(OnTaskGroupChanged);
400 m_Task.GetOnOwnerGroupRemoved().Insert(OnTaskGroupChanged);
401
402 if (m_TaskManager)
403 m_TaskManager.GetOnTaskSelected().Insert(OnTaskSelected);
404
405 UpdateTaskState(m_Task, m_Task.GetTaskState());
406 }
407
408 //------------------------------------------------------------------------------------------------
410 protected void UpdateTaskInformation()
411 {
412 if (!m_Task)
413 return;
414
415 SCR_TaskUIInfo info = m_Task.GetTaskUIInfo();
416 if (!info)
417 return;
418
419 info.SetNameTo(m_Widgets.m_wTaskTitle);
420 info.SetIconTo(m_Widgets.m_wTaskIconSymbol);
421
422 m_Widgets.m_wAuthorLayout.SetVisible(false);
423
424 int authorId = m_Task.GetAuthorID();
425 m_bShowAuthor = false;
426
427 if (authorId <= 0)
428 {
429 //add here something if authorId is not valid and still you want to show Author
430 return;
431 }
432 // authorId is valid
433
434 PlayerManager playerManager = GetGame().GetPlayerManager();
435 m_bShowAuthor = true;
436 string playerName;
437 PlatformKind platformKind;
438
439 if (playerManager.IsPlayerConnected(authorId)) // author is in the session
440 {
441 playerName = playerManager.GetPlayerName(authorId);
442 platformKind = playerManager.GetPlatformKind(authorId);
443 m_Widgets.m_wMarkerAuthor.SetText(playerName);
444 m_Widgets.m_wPlatformIcon.SetVisible(false);
445 }
446 else // author left the session
447 {
448 UUID playerIdentity = m_Task.GetAuthorIdentityID();
450 m_aPlayerIdentitiesToUpdate.InsertAt(playerIdentity, 0);
451 m_aWidgetsToUpdate.InsertAt(m_Widgets.m_wMarkerAuthor, 0);
452 platformKind = m_Task.GetAuthorPlatformKind();
453 }
454
455 // TODO: correct platformKind does not work for author out of the session, needs to be reworked with better identity manager handling
456 if (platformKind != PlatformKind.NONE)
457 {
459 if (playerController)
460 {
461 bool showIconNametag = true;
462
463 // Always show on PSN
464 PlatformKind ownPlatformKind = GetGame().GetPlayerManager().GetPlatformKind(playerController.GetLocalPlayerId());
465 if (ownPlatformKind == PlatformKind.STEAM)
466 {
467 BaseContainer settings = GetGame().GetGameUserSettings().GetModule("SCR_GameplaySettings");
468 if (settings)
469 settings.Get("m_bPlatformIconNametag", showIconNametag);
470 }
471
472 playerController.SetPlatformImageToKind(platformKind, m_Widgets.m_wPlatformIcon, showOnPC: showIconNametag, showOnXbox: true);
473 }
474 }
475 }
476
477 //------------------------------------------------------------------------------------------------
478 protected void OnPlayerNameCacheUpdate(bool success)
479 {
480 PlayerManager playerManager = GetGame().GetPlayerManager();
481 if (m_aPlayerIdentitiesToUpdate.IsEmpty())
482 {
483 PlayerManager.s_OnPlayerNameCacheUpdateInvoker.Remove(OnPlayerNameCacheUpdate);
484 return;
485 }
486
487 int lastIndex = m_aPlayerIdentitiesToUpdate.Count() - 1;
488 string playerName = playerManager.GetPlayerNameByIdentity(m_aPlayerIdentitiesToUpdate[lastIndex]);
489 m_aWidgetsToUpdate[lastIndex].SetText(playerName);
490 m_aPlayerIdentitiesToUpdate.Remove(lastIndex);
491 m_aWidgetsToUpdate.Remove(lastIndex);
492
493 if (lastIndex == 0)
494 PlayerManager.s_OnPlayerNameCacheUpdateInvoker.Remove(OnPlayerNameCacheUpdate);
495 }
496
497 //------------------------------------------------------------------------------------------------
499 protected void UpdatePlayerNameCache()
500 {
502 return;
503
504 PlayerManager.s_OnPlayerNameCacheUpdateInvoker.Insert(OnPlayerNameCacheUpdate);
505 PlayerManager.RequestPlayerNameCacheUpdate(m_aPlayerIdentitiesToUpdate);
507 }
508
509 //------------------------------------------------------------------------------------------------
514 void UpdateTaskIconColors(Color backgroundColor = null, Color iconColor = null, Color outlineColor = null)
515 {
516 if (!backgroundColor)
517 backgroundColor = m_BackgroundColor;
518
519 if (!iconColor)
520 iconColor = m_IconColor;
521
522 if (!outlineColor)
523 outlineColor = m_OutlineColor;
524
525 m_Widgets.m_wTaskIconBackground.SetColor(backgroundColor);
526 m_Widgets.m_wTaskIconSymbol.SetColor(iconColor);
527 m_Widgets.m_wTaskIconOutline.SetColor(outlineColor);
528 }
529
530 //------------------------------------------------------------------------------------------------
534 void SetTaskBackground(ResourceName imageset, string name)
535 {
536 if (imageset.IsEmpty() || name.IsEmpty())
537 return;
538
539 m_Widgets.m_wTaskIconBackground.LoadImageFromSet(0, imageset, name);
540 }
541
542 //------------------------------------------------------------------------------------------------
547 void SetTaskIconColors(Color backgroundColor = null, Color iconColor = null, Color outlineColor = null)
548 {
549 if (backgroundColor)
550 m_BackgroundColor = backgroundColor;
551
552 if (iconColor)
553 m_IconColor = iconColor;
554
555 if (outlineColor)
556 m_OutlineColor = outlineColor;
557 }
558
559 //------------------------------------------------------------------------------------------------
563 {
564 if (m_Task != task)
565 return;
566
567 m_Widgets.m_wOverlayTaskStates.SetVisible(true);
568 switch (state)
569 {
570 case SCR_ETaskState.CREATED:
571 {
572 m_Widgets.m_wIconOverlay.SetOpacity(1);
573 m_Widgets.m_wOverlayTaskStates.SetVisible(false);
574 break;
575 }
576
577 case SCR_ETaskState.COMPLETED:
578 {
579 m_Widgets.m_wIconOverlay.SetOpacity(0.5);
580 m_Widgets.m_wIconOverlayFinished.SetVisible(true);
581
582 if (m_Widgets.m_TaskIconButtonComponent)
583 m_Widgets.m_TaskIconButtonComponent.m_OnClicked.Remove(OnTaskIconClicked);
584
585 if (m_Widgets.m_TaskTitleButtonComponent)
586 m_Widgets.m_TaskTitleButtonComponent.m_OnClicked.Remove(OnTaskTitleClicked);
587
588 break;
589 }
590
591 case SCR_ETaskState.FAILED:
592 {
593 m_Widgets.m_wIconOverlay.SetOpacity(0.5);
594 m_Widgets.m_wIconOverlayFailed.SetVisible(true);
595 break;
596 }
597
598 case SCR_ETaskState.CANCELLED:
599 {
600 m_Widgets.m_wIconOverlay.SetOpacity(0.5);
601 m_Widgets.m_wIconOverlayCancelled.SetVisible(true);
602 break;
603 }
604 }
605 }
606
607 //------------------------------------------------------------------------------------------------
609 {
610 m_Widgets.m_wAssigneesCount.SetText(m_Task.GetTaskAssigneePlayerCount().ToString());
611 }
612
613 //------------------------------------------------------------------------------------------------
615 protected void OnTaskUIVisibilityChanged(SCR_Task task, SCR_ETaskUIVisibility visible)
616 {
617 if (m_Task != task)
618 return;
619
620 if (visible == SCR_ETaskUIVisibility.ALL || visible == SCR_ETaskUIVisibility.MAP_ONLY)
621 SetVisibility(true);
622 else
623 SetVisibility(false);
624 }
625
626 //------------------------------------------------------------------------------------------------
632
633 //------------------------------------------------------------------------------------------------
635 protected void OnTaskOwnershipChanged(SCR_Task task, SCR_ETaskOwnership ownership)
636 {
638 }
639
640 //------------------------------------------------------------------------------------------------
646
647 //------------------------------------------------------------------------------------------------
649 protected void OnTaskGroupChanged(SCR_Task task, int id)
650 {
652 }
653
654 //------------------------------------------------------------------------------------------------
657 {
658 if (m_Task != task)
659 return;
660
662 }
663
664 //------------------------------------------------------------------------------------------------
666 protected void CheckTaskVisibility()
667 {
668 int playerID = SCR_PlayerController.GetLocalPlayerId();
669 SCR_TaskExecutor player = SCR_TaskExecutor.FromPlayerID(playerID);
670 if (!player)
671 return;
672
673 if (!m_TaskSystem.IsTaskVisibleOnMap(m_Task))
674 {
675 SetVisibility(false);
676 return;
677 }
678
679 SetVisibility(m_TaskSystem.IsTaskVisibleFor(m_Task, player));
680 }
681
682 //------------------------------------------------------------------------------------------------
685 protected void SetVisibility(bool show)
686 {
687 m_wRoot.SetVisible(show);
688 }
689
690 //------------------------------------------------------------------------------------------------
692 {
693 return m_Task;
694 }
695
696 //------------------------------------------------------------------------------------------------
704}
ArmaReforgerScripted GetGame()
Definition game.c:1398
PlatformKind
Definition PlatformKind.c:8
void SCR_FactionManager(IEntitySource src, IEntity parent)
SCR_EIconType
ScriptInvokerBase< ScriptInvokerVoidMethod > ScriptInvokerVoid
SCR_ETaskVisibility
Definition SCR_Task.c:24
void SCR_Task(IEntitySource src, IEntity parent)
Definition SCR_Task.c:1938
SCR_ETaskState
Definition SCR_Task.c:3
Definition Color.c:13
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 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.
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)
SCR_TaskManagerUIComponent m_TaskManager
ScriptInvokerVoid GetOnTaskIconClick()
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)
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.
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
override bool SetNameTo(TextWidget textWidget)
Definition UUID.c:28
proto external PlayerController GetPlayerController()