V2 is being worked on! Most of the thread will remain the same until V2 releases. Until then, feel free to use V1.
As of V1.3, Redefine:A is only supported if the engine build version is 110 or higher, or R:ALite Version 1.0 or higher.
Re:Notify
A Simple yet Powerful Client-Based Notifications FrameworkThis module comes directly as a port from Redefine:A 5, hence the UI is exactly the same.
The module was made to separate the notifications from it, allowing you to create the exact same notifications while not using the system.
Achieve the same result as the image above
Notify(player,"This is a normal notification");
Notify(player,"This is a warning",{
Type = "warning";
});
Notify(player,"This is an error",{
Type = "error";
});
Notify(player,"This is a critical notification",{
Type = "critical";
});
Notify(player,"This notification has a timeout",{
Timeout = 20;
});
Notify(player,"This notification has a button",{
Options = {
"button"
};
});
Notify(player,"This notification is ugly (lol)",{
TextColor = Color3.new(math.random(),math.random(),math.random());
BackgroundColor = Color3.new(math.random(),math.random(),math.random());
});
Notify(player,"This notification has an icon",{
Image = "http://www.roblox.com/asset/?id=10993876141";
});
Notify(player,"This notification will spawn another one when clicked",{
Options = {
["Click me!"] = "Click me!";
["No, Click me!"] = {Primary = true; Text = "No, Click me!"};
["zzzz"] = "zzzz";
};
Callback = function(selection)
env:Notify(player,selection);
end;
});
local notification = env:Notify(player,"A notification will appear after this one expires.",{
Timeout = 10;
Clickable = false;
})
notification:AwaitResponse(function(_)
env:Notify(player,"Hello, I'm the other notification!");
end)
How to use:
local ReNotify = require(15700220413);
local Notification = ReNotify( Player , "Text" , {Options} );
-- You can see what the Options are in the Cheat Sheet.
-- V1.2: Send the same notification to all players with a RemoteEvent. No server-sided control, however.
ReNotify.RemoteEvent:FireAllClients("Text" , {Options} );
(Will redirect you to the MainModule / Re:Notify’s Creator Hub page)
"API" Cheat Sheet
Options:
-- Everything here is completely optional.
Type:"normal"|"warning"|"warn"|"error"|"critical";
Timeout:number;
Clickable:boolean;
TextColor:Color3;
BackgroundColor:Color3;
PushLowest:boolean;
Image:string;
Sound:string;
Options:{NotificationChoice|string};
Callback:((string|number)->any?); -- You are the one who manages the callback.
NotificationChoice:
Text:string;
Primary:boolean?;
TimedOut:boolean?;
Notification Class:
UID:string; -- Notification Identifier (internal)
Player:Player; -- The player who received the notification
Text:string; -- The original notification text
Options:Options; -- The options the notification had
Callback:function(Choice); -- The server callback
Completed:boolean; -- The notification has been completed (clicked / timedout)
SelectedOption:string?; -- What was the option that was selected
self:AwaitResponse(Callback) -> Choice; -- Yields the thread until a response it given (uses task.wait()); If Callback is given, calls the Callback upon completion.
self:Update(Options); -- Updates the existing notification. Doesn't do anything if the notification doesn't exist. (might error)
self:Destroy(); -- Removes the notification and clears the class as if it never existed.
There is currently no license for Re:Notify, but it will be changed to MIT once V2 is released.
You are free to use, modify, copy, or even sell (if not as-is). Whatever floats your boat.