NotificationManager
Inherits: Resource
Resource API for displaying arbitrary notifications
Description
The NotificationManager is responsible for providing an API to display arbitrary notifications to the user and maintain a history of those notifications. It also manages a queue of notifications so only one notification shows at a time.
const NotificationManager := preload("res://core/global/notification_manager.tres")
...
var notify := Notification.new("Hello world!")
notify.icon = load("res://assets/icons/critical.png")
NotificationManager.show(notify)
Properties
| Type | Name | Default |
|---|---|---|
| SettingsManager | settings_manager | |
| bool | ready | false |
| CustomLogger | logger |
Methods
| Returns | Signature |
|---|---|
| void | show(notify: Notification) |
| Notification[] | get_notification_history() |
| void | show_notification(text: String, icon: Texture2D = null, timeout_sec: float = 5.0) |
| bool | has_next() |
| Notification | next() |
Property Descriptions
settings_manager
SettingsManager settings_manager
Note
There is currently no description for this property. Please help us by contributing one!
ready
bool ready = false
Note
There is currently no description for this property. Please help us by contributing one!
logger
CustomLogger logger
Note
There is currently no description for this property. Please help us by contributing one!
Method Descriptions
show()
void show(notify: Notification)
Queues the given notification to be shown
get_notification_history()
Notification[] get_notification_history()
Returns a list of notifications
show_notification()
void show_notification(text: String, icon: Texture2D = null, timeout_sec: float = 5.0)
Note
There is currently no description for this method. Please help us by contributing one!
has_next()
bool has_next()
Returns whether there are notifiations waiting in the queue
next()
Notification next()
Returns the next notifiation waiting in the queue