UIToast Class
Definition
Namespace: Brine2D.UI
Short-lived notification managed by UICanvas. Show via ShowToast\(UIToast\); it fades in, stays visible, then fades out and removes itself. Use DismissToast\(UIToast\) to remove it early.
Inheritance System.Object → UIToast
| Properties | |
|---|---|
| Alpha | Current opacity driven by the canvas \(0 = transparent, 1 = opaque\). |
| BackgroundColor | Toast panel background colour \(alpha is further multiplied by [Alpha](Alpha.md 'Brine2D\.UI\.UIToast\.Alpha')\). |
| BorderColor | Border colour. |
| Duration | How long the toast stays fully visible, in seconds. |
| FadeInTime | Time in seconds to fade from transparent to fully opaque. 0 = instant. |
| FadeOutTime | Time in seconds to fade from fully opaque to transparent before dismissal. 0 = instant. |
| Font | Optional font for the toast text. Null = renderer default. |
| Height | Computed panel height after the last Brine2D.UI.UIToast.Render\(Brine2D\.Rendering\.IRenderer,System\.Numerics\.Vector2\) call. Zero until first render. |
| Padding | Padding between the panel edge and the text. |
| Text | Message text to display. |
| TextColor | Text colour. |
| Width | Width of the toast panel in pixels. Text wraps inside the padding. |
| Methods | |
|---|---|
| Update\(float\) | Advances the toast lifetime and updates Alpha. |
| Events | |
|---|---|
| OnDismissed | Fired once when the toast is fully removed \(either naturally or via [DismissToast\(UIToast\)](../UICanvas/DismissToast(UIToast).md 'Brine2D.UI.UICanvas.DismissToast\(Brine2D\.UI\.UIToast\)')). |