Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_SplitNotificationMessageUIComponent.c
Go to the documentation of this file.
2 {
3  [Attribute()]
4  protected string m_sSplitNotificationText;
5 
6  //------------------------------------------------------------------------------------------------
7  override void Init(SCR_NotificationData data, SCR_NotificationsLogComponent notificationLog, float fadeDelay)
8  {
9  super.Init(data, notificationLog, fadeDelay);
10 
11  TextWidget rightMessage = TextWidget.Cast(m_wRoot.FindAnyWidget(m_sSplitNotificationText));
12  if (!rightMessage)
13  return;
14 
15  SCR_NotificationDisplayData displayData = data.GetDisplayData();
16  if (!displayData)
17  return;
18 
19  SCR_SplitNotificationUIInfo splitUiInfo = SCR_SplitNotificationUIInfo.Cast(displayData.GetNotificationUIInfo());
20  if (!splitUiInfo)
21  return;
22 
23  if (splitUiInfo.GetIconPath().IsEmpty())
24  Print(string.Format("SCR_SplitNotificationMessageUIComponent must have an icon assigned for %1!", typename.EnumToString(ENotification, data.GetID())), LogLevel.NORMAL);
25 
26  ENotificationColor leftColorEnum, rightColorEnum;
27  displayData.GetSplitNotificationTextColors(data, leftColorEnum, rightColorEnum);
28  Color textColor;
29 
30  //Set text colors
31  TextWidget leftMessage = TextWidget.Cast(m_wRoot.FindAnyWidget(m_sNotificationText));
32  if (leftMessage)
33  {
34  textColor = notificationLog.GetNotificationTextColor(leftColorEnum);
35  textColor.SetA(leftMessage.GetColor().A());
36  leftMessage.SetColor(textColor);
37  }
38 
39  textColor = notificationLog.GetNotificationTextColor(rightColorEnum);
40  textColor.SetA(rightMessage.GetColor().A());
41  rightMessage.SetColor(textColor);
42 
43 
44  string rightNotificationMessage = splitUiInfo.GetSplitRightMessageText();
45  string param1, param2, param3, param4, param5, param6;
46  data.GetNotificationTextEntries(param1, param2, param3, param4, param5, param6);
47 
48  rightMessage.SetTextFormat(rightNotificationMessage, param1, param2, param3, param4, param5, param6);
49  }
50 }
SCR_NotificationMessageUIComponent
Definition: SCR_NotificationMessageUIComponent.c:1
SCR_NotificationDisplayData
Definition: SCR_NotificationDisplayData.c:7
m_wRoot
protected Widget m_wRoot
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:59
SCR_SplitNotificationUIInfo
Definition: SCR_SplitNotificationUIInfo.c:2
SCR_NotificationsLogComponent
Definition: SCR_NotificationsLogUIComponent.c:6
ENotification
ENotification
Definition: ENotification.c:4
Attribute
typedef Attribute
Post-process effect of scripted camera.
SCR_NotificationData
Definition: SCR_NotificationData.c:6
data
Get all prefabs that have the spawner data
Definition: SCR_EntityCatalogManagerComponent.c:305
ENotificationColor
ENotificationColor
Definition: ENotificationColor.c:4
SCR_SplitNotificationMessageUIComponent
Definition: SCR_SplitNotificationMessageUIComponent.c:1