
You are viewing a potentially older version of this package. View Latest Version

A small framework that lets modders add pages to the game's settings menu to edit mod settings in-game.
Updated fork from the original mod made by JSPAPP (https://thunderstore.io/c/peak/p/JSPAPP/Settings_Extender/)
using SettingsExtender;
using Zorro.Settings;
[ExtenderSetting(page: "CoolMod", displayName: "Enable Cool Feature")]
internal class CoolFeatureToggle : ExtenderBoolSetting
{
public CoolFeatureToggle() : base(_ => CoolModPlugin.Instance.ApplySettings()) {}
protected override bool GetDefaultValue() => true;
}
// Register once (e.g., in Start)
coolFeatureToggle = SettingsHandler.Instance.AddSetting<CoolFeatureToggle>();
This declares a toggle on a new CoolMod tab and registers it in one line. The value is available via coolFeatureToggle.Value, and your callback runs when it changes.