Team-Resourceful / Resourceful-Config

MIT License
5 stars 3 forks source link

[Suggetion]: Separator line in value list #2

Closed gisellevonbingen closed 1 year ago

gisellevonbingen commented 1 year ago

If ConfigValuesWidget has many items, it can be difficult to find want item. I know can break it down into categories, but too many categories not good for see.

Like the key binds setting screen, It would be better to add an annotation that can put a separator line or subheading.

Expected usage

@Header(translation = "config.mod_id.booleans.header")
@ConfigEntry(id = "booleans.id_1", type = BOOLEAN)
public static boolean TEST_1 = false;
@ConfigEntry(id = "booleans.id_2", type = BOOLEAN)
public static boolean TEST_2 = true;

@Header(translation = "config.mod_id.integers.header")
@ConfigEntry(id = "integers.id_1", type = INTEGER)
public static int TEST_3 = 2;
@ConfigEntry(id = "integers.id_2", type = INTEGER)
public static int TEST_4 = 3;
ThatGravyBoat commented 1 year ago

Added in 1.0.8 this should be on curse and modrinth soon but it is already on the maven.

formatted like this

    @ConfigSeparator(
        translation = "text.resourcefulconfig.ad_astra.option.general.separator.offsets",
        tooltip = "text.resourcefulconfig.ad_astra.option.general.separator.tooltip"
    )
    @ConfigEntry(
            id = "oxygenBarXOffset",
            type = EntryType.INTEGER,
            translation = "text.resourcefulconfig.ad_astra.option.general.oxygenBarXOffset"
    )
    public static int oxygenBarXOffset = 0;
gisellevonbingen commented 1 year ago

Nice. It works perfect.