Notification System
OSSIM provides a global notification system for displaying toast alerts with severity levels, auto-dismiss timers, and frosted glass styling.
Pushing Notifications
From App Controllers
Every UAppBase has built-in notification helpers:
// From any UAppBase-derived controller:
NotifyInfo(TEXT("File saved successfully"));
NotifySuccess(TEXT("Operation completed"));
NotifyWarning(TEXT("Disk space low"));
NotifyError(TEXT("Failed to save file"));
From Any Code
Use UNotificationSubsystem directly:
UNotificationSubsystem* NS = GameInstance->GetSubsystem<UNotificationSubsystem>();
NS->NotifyInfo(FText::FromString("Hello!"));
Or via the Blueprint Function Library:
UOSSIMNotificationLibrary::NotifyInfo(WorldContext, FText::FromString("Hello!"));
Severity Levels & Durations
| Severity | Duration | Use Case |
|---|---|---|
Info | 4.0s | General information |
Success | 4.0s | Completed operations |
Warning | 5.0s | Non-critical alerts |
Error | 6.0s | Failures and errors |
Sticky notifications (bSticky=true) do not auto-dismiss.
Configuration
- Max Active Notifications: 6 (oldest evicted when cap exceeded).
- Fallback Duration: 4.0s.
- Host Z-Order: 12000 (above all windows).
Architecture
Notification Data (FOSSIMNotificationData)
Id: FGuid— Unique notification identifier.Title, Message, Source: FText— Display content.Severity: EOSSIMNotificationSeverity— Info/Success/Warning/Error.Icon: UTexture2D*— Optional icon.DurationSeconds: float— Auto-dismiss duration.bSticky: bool— Prevent auto-dismiss.CreatedAt: FDateTime— Creation timestamp.
Rendering Pipeline
PushNotification → ActiveNotifications.Insert(0) → ScheduleAutoDismiss
→ OnNotificationsChanged → UOSSIMNotificationCenter::RebuildNotifications
→ UOSSIMNotificationToast (per notification) → Slate SNotificationToast
Slate Toast (SNotificationToast)
- 340px wide frosted glass design using
SBackgroundBlur+FSlateRoundedBoxBrush. - Severity-based accent color strip.
- 0.25s fade/scale entry animation.
- Close button for manual dismissal.
Delegates
OnNotificationAdded(FOSSIMNotificationData)— Fired when a new notification is pushed.OnNotificationRemoved(FOSSIMNotificationData)— Fired on dismiss.OnNotificationsChanged()— Fired on any change to the active list.
