Creating User Dialogs
User Dialogs, or Modals, are a great way to prompt the user to take action without the worry of them being oblivious.
Creation Snippet
local Dialog = Window:PromptDialog({
Name = "Header",
Content = "Description",
Type = 1,
Actions = {
Primary = {
Name = "Okay!",
Icon = NebulaIcons:GetIcon("check", "Material"),
Callback = function()
end
},
{
Name = "Cancel",
Callback = function()
end
},
}
})
This Is Just A Snippet. Not All Parameters Are Included
Parameters
Inherits From Paragraph
Type : number
Type of Dialog. 1 for Buttons, 2 for Text Input.
Actions : table
Actions/Interactions for the Dialog. Depends on The type of Dialog.
Buttons:
- Primary : table
The main, colored button. Inherits All Properties from Button except for Tooltip. You can only have 1. - All subsequent children : table
Secondary, grey buttons. Inherits All Properties from Button except for Tooltip. Preferably only 1 as well.
Input:
- All subsequent children : table
Text Inputs stacked that fire only on Enter. Inherits All Properties from Input except for Name, Enter and Tooltip.