INotificationManager service provides a system for displaying toast-style notifications to users. These notifications appear in the corner of the screen and can include icons, progress bars, and custom actions.
Getting Started
Access the notification manager through plugin services:Basic Notifications
Simple Notification
Notification with Title
Notification Types
Use predefined types for visual styling:Notification Duration
Initial Duration
Set how long the notification stays visible:Hard Expiry
Set an absolute expiration time:Persistent Notification
Create a notification that doesn’t auto-dismiss:Extension on Hover
Extend duration when user hovers over the notification:Icons
FontAwesome Icons
Game Icons (SeIconChar)
Game Icon from Path
Icon from File
Icon from Texture
UseITextureProvider to load a texture for the icon:
Progress Notifications
Display progress bars in notifications:Indeterminate Progress
Show an animated progress bar without specific progress:Active Notifications
When you add a notification, you get anIActiveNotification back:
Dismissing Notifications
Extending Duration
User Dismissal
Control whether users can dismiss notifications:Notification Events
Click Event
Dismiss Event
Manual- User clicked dismissExpired- Auto-dismissed after timeoutProgrammatic- Dismissed viaDismissNow()PluginUnload- Plugin unloaded
Draw Actions Event
Add custom buttons to notifications:Minimized State
Control whether notifications start minimized:Respecting UI State
Control whether the notification respects UI hide settings:Notification Properties
Access notification state:Advanced Usage
Update Notification Content
Multi-Step Notifications
Best Practices
Complete Example
See Also
- UiBuilder - Core UI interface
- ImGui Basics - Basic ImGui usage
- Textures - Using textures for notification icons