8 [
Attribute(
"0",
desc:
"If false notifications can never be clicked on and do not have any key hints or teleport icons. This is used if the notifications are part of a menu")]
11 [
Attribute(
"5",
desc:
"How many notifications will be displayed (not counting sticky notifications that do not effect the normal notifications) Can never be higher then SCR_NotificationsComponent.NOTIFICATION_HISTORY_LENGTH")]
14 [
Attribute(
"15",
desc:
"Notification display time in seconds. This can be diffrent for each notification log. Can never be higher then SCR_NotificationsComponent.NOTIFICATION_DELETE_TIME")]
23 [
Attribute(
"2",
desc:
"Size of priority Notification (Default: Priority Notification has the size of 2 normal Notifications")]
29 [
Attribute(
"{8ADB878F8DD9BD53}UI/layouts/HUD/Notifications/Notifications_Message.layout")]
32 [
Attribute(
"{8904986114C6F944}UI/layouts/HUD/Notifications/Notifications_Message_Split.layout")]
73 if (displayTimeLeft <= 0)
96 else if (!splituiInfo)
101 if (!newNotification)
105 if (!notificationMessage)
106 newNotification.RemoveFromHierarchy();
120 notificationMessage.
Init(
data,
this, displayTimeLeft * 1000);
154 if (priorityIndex >= 0)
195 priorityMsg.UpdateText();
233 if (notificationColor < 0)
238 Print(
"SCR_NotificationsLogComponent: Could not find the FactionManager so faction color for notification could not be set",
LogLevel.WARNING);
245 Print(
"SCR_NotificationsLogComponent: Could not find the faction index: '" + (notificationColor * -1) +
"' so faction color for notification could not be set",
LogLevel.WARNING);
253 return faction.GetFactionColor();
263 Print(
"Notification color '" +
typename.EnumToString(
ENotificationColor, notificationColor) +
"' has no color assigned to it in 'SCR_NotificationsLogComponent'",
LogLevel.WARNING);
273 if (notificationColor < 0)
278 Print(
"SCR_NotificationsLogComponent: Could not find the FactionManager so faction color for notification could not be set",
LogLevel.WARNING);
285 Print(
"SCR_NotificationsLogComponent: Could not find the faction index: '" + (notificationColor * -1) +
"' so faction color for notification could not be set",
LogLevel.WARNING);
293 return faction.GetFactionColor();
303 Print(
"Notification color '" +
typename.EnumToString(
ENotificationColor, notificationColor) +
"' has no color assigned to it in 'SCR_NotificationsLogComponent'",
LogLevel.WARNING);
318 array<ref SCR_NotificationDisplayColor> m_aNotificationDisplayColor =
m_NotificationsManager.GetNotificationDisplayColor();
320 for (
int i = 0, count = m_aNotificationDisplayColor.Count(); i < count; i++)
325 Print(
"Notification Color in 'SCR_NotificationsLogComponent' has duplicate notification color key: '" +
typename.EnumToString(
ENotificationColor, m_aNotificationDisplayColor[i].m_NotificationColor) +
"'. There should only be one of each key!",
LogLevel.WARNING);
378 if (!interfaceSettings)
382 interfaceSettings.Get(
"m_bShowNotifications", state);
407 Print(
"Max display Notification in notification log is higher than total notification history in notification component and thus are set the same",
LogLevel.ERROR);
416 Print(
"SCR_NotificationsLogDisplay requires SCR_NotificationsComponent on PlayerController!",
LogLevel.WARNING);
426 if (interfaceSettings)
429 interfaceSettings.Get(
"m_bShowNotifications", state);
452 Print(
"Notification display time in notification log is higher than delete time in notification component and thus are set the same time",
LogLevel.ERROR);
461 EInputDeviceType inputDevice =
GetGame().GetInputManager().GetLastUsedInputDevice();
469 Widget stickyNotificationWidget;
474 stickyNotificationWidget = w.FindAnyWidget(notificationWidget);
475 if (!stickyNotificationWidget)
477 Print(
"NotificationsLog could not find stickNotification: " + notificationWidget,
LogLevel.NORMAL);
482 if (!stickyNotificationComponent)
484 Print(
"NotificationsLog could not find SCR_StickyNotificationUIComponent on: " + notificationWidget,
LogLevel.NORMAL);
489 stickyNotificationComponent.
OnInit(
this);
497 array<SCR_NotificationData> notificationHistory = {};
501 for (
int i = 0; i < count; i++)
506 m_SaveWarning = SCR_SaveWarningComponent.Cast(
m_wRoot.FindAnyWidget(
"SaveWarning").FindHandler(SCR_SaveWarningComponent));
513 super.HandlerDeattached(w);
533 Print(
"Max display Notification in notification log is higher than total notification history in notification component and thus are set the same",
LogLevel.ERROR);
595class SCR_NotificationDisplayColor
600 [
Attribute(defvalue:
"1 1 1 1",
desc:
"Color of images within the notification message")]
601 protected ref
Color m_cWidgetNotificationColor;
603 [
Attribute(defvalue:
"1 1 1 1",
desc:
"Color of message text. Only relevant with Split notifications")]
604 protected ref
Color m_TextNotificationColor;
608 Color GetWidgetColor()
610 return Color.FromInt(m_cWidgetNotificationColor.PackToInt());
617 return Color.FromInt(m_TextNotificationColor.PackToInt());
ArmaReforgerScripted GetGame()
void OnInputDeviceIsGamepad(bool isGamepad)
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
void SCR_EditorManagerEntity(IEntitySource src, IEntity parent)
Get all prefabs that have the spawner data
bool OnNotification(SCR_NotificationData data)
SCR_NotificationsComponent m_NotificationsManager
void ShowSavingWarning(bool state)
bool m_bIsUsingMouseAndKeyboard
int m_iCurrentStickyNotifications
ref array< ref SCR_NotificationMessageUIComponent > m_aPriorityNotificationMessages
ref array< ref SCR_NotificationMessageUIComponent > m_aNotificationMessages
int m_iCurrentMaxNotifications
ref map< ENotificationColor, SCR_NotificationDisplayColor > m_NotificationDisplayColorMap
int m_iPriorityNotificationSize
SCR_NotificationsLogComponent MenuRootSubComponent SCR_BaseContainerCustomTitleEnum(ENotificationColor, "m_NotificationColor")
ref ScriptInvoker m_OnInputDeviceChanged
VerticalLayoutWidget m_wNotificationHolderParent
SCR_NotificationsLogComponent MenuRootSubComponent BaseContainerProps()
Class that saves the color data for specific ENotificationColor enums for the notification system.
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Class for broadcasting events to registered receivers.
static proto bool DisconnectEvent(func eventSender, func eventReceiver)
Marks a method in a class as a valid event receiver callback.
Color GetNotificationTextFactionColor()
Color GetNotificationFactionColor()
string GetInterfaceSettingsClass()
static SCR_HUDManagerComponent GetHUDManager()
SCR_UINotificationInfo GetNotificationUIInfo()
ScriptInvoker GetOnDeleted()
void Init(SCR_NotificationData data, SCR_NotificationsLogComponent notificationLog, float fadeDelay)
bool m_bIsUsingMouseAndKeyboard
string m_sNotificationHolderName
FactionManager m_FactionManager
bool OnNotification(SCR_NotificationData data)
SCR_NotificationsComponent m_NotificationsManager
VerticalLayoutWidget m_wNotificationHolderParent
void OnStickyNotificationChanged(bool newActive)
void RemoveOldestNotification()
bool m_bHasNotificationInput
ref SCR_NotificationMessageUIComponent m_PrevOverFlowNotification
void GenerateNotificationColorMap()
ResourceName m_sSplitNotificationEntityPrefab
int m_iCurrentStickyNotifications
bool HasNotificationInput()
string m_sNotificationHolderParent
override void HandlerAttachedScripted(Widget w)
void OnSlotResize(int maxNotifications)
void OnInputDeviceIsGamepad(bool isGamepad)
void OnNotificationDeleted(SCR_NotificationMessageUIComponent notificationMessage)
float m_fNotificationDisplayTime
ref map< ENotificationColor, SCR_NotificationDisplayColor > m_NotificationDisplayColorMap
override void HandlerDeattached(Widget w)
VerticalLayoutWidget m_wNotificationHolder
SCR_NotificationsComponent GetNotificationManager()
void ChangeInsertOrder(bool fromTop)
SCR_EditorManagerEntity GetEditorManager()
int m_iPriorityNotificationSize
ScriptInvoker GetOnNewMessageHasPosition()
ref array< ref SCR_NotificationMessageUIComponent > m_aPriorityNotificationMessages
bool GetIsUsingMouseAndKeyboard()
ref ScriptInvoker m_OnNewMessageHasPosition
void UpdateNotificationTexts()
Update notification texts.
SCR_FadeUIComponent m_FadeUiComponent
ref ScriptInvoker m_OnInputDeviceChanged
ref array< ref SCR_NotificationMessageUIComponent > m_aNotificationMessages
int m_iCurrentPriorityNotifications
void ShowSavingWarning(bool state)
ResourceName m_sNotificationEntityPrefab
VerticalLayoutWidget m_wPriorityNotificationHolder
SCR_EditorManagerEntity m_EditorManagerEntity
int m_iCurrentMaxNotifications
string m_sPriorityNotificationHolderName
ScriptInvoker GetOnInputDeviceChanged()
Color GetNotificationTextColor(ENotificationColor notificationColor)
Color GetNotificationWidgetColor(ENotificationColor notificationColor)
SCR_SaveWarningComponent m_SaveWarning
void OnPriorityNotificationChange(bool newActive)
ScriptInvoker GetOnStickyActiveChanged()
void OnInit(SCR_NotificationsLogComponent notificationLog)
static bool IsEmptyOrWhiteSpace(string input)
UIInfo used by the Notifications system.
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
SCR_FieldOfViewSettings Attribute