cMenu - Notifications is a notification list that appears on the right side of the screen.
Installation
- Install the cMenu - Notifications package
- Place the template either on the user or the player
- If you’re using other cMenu packages, playing this next to the other ones on the player makes the most sense
Usage
To add a notification to the list, call cMenuNotificationsScript:AddNotification(options)
Options:
- title - Text displayed on the top of the notification
- subtitle - text displayed just below the title, slightly faded out
- imageUrl - If you want to display an image with along with the message, include the URL here
- quantity - Quantity is placed on the bottom right of the image.
cMenu - Notifications can display multiple notifications at once. The number of notifications displayed is dependent on the height of the container. If you want to display more or less notifications, simply use the handles on the widget to make it taller or shorter.
There is 1 property on cMenuNotificationsWidget - fullNotificationsDelay
. When the notification list is full, this controls how long the notifications will persist before being removed and allowing another notification be displayed.
If notifications aren’t coming in quickly, it also controls how long a single notification takes to disappear.
Example
This is how cMenu - Inventory calls this script:
self.notificationsScript:AddNotification({
imageUrl = self:GetIcon(template),
quantity = count - (self.lastInventory[template] or 0),
title = "Item Received",
subtitle = self:GetName(template)
})
Media