15 lines
341 B
C#
15 lines
341 B
C#
namespace NBF.Setting
|
|
{
|
|
public abstract class ToggleOption : MultiOption<bool>
|
|
{
|
|
protected override void OnInitialize()
|
|
{
|
|
AddOption("Off", false);
|
|
AddOption("On", true);
|
|
|
|
SelectOption(DefaultValue == 1);
|
|
}
|
|
|
|
public bool IsEnabled() => GetSelectedOption();
|
|
}
|
|
} |