Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_TaskListEntryUIComponent.c
Go to the documentation of this file.
3typedef ScriptInvokerBase<TaskWidgetSelected> SCR_TaskWidgetSelectedInvoker;
4
7typedef ScriptInvokerBase<TaskVisualsUpdated> SCR_TaskVisualsChangedInvoker;
8
10{
11 [Attribute(UIColors.GetColorAttribute(UIColors.NEUTRAL_INFORMATION))]
13
14 [Attribute(UIColors.GetColorAttribute(Color.FromSRGBA(43, 2, 2, 255)))]
15 protected ref Color m_IconColor;
16
17 [Attribute(UIColors.GetColorAttribute(Color.FromSRGBA(43, 2, 2, 255)))]
18 protected ref Color m_OutlineColor;
19
20 [Attribute(UIColors.GetColorAttribute(Color.FromSRGBA(255, 255, 255, 255)))]
21 protected ref Color m_BackgroundColor;
22
23 protected ref Color m_FactionColor;
24 protected SCR_Task m_Task;
26
30
31 protected const int MAX_CHILD_COUNT = 9;
32
33 //------------------------------------------------------------------------------------------------
34 override void HandlerAttached(Widget w)
35 {
36 super.HandlerAttached(w);
37
38 m_Widgets.Init(w);
39 if (m_Widgets.m_ButtonComponent)
40 {
41 m_Widgets.m_ButtonComponent.m_OnClicked.Insert(OnTaskEntryClicked);
42 m_Widgets.m_ButtonComponent.m_OnMouseEnter.Insert(OnHoveredStart);
43 m_Widgets.m_ButtonComponent.m_OnMouseLeave.Insert(OnHoveredEnd);
44 }
45
46 if (m_Widgets.m_ButtonFoldComponent)
47 m_Widgets.m_ButtonFoldComponent.m_OnClicked.Insert(OnWrapperFolded);
48
50 if (!m_TaskManager)
51 return;
52
53 m_TaskManager.GetOnTaskColorsUpdated().Insert(SetTaskIconColors);
54 m_TaskManager.GetOnTaskBackgroundUpdated().Insert(SetTaskBackground);
55 }
56
57 //------------------------------------------------------------------------------------------------
58 override void HandlerDeattached(Widget w)
59 {
60 super.HandlerDeattached(w);
61
62 if (m_Task)
63 {
64 m_Task.GetOnTaskAssigneeAdded().Remove(OnTaskAssigneeAdded);
65 m_Task.GetOnTaskAssigneeRemoved().Remove(OnTaskAssigneeAdded);
66 m_Task.GetOnDisplayDataChanged().Remove(OnDisplayDataChanged);
67 m_Task.GetOnTaskStateChanged().Remove(OnTaskStateChanged);
68 m_Task.GetOnTaskUIVisibilityChanged().Remove(OnTaskUIVisibilityChanged);
69 m_Task.GetOnTaskVisibilityChanged().Remove(OnTaskVisibilityChanged);
70 m_Task.GetOnTaskOwnershipChanged().Remove(OnTaskOwnershipChanged);
71 m_Task.GetOnOwnerFactionAdded().Remove(OnTaskFactionChanged);
72 m_Task.GetOnOwnerFactionRemoved().Remove(OnTaskFactionChanged);
73 m_Task.GetOnOwnerGroupAdded().Remove(OnTaskGroupChanged);
74 m_Task.GetOnOwnerGroupRemoved().Remove(OnTaskGroupChanged);
75 }
76
77 if (m_Widgets.m_ButtonComponent)
78 {
79 m_Widgets.m_ButtonComponent.m_OnClicked.Remove(OnTaskEntryClicked);
80 m_Widgets.m_ButtonComponent.m_OnMouseEnter.Remove(OnHoveredStart);
81 m_Widgets.m_ButtonComponent.m_OnMouseLeave.Remove(OnHoveredEnd);
82 }
83
84 if (m_Widgets.m_ButtonFoldComponent)
85 m_Widgets.m_ButtonFoldComponent.m_OnClicked.Remove(OnWrapperFolded);
86
87 if (!m_TaskManager)
88 return;
89
90 m_TaskManager.GetOnTaskColorsUpdated().Remove(SetTaskIconColors);
91 m_TaskManager.GetOnTaskBackgroundUpdated().Remove(SetTaskBackground);
92 }
93
94 //------------------------------------------------------------------------------------------------
95 protected void OnHoveredStart(SCR_ModularButtonComponent comp, bool mouseInput)
96 {
98 m_Widgets.m_TitleFrameComponent.AnimationStart();
99
100 GetGame().GetWorkspace().SetFocusedWidget(m_Widgets.m_wButton);
101 }
102
103 //------------------------------------------------------------------------------------------------
104 protected void OnHoveredEnd(SCR_ModularButtonComponent comp, bool mouseInput)
105 {
106 m_Widgets.m_TitleFrameComponent.AnimationStop();
107 m_Widgets.m_TitleFrameComponent.ResetPosition();
108 }
109
110 //------------------------------------------------------------------------------------------------
112 protected bool CheckTitleOverflow()
113 {
114 float frameX, frameY;
115 m_Widgets.m_wTitleFrame.GetScreenSize(frameX, frameY);
116
117 float titleX, titleY;
118 m_Widgets.m_wTaskTitle.GetScreenSize(titleX, titleY);
119
120 return frameX < titleX;
121 }
122
123 //------------------------------------------------------------------------------------------------
125 protected int GetAssignees()
126 {
127 if (!m_Task)
128 return 0;
129
130 return m_Task.GetTaskAssigneePlayerCount();
131 }
132
133 //------------------------------------------------------------------------------------------------
136 void InitTask(notnull SCR_Task task, bool hasChild = false)
137 {
138 m_Task = task;
139 m_BackgroundColor = UIColors.NEUTRAL_INFORMATION;
140
141 // Update task icon and title
142 UpdateTask();
143
144 // Set assignees visuals
146
147 m_Task.GetOnTaskAssigneeAdded().Insert(OnTaskAssigneeAdded);
148 m_Task.GetOnTaskAssigneeRemoved().Insert(OnTaskAssigneeAdded);
149 m_Task.GetOnTaskStateChanged().Insert(OnTaskStateChanged);
150 m_Task.GetOnDisplayDataChanged().Insert(OnDisplayDataChanged);
151 m_Task.GetOnTaskUIVisibilityChanged().Insert(OnTaskUIVisibilityChanged);
152 m_Task.GetOnTaskVisibilityChanged().Insert(OnTaskVisibilityChanged);
153 m_Task.GetOnTaskOwnershipChanged().Insert(OnTaskOwnershipChanged);
154 m_Task.GetOnOwnerFactionAdded().Insert(OnTaskFactionChanged);
155 m_Task.GetOnOwnerFactionRemoved().Insert(OnTaskFactionChanged);
156 m_Task.GetOnOwnerGroupAdded().Insert(OnTaskGroupChanged);
157 m_Task.GetOnOwnerGroupRemoved().Insert(OnTaskGroupChanged);
158
159 SCR_ExtendedTask extendedTask = SCR_ExtendedTask.Cast(m_Task);
160 if (extendedTask)
161 extendedTask.GetOnProgressChanged().Insert(OnProgressChanged);
162
163 if (hasChild)
164 {
165 m_Widgets.m_wSizeFoldButton.SetVisible(true);
166 SetChildWrapperFolded(null, false);
167 }
168
169 SCR_TaskSystem taskSystem = SCR_TaskSystem.GetInstance();
170 if (!taskSystem)
171 return;
172
173 // Handle progression bar
174 if (taskSystem.CanProgressBeShownForTask(m_Task))
175 {
176 float progress = taskSystem.GetTaskProgress(m_Task);
177 m_Widgets.m_wProgressBar.SetVisible(true);
178 SetProgressValue(progress);
179 }
180
181 //## Don't show task if not visible for player
183
185
186 HandleTaskState(m_Task.GetTaskState(), false);
187 }
188
189 //------------------------------------------------------------------------------------------------
192 {
193 int playerID = SCR_PlayerController.GetLocalPlayerId();
194
195 SCR_Faction faction = SCR_Faction.Cast(SCR_FactionManager.SGetPlayerFaction(playerID));
196 if (!faction)
197 return;
198
199 Color factionColor = faction.GetFactionColor();
200 if (factionColor)
201 m_FactionColor = factionColor;
202
203 Color color = faction.GetOutlineFactionColor();
204 if (color)
205 {
206 m_IconColor = color;
207 m_OutlineColor = color;
208 }
209
210 SCR_TaskExecutor executor = SCR_TaskExecutor.FromPlayerID(playerID);
211 if (!executor)
212 return;
213
214 if (m_FactionColor && (m_Task.IsTaskAssignedTo(executor) || faction.IsPlayerCommander(playerID) && m_Task.GetTaskAssigneeCount() > 0 ))
216 else
218 }
219
220 //------------------------------------------------------------------------------------------------
223 {
225 }
226
227 //------------------------------------------------------------------------------------------------
229 void SetChildWrapperFolded(SCR_ModularButtonComponent comp = null, bool toggled = -1)
230 {
231 if (toggled == -1)
232 toggled = !m_Widgets.m_wChildTaskWrapper.IsVisible();
233
234 m_Widgets.m_wChildTaskWrapper.SetVisible(toggled);
235
236 if (toggled)
237 AnimateWidget.Rotation(m_Widgets.m_wIconFold, 180, 5);
238 else
239 AnimateWidget.Rotation(m_Widgets.m_wIconFold, 0, 5);
240 }
241
242 //------------------------------------------------------------------------------------------------
244 protected void OnTaskEntryClicked()
245 {
246 if (!m_Task || !m_TaskManager)
247 return;
248
249 if (m_TaskManager.GetSelectedTask() == m_Task)
250 {
251 SetEntrySelected(false);
252 m_TaskManager.SetSelectedTask(null);
253 }
254 else
255 {
256 m_TaskManager.SetSelectedTask(m_Task);
257 }
258 }
259
260 //------------------------------------------------------------------------------------------------
266 protected void OnTaskAssigneeAdded(notnull SCR_Task task, SCR_TaskExecutor assignee, int requesterID)
267 {
268 if (m_Task != task)
269 return;
270
273 m_BackgroundColor = UIColors.NEUTRAL_INFORMATION;
274
275 int playerID = SCR_PlayerController.GetLocalPlayerId();
276 SCR_TaskExecutor player = SCR_TaskExecutor.FromPlayerID(playerID);
277 if (!player)
278 return;
279
280 SCR_Faction faction = SCR_Faction.Cast(SCR_FactionManager.SGetPlayerFaction(playerID));
281 if (m_Task.IsTaskAssignedTo(player))
282 {
283 //## Assign task if it's not assigned already
284 if (m_TaskManager && !m_TaskManager.GetAssigedTask())
285 m_TaskManager.AssignTask(task);
286
287 if (!faction)
288 return;
289
290 Color color = faction.GetFactionColor();
291 if (!color)
292 return;
293
294 m_Widgets.m_wTaskIconBackground.SetColor(color);
295 }
296 else if (faction && faction.IsPlayerCommander(playerID) && m_Task.GetTaskAssigneeCount() > 0)
297 {
298 Color color = faction.GetFactionColor();
299 if (!color)
300 return;
301
303 }
304 else
305 {
306 if (m_TaskManager && m_Task == m_TaskManager.GetSelectedTask())
307 {
308 UpdateTaskIconColors(UIColors.CONTRAST_COLOR);
309 return;
310 }
311
312 m_Widgets.m_wTaskIconBackground.SetColor(m_BackgroundColor);
313 }
314 }
315
316 //------------------------------------------------------------------------------------------------
320 {
322
323 HandleTaskState(state);
324 }
325
326 //------------------------------------------------------------------------------------------------
330 protected void HandleTaskState(SCR_ETaskState state, bool forceRefresh = true)
331 {
332 m_Widgets.m_wOverlayTaskStates.SetVisible(true);
333 switch (state)
334 {
335 case SCR_ETaskState.COMPLETED:
336 {
337 m_Widgets.m_wIconOverlay.SetOpacity(0.5);
338 m_Widgets.m_wIconOverlayFinished.SetVisible(true);
339 break;
340 }
341
342 case SCR_ETaskState.FAILED:
343 {
344 m_Widgets.m_wIconOverlay.SetOpacity(0.5);
345 m_Widgets.m_wIconOverlayFailed.SetVisible(true);
346 break;
347 }
348
349 case SCR_ETaskState.CANCELLED:
350 {
351 m_Widgets.m_wIconOverlay.SetOpacity(0.5);
352 m_Widgets.m_wIconOverlayCancelled.SetVisible(true);
353 break;
354 }
355
356 default:
357 {
358 forceRefresh = false;
359 m_Widgets.m_wIconOverlay.SetOpacity(1);
360 m_Widgets.m_wOverlayTaskStates.SetVisible(false);
361 break;
362 }
363 }
364
365 if (forceRefresh && m_TaskManager)
366 m_TaskManager.RefreshTaskList();
367 }
368
369 //------------------------------------------------------------------------------------------------
373 protected void OnProgressChanged(float change, float newProgress)
374 {
375 SetProgressValue(newProgress);
376 }
377
378 //------------------------------------------------------------------------------------------------
380 protected void OnDisplayDataChanged()
381 {
383 UpdateTask();
385 }
386
387 //------------------------------------------------------------------------------------------------
389 protected void OnTaskUIVisibilityChanged(SCR_Task task, SCR_ETaskUIVisibility visible)
390 {
391 if (m_Task != task)
392 return;
393
394 if (m_TaskManager)
395 m_TaskManager.RefreshTaskList();
396 }
397
398 //------------------------------------------------------------------------------------------------
401 {
402 if (m_Task != task)
403 return;
404
405 if (m_TaskManager)
406 m_TaskManager.RefreshTaskList();
407 }
408
409 //------------------------------------------------------------------------------------------------
411 protected void OnTaskOwnershipChanged(SCR_Task task, SCR_ETaskOwnership ownership)
412 {
413 if (m_Task != task)
414 return;
415
416 if (m_TaskManager)
417 m_TaskManager.RefreshTaskList();
418 }
419
420 //------------------------------------------------------------------------------------------------
423 {
424 if (m_Task != task)
425 return;
426
427 if (m_TaskManager)
428 m_TaskManager.RefreshTaskList();
429 }
430
431 //------------------------------------------------------------------------------------------------
433 protected void OnTaskGroupChanged(SCR_Task task, int id)
434 {
435 if (m_Task != task)
436 return;
437
438 if (m_TaskManager)
439 m_TaskManager.RefreshTaskList();
440 }
441
442 //------------------------------------------------------------------------------------------------
444 protected void CheckTaskVisibility()
445 {
446 if (m_TaskManager)
447 {
448 SCR_TaskListUIComponent taskListUIComponent = m_TaskManager.GetTaskListComponent();
449 if (taskListUIComponent && !taskListUIComponent.IsTaskVisibleInListByTab(m_Task))
450 {
451 SetVisibility(false);
452 return;
453 }
454 }
455
456 SCR_TaskSystem taskSystem = SCR_TaskSystem.GetInstance();
457 if (!taskSystem)
458 return;
459
460 int playerID = SCR_PlayerController.GetLocalPlayerId();
461 SCR_TaskExecutor player = SCR_TaskExecutor.FromPlayerID(playerID);
462 if (!player)
463 return;
464
465 SetVisibility(taskSystem.IsTaskVisibleFor(m_Task, player));
466 }
467
468 //------------------------------------------------------------------------------------------------
471 {
472 SCR_TaskUIInfo info = m_Task.GetTaskUIInfo();
473 if (!info)
474 return;
475
476 info.SetNameTo(m_Widgets.m_wTaskTitle);
477 info.SetIconTo(m_Widgets.m_wTaskIconSymbol);
478
479 m_Widgets.m_wAssigneesAmountText.SetText(m_Task.GetTaskAssigneePlayerCount().ToString());
480 }
481
482 //------------------------------------------------------------------------------------------------
485 void SetTaskTextColor(notnull Color color)
486 {
487 m_Widgets.m_wTaskTitle.SetColor(color);
488 }
489
490 //------------------------------------------------------------------------------------------------
495 void UpdateTaskIconColors(Color backgroundColor = null, Color iconColor = null, Color outlineColor = null)
496 {
497 if (!backgroundColor)
498 backgroundColor = m_BackgroundColor;
499
500 if (!iconColor)
501 iconColor = m_IconColor;
502
503 if (!outlineColor)
504 outlineColor = m_OutlineColor;
505
506 m_Widgets.m_wTaskIconBackground.SetColor(backgroundColor);
507 m_Widgets.m_wTaskIconSymbol.SetColor(iconColor);
508 m_Widgets.m_wTaskIconOutline.SetColor(outlineColor);
509 }
510
511 //------------------------------------------------------------------------------------------------
516 void SetTaskIconColors(Color backgroundColor = null, Color iconColor = null, Color outlineColor = null)
517 {
518 if (backgroundColor)
519 m_BackgroundColor = backgroundColor;
520
521 if (iconColor)
522 m_IconColor = iconColor;
523
524 if (outlineColor)
525 m_OutlineColor = outlineColor;
526 }
527
528 //------------------------------------------------------------------------------------------------
532 void SetTaskBackground(ResourceName imageset, string name)
533 {
534 if (imageset.IsEmpty() || name.IsEmpty())
535 return;
536
537 m_Widgets.m_wTaskIconBackground.LoadImageFromSet(0, imageset, name);
538 }
539
540 //------------------------------------------------------------------------------------------------
543 void SetEntrySelected(bool selected)
544 {
545 if (m_Widgets.m_ButtonComponent)
546 m_Widgets.m_ButtonComponent.SetToggled(selected);
547
548 if (selected)
549 {
550 UpdateTaskIconColors(UIColors.CONTRAST_COLOR);
551 return;
552 }
553
554 int playerID = SCR_PlayerController.GetLocalPlayerId();
555 SCR_TaskExecutor player = SCR_TaskExecutor.FromPlayerID(playerID);
556 SCR_Faction faction = SCR_Faction.Cast(SCR_FactionManager.SGetPlayerFaction(playerID));
557
558 if (player && (m_Task.IsTaskAssignedTo(player) || (faction && faction.IsPlayerCommander(playerID) && m_Task.GetTaskAssigneeCount() > 0)))
559 {
561 return;
562 }
563
565 }
566
567 //------------------------------------------------------------------------------------------------
571 void SetIcon(ResourceName imageset, string iconName)
572 {
573 m_Widgets.m_wTaskIconSymbol.LoadImageFromSet(0, imageset, iconName);
574 }
575
576 //------------------------------------------------------------------------------------------------
579 void SetIcon(ResourceName texture)
580 {
581 m_Widgets.m_wTaskIconSymbol.LoadImageTexture(0, texture);
582 }
583
584 //------------------------------------------------------------------------------------------------
587 void ShowProgressBar(bool show)
588 {
589 m_Widgets.m_wProgressBar.SetVisible(show);
590 }
591
592 //------------------------------------------------------------------------------------------------
595 void SetProgressValue(float progress = -1)
596 {
597 m_Widgets.m_ProgressBarComponent.SetValue(progress);
598 }
599
600 //------------------------------------------------------------------------------------------------
603 void ShowAssigneeCount(bool show)
604 {
605 m_Widgets.m_wAssigneesLayout.SetVisible(show);
606 }
607
608 //------------------------------------------------------------------------------------------------
611 void SetAssigneeCount(int assigneesCount)
612 {
613 m_Widgets.m_wAssigneesAmountText.SetText(assigneesCount.ToString());
614
615 ShowAssigneeCount(assigneesCount > 0);
616 }
617
618 //------------------------------------------------------------------------------------------------
621 void SetChildCount(int count)
622 {
623 string displayCount;
624 if (count > MAX_CHILD_COUNT)
625 displayCount = UIConstants.FormatUnitShortPlus(MAX_CHILD_COUNT);
626 else
627 displayCount = count.ToString();
628
629 m_Widgets.m_wChildTasksCountText.SetText(displayCount);
630 m_Widgets.m_wChildTasksCount.SetVisible(true);
631 }
632
633 //------------------------------------------------------------------------------------------------
636 void SetVisibility(bool show)
637 {
638 m_wRoot.SetVisible(show);
639 }
640
641 //------------------------------------------------------------------------------------------------
644 {
645 return m_Widgets.m_wChildTaskWrapper;
646 }
647
648 //------------------------------------------------------------------------------------------------
651 {
652 return m_Widgets.m_wButton;
653 }
654
655 //------------------------------------------------------------------------------------------------
663}
ArmaReforgerScripted GetGame()
Definition game.c:1398
void SCR_FactionManager(IEntitySource src, IEntity parent)
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
ScriptInvokerBase< TaskWidgetSelected > SCR_TaskWidgetSelectedInvoker
ScriptInvokerBase< TaskVisualsUpdated > SCR_TaskVisualsChangedInvoker
func TaskVisualsUpdated
func TaskWidgetSelected
static WidgetAnimationImageRotation Rotation(Widget widget, float targetValue, float speed)
Definition Color.c:13
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)
ref Color m_FactionColor
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()
Widget GetChildWrapper()
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)
SCR_Task m_Task
ref SCR_TaskListEntryWidgets m_Widgets
Widget GetEntryButton()
void OnTaskFactionChanged(SCR_Task task, FactionKey key)
Invoked when task faction is changed.
void InitTask(notnull SCR_Task task, bool hasChild=false)
ref Color m_OutlineColor
int GetAssignees()
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
ref Color m_IconColor
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