Allows mods to keep reference and update values, text, font sizes of SettingButton and OptionButton instances. Also allows them to destroy them.
Deprecates old register functions but maintains compatibility. New way of registering buttons would now be:
var button = new SettingsButton
{
Text = "MyButton",
FontSize = 13,
Value = true, // default false
OnToggle = value => Debug.Log("MyButton was toggled to "+value);
};
button.Create();
After creation, changing the button properties also changes the button visually.
Button can be removed by calling button.Destroy().
Allows mods to keep reference and update values, text, font sizes of SettingButton and OptionButton instances. Also allows them to destroy them.
Deprecates old register functions but maintains compatibility. New way of registering buttons would now be:
After creation, changing the button properties also changes the button visually. Button can be removed by calling
button.Destroy()
.