Class SwitchWidgetController
A recyclable toggle switch controller.
Inherited Members
Namespace: SociallyDistant.Core.UI.Recycling
Assembly: SociallyDistant.Framework.dll
Syntax
public sealed class SwitchWidgetController : RecyclableWidgetController
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(ContentWidget)
Declaration
public override void Build(ContentWidget destination)
Parameters
Type | Name | Description |
---|---|---|
ContentWidget | destination |
Overrides
Recycle()
Declaration
public override void Recycle()