-
Notifications
You must be signed in to change notification settings - Fork 36
Notifications
Notifications can be added to the BLT notifications panel in order to send important information to users, such as newer versions of your mods being available for download.
The global notifications manager can be accessed from the BLT using the BLT.Notifications
object.
Adds a notification to the manager and displays it immediately.
parameters
A table containing the information of the notification
-
title
The title of the notification -
[text]
The descriptive text -
[icon]
A path to a texture to use as an icon with this notification -
[icon_texture_rect]
The rect to use to clip the texture if using an atlas texture -
[color]
The color the icon should be tinted to -
[priority]
The priority of the notification, higher values are shown firstreturns
A unique id for the notification createdlocal notif_id = BLT.Notifications:add_notification( { title = "Test notification", text = "A message that you should read", } )
Removes the notification from the manager and the gui with the specified id.
uid
The unique id of the notification that you wish to remove
BLT.Notifications:remove_notification( notif_id )