CommanderCat101-ContentSettings icon

ContentSettings

A library for adding custom settings to Content Warning.

Last updated 3 weeks ago
Total downloads 232557
Total rating 5 
Categories Mods Libraries Client-side Vanilla Compatible
Dependency string CommanderCat101-ContentSettings-1.2.2
Dependants 120 other packages depend on this package

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2100 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2100

README

ContentSettings

A library for adding custom settings to Content Warning.

Build GitHub release Thunderstore - ContentSettings NuGet - CommanderCat101.ContentSettings

Features

  • [x] Register custom settings
    • [x] Manual registration
    • [x] Attribute-based registration
    • [x] Custom categories
  • [x] Addition inputs
    • [x] Text input (TextField)
    • [x] Integer input (Slider)
    • [x] Boolean input (Checkbox)

Planned

  • [ ] More input types
  • [ ] Networking support

Usage

If you just want to look at some code, take a look at the Example Plugin.

Registering a Setting

void Awake()
{
    SettingsLoader.RegisterSetting("YOUR TAB", new ExampleSetting());
}

public class ExampleSetting : FloatSetting, ICustomSetting
{
    public override void ApplyValue()
    {
        // Do something with the value
    }

    public override float GetDefaultValue() => 0.5f;

    public override float2 GetMinMaxValue() => new(0f, 1f);

    public string GetDisplayName() => "Example Setting";
}  

Contributing

This repository follows Conventional Commits

Commits will be rejected automatically if they do not follow the format specified below.

Format

<type>(optional scope): <description>

Example: feat(pre-event): add speakers section

Credits

License

Released under GPL-3.0 by @Commander-Cat101.