ULimenNotificationComponent
Overview
ULimenNotificationComponent is an actor component that handles the management of notifications. It queues incoming notifications, manages their display times, and ensures that no duplicate notifications are shown if configured to do so. The component also broadcasts events when new notifications are added.
Properties
Type | Name | Access | Description |
|---|---|---|---|
| DefaultNotificationDisplayTime | EditDefaultsOnly | Duration in seconds for which a notification is displayed if no custom display time is specified. |
| bIgnoreDuplicate | EditDefaultsOnly | Flag to determine whether duplicate notifications should be ignored. |
| MaxConsecutiveNotifications | EditDefaultsOnly | Maximum number of consecutive notifications that can be displayed at the same time. |
| PendingNotifications | Private | List of pending notifications waiting to be displayed. |
| ActiveNotifications | Private | Map of active notifications and their associated timer handles. |
| BoundPlayerController | Private | Player controller bound to the component, used for displaying notifications. |
Functions
Return Type | Signature | Description |
|---|---|---|
| QueueNotification(const TSharedRef<const FLimenNotification >& InNotification) | Queues a new notification for display. |
| EndPlay(const EEndPlayReason::Type EndPlayReason) | Handles the end of play event, clearing any active timers. |
| DisplayNextNotification() | Displays the next available notification from the queue. |
| NotificationDisplayTimeReached(const TSharedRef<const FLimenNotification > Notification) | Called when a notification's display time has reached its limit. |
| IsNotificationDuplicate(const TSharedRef<const FLimenNotification >& Test) | Checks if a given notification is already in the queue or being displayed. |
Usage & Implementation Notes
The component requires an owner that is derived from
AHUD.Notifications are managed with a FIFO (First In, First Out) approach.
If a duplicate notification is received and
bIgnoreDuplicateis set to true, it will be ignored.The component uses Unreal Engine's timer system to manage the display duration of notifications.