Groups are meant for huge configs -> pile indicator uses titles now

This commit is contained in:
sdburns1998
2019-06-06 15:46:37 +02:00
parent 05ba61d44c
commit a049ea4520

View File

@@ -24,22 +24,33 @@
package net.runelite.client.plugins.pileindicators; package net.runelite.client.plugins.pileindicators;
import java.awt.Color;
import net.runelite.client.config.Config; import net.runelite.client.config.Config;
import net.runelite.client.config.ConfigGroup; import net.runelite.client.config.ConfigGroup;
import net.runelite.client.config.ConfigItem; import net.runelite.client.config.ConfigItem;
import net.runelite.client.config.Range; import net.runelite.client.config.Range;
import net.runelite.client.config.Stub;
import java.awt.*;
@ConfigGroup("pileindicators") @ConfigGroup("pileindicators")
public interface PileIndicatorsConfig extends Config public interface PileIndicatorsConfig extends Config
{ {
@ConfigItem( @ConfigItem(
position = 0, keyName = "playerPilesStub",
keyName = "enablePlayers", name = "Player Piles",
name = "Enable Player Piling", description = "",
description = "Enable the option to highlight players when they pile.", position = 0
group = "1. Player Piles" )
default Stub playerPilesStub()
{
return new Stub();
}
@ConfigItem(
position = 1,
keyName = "enablePlayers",
name = "Enable Player Piling",
description = "Enable the option to highlight players when they pile.",
parent = "playerPilesStub"
) )
default boolean enablePlayers() default boolean enablePlayers()
{ {
@@ -47,11 +58,11 @@ public interface PileIndicatorsConfig extends Config
} }
@ConfigItem( @ConfigItem(
position = 1, position = 2,
keyName = "wildyOnlyPlayer", keyName = "wildyOnlyPlayer",
name = "Wilderness Only", name = "Wilderness Only",
description = "Show player piling only when in the Wilderness.", description = "Show player piling only when in the Wilderness.",
group = "1. Player Piles" parent = "playerPilesStub"
) )
default boolean wildyOnlyPlayer() default boolean wildyOnlyPlayer()
{ {
@@ -59,23 +70,11 @@ public interface PileIndicatorsConfig extends Config
} }
@ConfigItem( @ConfigItem(
position = 3, position = 3,
keyName = "enableNPCS", keyName = "playerPileColor",
name = "Enable NPC Piling", name = "Player Pile Color",
description = "Enable the option to highlight NPCs when they pile.", description = "Color used for player piles.",
group = "2. NPC Piles" parent = "playerPilesStub"
)
default boolean enableNPCS()
{
return false;
}
@ConfigItem(
position = 2,
keyName = "playerPileColor",
name = "Player Pile Color",
description = "Color used for player piles.",
group = "1. Player Piles"
) )
default Color playerPileColor() default Color playerPileColor()
{ {
@@ -83,11 +82,34 @@ public interface PileIndicatorsConfig extends Config
} }
@ConfigItem( @ConfigItem(
position = 4, keyName = "npcPilesStub",
keyName = "npcPileColor", name = "NPC Piles",
name = "NPC Pile Color", description = "",
description = "Color used for NPC piles.", position = 4
group = "2. NPC Piles" )
default Stub npcPilesStub()
{
return new Stub();
}
@ConfigItem(
position = 5,
keyName = "enableNPCS",
name = "Enable NPC Piling",
description = "Enable the option to highlight NPCs when they pile.",
parent = "npcPilesStub"
)
default boolean enableNPCS()
{
return false;
}
@ConfigItem(
position = 6,
keyName = "npcPileColor",
name = "NPC Pile Color",
description = "Color used for NPC piles.",
parent = "npcPilesStub"
) )
default Color npcPileColor() default Color npcPileColor()
{ {
@@ -95,26 +117,48 @@ public interface PileIndicatorsConfig extends Config
} }
@ConfigItem( @ConfigItem(
position = 5, keyName = "mixedPilesStub",
keyName = "mixedPileColor", name = "Mixed Piles",
name = "Mixed Pile Color", description = "",
description = "Color used for mixed piles.", position = 7
group = "3. Mixed Piles" )
default Stub mixedPilesStub()
{
return new Stub();
}
@ConfigItem(
position = 8,
keyName = "mixedPileColor",
name = "Mixed Pile Color",
description = "Color used for mixed piles.",
parent = "mixedPilesStub"
) )
default Color mixedPileColor() default Color mixedPileColor()
{ {
return new Color(255, 0, 255); return new Color(255, 0, 255);
} }
@ConfigItem(
keyName = "pilesSizeStub",
name = "Pile size",
description = "",
position = 9
)
default Stub pilesSizeStub()
{
return new Stub();
}
@Range( @Range(
min = 2 min = 2
) )
@ConfigItem( @ConfigItem(
position = 6, position = 10,
keyName = "minimumPileSize", keyName = "minimumPileSize",
name = "Minimum Pile Size", name = "Minimum Pile Size",
description = "Any pile under this size will not show up. (Minimum: 2)", description = "Any pile under this size will not show up. (Minimum: 2)",
group = "4. Pile Size" parent = "pilesSizeStub"
) )
default int minimumPileSize() default int minimumPileSize()
{ {
@@ -122,11 +166,22 @@ public interface PileIndicatorsConfig extends Config
} }
@ConfigItem( @ConfigItem(
position = 7, keyName = "miscellaneousStub",
keyName = "numberOnly", name = "Miscellaneous",
name = "Display Number Only", description = "",
description = "Shorten \"PILE SIZE: 1\" to \"1\"", position = 11
group = "5. Miscellaneous" )
default Stub miscellaneousStub()
{
return new Stub();
}
@ConfigItem(
position = 12,
keyName = "numberOnly",
name = "Display Number Only",
description = "Shorten \"PILE SIZE: 1\" to \"1\"",
parent = "miscellaneousStub"
) )
default boolean numberOnly() default boolean numberOnly()
{ {