Settings

The settings screen

The moment you register a module it gets its own page in the settings screen, listed in the sidebar under PLUGINS and opened from Mod Menu or the HUD editor. You do not build it: it is generated from what your module already exposes.

The page you get for free

Declare no tabs of your own and two are assembled for you:

POSITIONThe anchor picker, the X and Y offsets and the scale, driven by the same editor setters you already implement. Nothing extra to write.
SETTINGSYour settings, from the two lists below. Skipped entirely if you expose none.

Two lists of settings

getContextMenuSettings() stays the only source for the editor's right-click menu, and everything it returns also appears on your settings page. That menu should stay short, so anything that belongs in the full screen and nowhere else goes in getSettingsScreenSettings():

MyCustomModule.java
import com.eymistaken.simplecps.api.*;
import java.util.List;

// Inside your MyCustomModule class:

@Override
public List<HudModuleSetting> getSettingsScreenSettings() {
    List<HudModuleSetting> settings = new java.util.ArrayList<>();

    settings.add(new ColorSetting("Background Color",
        () -> MyAddonConfig.bgColor,
        color -> { MyAddonConfig.bgColor = color; MyAddonConfig.save(); }
    ));

    settings.add(new SliderSetting("Background Opacity",
        0, 255, 128,
        () -> MyAddonConfig.bgOpacity,
        val -> { MyAddonConfig.bgOpacity = val; MyAddonConfig.save(); }
    ));

    return settings;
}

With no tabs declared, the page lists the context-menu settings first and then these, in order, using the same six setting types. It defaults to an empty list, so addons written before it existed keep working and show their context-menu settings on both surfaces.

Nothing is de-duplicated. Put each setting in one list or the other: a setting in both is shown twice, because the two lists are joined as they are. There is no matching by label, and so no hidden rule about what you may call things.

Two things the generated page cannot do for you. The per-row reset arrow only works for SliderSetting, the one type that carries a defaultValue; for the rest it is drawn inert. And the badge that reads ENABLED or DISABLED is read-only for addon modules, because HudModule has no setter for it. Expose a BooleanSetting if players should switch your module on and off from here, and an ActionSetting for a reset button that covers everything at once.

Your own tabs

One flat list stops being readable once it grows past a handful of rows. When it does, override getSettingsTabs() and split the page yourself. A tab is a plain record, SettingsTab(String id, String name, List<HudModuleSetting> settings), with three parts:

idA stable key. The screen remembers which tab you were on by it, so keep it constant between calls.
nameThe label on the tab strip. Upper-cased for you, to match the built-in pages, and it falls back to the id when blank.
settingsThe rows on that tab, in order, from the same six setting types.
MyCustomModule.java
import com.eymistaken.simplecps.api.*;
import java.util.Arrays;
import java.util.List;

// Inside your MyCustomModule class:

@Override
public List<SettingsTab> getSettingsTabs() {
    return List.of(
        new SettingsTab("display", "DISPLAY", List.of(
            new ColorSetting("Text Color",
                () -> MyAddonConfig.textColor,
                color -> { MyAddonConfig.textColor = color; MyAddonConfig.save(); }
            ),
            new SliderSetting("Scale %",
                50, 300, 100,
                () -> MyAddonConfig.scale,
                val -> { MyAddonConfig.scale = val; MyAddonConfig.save(); }
            )
        )),
        new SettingsTab("behavior", "BEHAVIOR", List.of(
            new CycleSetting("Display Mode",
                Arrays.asList("Compact", "Full", "Minimal"),
                () -> MyAddonConfig.displayModeIndex,
                idx -> { MyAddonConfig.displayModeIndex = idx; MyAddonConfig.save(); }
            )
        ))
    );
}

Declaring tabs does not throw the two flat lists away, it only moves them. The context-menu settings lead the first tab you declared, so everything on the editor's right-click menu still appears on the page, and getSettingsScreenSettings() is no longer joined onto the end: it becomes a trailing SETTINGS tab of its own.

Four things the page decides for you. POSITION is always added, so do not declare placement rows yourself. A tab whose settings are all empty or of an unrecognized type is dropped rather than drawn blank. Two tabs sharing an id are renumbered rather than one going missing. And the tab strip does not scroll: tabs past the panel's width are not drawn, so keep to a handful of short names.

How players get there

From the sidebar, or straight from the editor: right-clicking your module offers Open Settings at the bottom of its menu, which jumps directly to your page. Right-clicking one of your sub-elements lands on the same page, since sub-elements do not get pages of their own.