This commit is contained in:
Kyleeld
2019-09-03 14:48:46 +01:00
parent 14d311be93
commit 0553d8d91f
4 changed files with 126 additions and 14 deletions

View File

@@ -47,7 +47,11 @@ public interface GroundMarkerConfig extends Config
FIVE("5"), FIVE("5"),
SIX("6"), SIX("6"),
SEVEN("7"), SEVEN("7"),
EIGHT("8"); EIGHT("8"),
NINE("9"),
TEN("10"),
ELEVEN("11"),
TWELVE("12");
private final String name; private final String name;
@@ -78,11 +82,11 @@ public interface GroundMarkerConfig extends Config
@ConfigItem( @ConfigItem(
position = 1, position = 1,
keyName = "markerColor", keyName = "markerColor",
name = "Default Marked tile Color", name = "Default tile Color",
description = "Configures the default color of marked tiles", description = "Configures the default color of marked tiles",
hidden = true, hidden = true,
unhide = "amount", unhide = "amount",
unhideValue = "1 || 2 || 3 || 4 || 5 || 6 || 7 || 8" unhideValue = "1 || 2 || 3 || 4 || 5 || 6 || 7 || 8 || 9 || 10 || 11 || 12"
) )
default Color markerColor() default Color markerColor()
{ {
@@ -97,7 +101,7 @@ public interface GroundMarkerConfig extends Config
description = "Configures the color of the 2nd group of marked tiles", description = "Configures the color of the 2nd group of marked tiles",
hidden = true, hidden = true,
unhide = "amount", unhide = "amount",
unhideValue = "2 || 3 || 4 || 5 || 6 || 7 || 8" unhideValue = "2 || 3 || 4 || 5 || 6 || 7 || 8 || 9 || 10 || 11 || 12"
) )
default Color markerColor2() default Color markerColor2()
{ {
@@ -112,7 +116,7 @@ public interface GroundMarkerConfig extends Config
description = "Configures the color of the 3rd group of marked tiles", description = "Configures the color of the 3rd group of marked tiles",
hidden = true, hidden = true,
unhide = "amount", unhide = "amount",
unhideValue = "3 || 4 || 5 || 6 || 7 || 8" unhideValue = "3 || 4 || 5 || 6 || 7 || 8 || 9 || 10 || 11 || 12"
) )
default Color markerColor3() default Color markerColor3()
{ {
@@ -127,7 +131,7 @@ public interface GroundMarkerConfig extends Config
description = "Configures the color of the 4th group of marked tiles", description = "Configures the color of the 4th group of marked tiles",
hidden = true, hidden = true,
unhide = "amount", unhide = "amount",
unhideValue = "4 || 5 || 6 || 7 || 8" unhideValue = "4 || 5 || 6 || 7 || 8 || 9 || 10 || 11 || 12"
) )
default Color markerColor4() default Color markerColor4()
{ {
@@ -142,7 +146,7 @@ public interface GroundMarkerConfig extends Config
description = "Configures the color of the 5th group of marked tiles", description = "Configures the color of the 5th group of marked tiles",
hidden = true, hidden = true,
unhide = "amount", unhide = "amount",
unhideValue = "5 || 6 || 7 || 8" unhideValue = "5 || 6 || 7 || 8 || 9 || 10 || 11 || 12"
) )
default Color markerColor5() default Color markerColor5()
{ {
@@ -157,7 +161,7 @@ public interface GroundMarkerConfig extends Config
description = "Configures the color of the 6th group of marked tiles", description = "Configures the color of the 6th group of marked tiles",
hidden = true, hidden = true,
unhide = "amount", unhide = "amount",
unhideValue = "6 || 7 || 8" unhideValue = "6 || 7 || 8 || 9 || 10 || 11 || 12"
) )
default Color markerColor6() default Color markerColor6()
{ {
@@ -172,7 +176,7 @@ public interface GroundMarkerConfig extends Config
description = "Configures the color of the 7th group of marked tiles", description = "Configures the color of the 7th group of marked tiles",
hidden = true, hidden = true,
unhide = "amount", unhide = "amount",
unhideValue = "7 || 8" unhideValue = "7 || 8 || 9 || 10 || 11 || 12"
) )
default Color markerColor7() default Color markerColor7()
{ {
@@ -187,15 +191,75 @@ public interface GroundMarkerConfig extends Config
description = "Configures the color of the 8th group of marked tiles", description = "Configures the color of the 8th group of marked tiles",
hidden = true, hidden = true,
unhide = "amount", unhide = "amount",
unhideValue = "8" unhideValue = "8 || 9 || 10 || 11 || 12"
) )
default Color markerColor8() default Color markerColor8()
{ {
return Color.MAGENTA; return Color.MAGENTA;
} }
@Alpha
@ConfigItem( @ConfigItem(
position = 10, position = 10,
keyName = "markerColor9",
name = "Group 9 tile color",
description = "Configures the color of the 9th group of marked tiles",
hidden = true,
unhide = "amount",
unhideValue = "9 || 10 || 11 || 12"
)
default Color markerColor9()
{
return Color.CYAN;
}
@Alpha
@ConfigItem(
position = 11,
keyName = "markerColor10",
name = "Group 10 tile color",
description = "Configures the color of the 10th group of marked tiles",
hidden = true,
unhide = "amount",
unhideValue = "10 || 11 || 12"
)
default Color markerColor10()
{
return Color.ORANGE;
}
@Alpha
@ConfigItem(
position = 12,
keyName = "markerColor11",
name = "Group 11 tile color",
description = "Configures the color of the 11th group of marked tiles",
hidden = true,
unhide = "amount",
unhideValue = "11 || 12"
)
default Color markerColor11()
{
return Color.PINK;
}
@Alpha
@ConfigItem(
position = 13,
keyName = "markerColor12",
name = "Group 12 tile color",
description = "Configures the color of the 12th group of marked tiles",
hidden = true,
unhide = "amount",
unhideValue = "12"
)
default Color markerColor12()
{
return Color.LIGHT_GRAY;
}
@ConfigItem(
position = 14,
keyName = "showMinimap", keyName = "showMinimap",
name = "Show on minimap", name = "Show on minimap",
description = "Shows marked tiles on the minimap" description = "Shows marked tiles on the minimap"
@@ -210,7 +274,7 @@ public interface GroundMarkerConfig extends Config
max = 100 max = 100
) )
@ConfigItem( @ConfigItem(
position = 11, position = 15,
keyName = "minimapOpacity", keyName = "minimapOpacity",
name = "Minimap opacity", name = "Minimap opacity",
description = "The opacity of the minimap markers" description = "The opacity of the minimap markers"

View File

@@ -101,6 +101,18 @@ class GroundMarkerMinimapOverlay extends Overlay
break; break;
case 8: case 8:
color = plugin.getMarkerColor8(); color = plugin.getMarkerColor8();
break;
case 9:
color = plugin.getMarkerColor9();
break;
case 10:
color = plugin.getMarkerColor10();
break;
case 11:
color = plugin.getMarkerColor11();
break;
case 12:
color = plugin.getMarkerColor12();
} }
int opacity = (int) floor(plugin.getMinimapOverlayOpacity() * 2.55); int opacity = (int) floor(plugin.getMinimapOverlayOpacity() * 2.55);

View File

@@ -113,6 +113,18 @@ public class GroundMarkerOverlay extends Overlay
break; break;
case 8: case 8:
color = plugin.getMarkerColor8(); color = plugin.getMarkerColor8();
break;
case 9:
color = plugin.getMarkerColor9();
break;
case 10:
color = plugin.getMarkerColor10();
break;
case 11:
color = plugin.getMarkerColor11();
break;
case 12:
color = plugin.getMarkerColor12();
} }
OverlayUtil.renderPolygon(graphics, poly, color); OverlayUtil.renderPolygon(graphics, poly, color);
} }

View File

@@ -162,6 +162,14 @@ public class GroundMarkerPlugin extends Plugin
@Getter(AccessLevel.PACKAGE) @Getter(AccessLevel.PACKAGE)
private Color markerColor8; private Color markerColor8;
@Getter(AccessLevel.PACKAGE) @Getter(AccessLevel.PACKAGE)
private Color markerColor9;
@Getter(AccessLevel.PACKAGE)
private Color markerColor10;
@Getter(AccessLevel.PACKAGE)
private Color markerColor11;
@Getter(AccessLevel.PACKAGE)
private Color markerColor12;
@Getter(AccessLevel.PACKAGE)
private boolean showMinimap; private boolean showMinimap;
@Getter(AccessLevel.PACKAGE) @Getter(AccessLevel.PACKAGE)
private int minimapOverlayOpacity; private int minimapOverlayOpacity;
@@ -459,6 +467,18 @@ public class GroundMarkerPlugin extends Plugin
break; break;
case 8: case 8:
color = this.markerColor8; color = this.markerColor8;
break;
case 9:
color = this.markerColor9;
break;
case 10:
color = this.markerColor10;
break;
case 11:
color = this.markerColor11;
break;
case 12:
color = this.markerColor12;
} }
return color; return color;
@@ -483,6 +503,10 @@ public class GroundMarkerPlugin extends Plugin
this.markerColor6 = config.markerColor6(); this.markerColor6 = config.markerColor6();
this.markerColor7 = config.markerColor7(); this.markerColor7 = config.markerColor7();
this.markerColor8 = config.markerColor8(); this.markerColor8 = config.markerColor8();
this.markerColor9 = config.markerColor9();
this.markerColor10 = config.markerColor10();
this.markerColor11 = config.markerColor11();
this.markerColor12 = config.markerColor12();
this.showMinimap = config.showMinimap(); this.showMinimap = config.showMinimap();
this.minimapOverlayOpacity = config.minimapOverlayOpacity(); this.minimapOverlayOpacity = config.minimapOverlayOpacity();
} }