dialog refers to the return value of Dialog:Create
Color
dialog:AddColorInput creates a new color input field.
Parameters
dialog:AddColorInput(label, description?, defaultValue?)| Name | Type | Description | Required |
|---|---|---|---|
| label | string | The title of the input | Yes |
| description | string | The description of the input field | No |
| defaultValue | [r: number, g: number, b: number, a: number] | The default value of the input field | No |
Example
client/example.lua
local dialog = Dialog:Create('Title');
dialog:AddColorInput('Color', 'Your favourite Color', { 255, 0, 255, 0.5 });
local results = dialog:Open();
print(results[1]) -- The entered text