Class SwitchWidgetBuilder
A recyclable widget builder for toggle switches.
Implements
Inherited Members
Namespace: SociallyDistant.Core.UI.Recycling
Assembly: SociallyDistant.Framework.dll
Syntax
public sealed class SwitchWidgetBuilder : IRecyclableWidgetBuilder
Properties
Callback
Gets or sets a callback to execute when the switch is turned on or off.
Declaration
public Action<bool>? Callback { get; set; }
Property Value
Type | Description |
---|---|
Action<bool> |
ConfirmationMessage
Gets or sets the question to ask the player when presenting the confirmation dialog.
Declaration
public string? ConfirmationMessage { get; set; }
Property Value
Type | Description |
---|---|
string |
ConfirmationTitle
Gets or sets the title text to use for the confirmation dialog.
Declaration
public string? ConfirmationTitle { get; set; }
Property Value
Type | Description |
---|---|
string |
IsActive
Gets or sets a value indicating whether the switch is currently turned on.
Declaration
public bool IsActive { get; set; }
Property Value
Type | Description |
---|---|
bool |
RequireConfirmation
Gets or sets a value indicating whether the toggle requires user confirmation when turning on or off.
Declaration
public bool RequireConfirmation { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
Build()
Create a RecyclableWidgetController based on this widget builder's properties.
Declaration
public RecyclableWidgetController Build()
Returns
Type | Description |
---|---|
RecyclableWidgetController | A new instance of RecyclableWidgetController. |