Overlay¶
Warning
The scrim is a TextButton. A panel on top of it must be a GuiButton too, or it will not stop clicks from reaching the scrim: setting Active on a frame is not enough.
Overlay is a full-size scrim that dims what is behind it and takes input. Dialogs, drawers and sheets are built on it.
Usage¶
Call Components.Overlay with a scope and a table of properties:
Properties¶
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
Theme |
ThemeRef |
The contextual theme | Theme to use for this component instead of the one from Theme.Provide. |
|
Size |
UsedAs<UDim2> |
UDim2.fromScale(1, 1) |
Size of the component. | |
Visible |
UsedAs<boolean> |
true |
Whether the component is shown. | |
ZIndex |
UsedAs<number> |
50 |
Z index of the component. | |
CornerRadius |
number |
0, or the window's |
Corner radius of the scrim in pixels. Inside a Window it takes the corner radius of the window when this is left out. |
Callbacks¶
| Name | Description |
|---|---|
OnClick: () -> () |
Runs when the scrim is pressed. |