Notify
Notify is a class for sending Windows notifications in Weo. It allows creating notifications with a title, message, and icon style, and provides an event for handling user clicks on the notification.
Notify Class Window Method
Constructors
Notify.new() Function
Notify.new(Window, NotifyProperties)
- Creates a new notification instance for the specified window.
Parameters:
-
WindowWindow- The target window to send the notification.
-
NotifyPropertiestable- Table containing notification properties:
title— Notification title.message— Notification message.iconstyle— Notification icon style (Enum.IconStyle).
- Table containing notification properties:
Returns:
NotifyNotify- The created notification instance.
Methods
(Notify):send() Method
- Sends the notification to the window.
Returns:
booleanbooleantrueif the notification was successfully sent,falseotherwise.
Signals
(Notify).Clicked Signal
- A signal fired when the user clicks the notification. Does not return any parameters.
Example
local myNotify = Notify.new(Window, {title = "Hello", message = "World", iconstyle = Enum.IconStyle.Info})
myNotify.Clicked:Connect(function()
print("Notification clicked")
end)
myNotify:send()