Clean up and fix info panel configs

This commit is contained in:
Patrick
2022-06-23 22:28:26 +04:00
parent eac082b05e
commit 8a9c80ed81
2 changed files with 7 additions and 18 deletions

View File

@@ -110,21 +110,10 @@ public interface EasyGiantsFoundryConfig extends Config {
String infoPanelList = "infoPanelList"; String infoPanelList = "infoPanelList";
@ConfigItem( @ConfigItem(
keyName = "infoPanel", keyName = "infoTitle",
name = "Draw Info Panel",
description = "Toggle for drawing the information panel",
position = 0,
section = infoPanelList
)
default boolean drawInfoPanel() {
return true;
}
@ConfigItem(
keyName = "infoPanel",
name = "Title", name = "Title",
description = "Toggle for \"Easy Giant's Foundry\" text", description = "Toggle for \"Easy Giant's Foundry\" text",
position = 1, position = 0,
section = infoPanelList section = infoPanelList
) )
default boolean drawTitle() { default boolean drawTitle() {
@@ -135,7 +124,7 @@ public interface EasyGiantsFoundryConfig extends Config {
keyName = "heatInfo", keyName = "heatInfo",
name = "Heat", name = "Heat",
description = "Toggle for Heat text", description = "Toggle for Heat text",
position = 2, position = 1,
section = infoPanelList section = infoPanelList
) )
default boolean drawHeatInfo() { default boolean drawHeatInfo() {
@@ -146,7 +135,7 @@ public interface EasyGiantsFoundryConfig extends Config {
keyName = "stageInfo", keyName = "stageInfo",
name = "Stage", name = "Stage",
description = "Toggle for Stage text", description = "Toggle for Stage text",
position = 3, position = 2,
section = infoPanelList section = infoPanelList
) )
default boolean drawStageInfo() { default boolean drawStageInfo() {
@@ -157,7 +146,7 @@ public interface EasyGiantsFoundryConfig extends Config {
keyName = "actionsLeft", keyName = "actionsLeft",
name = "Actions Left", name = "Actions Left",
description = "Toggle for Actions left text", description = "Toggle for Actions left text",
position = 4, position = 3,
section = infoPanelList section = infoPanelList
) )
default boolean drawActionsLeft() { default boolean drawActionsLeft() {
@@ -168,7 +157,7 @@ public interface EasyGiantsFoundryConfig extends Config {
keyName = "heatLeft", keyName = "heatLeft",
name = "Heat Left", name = "Heat Left",
description = "Toggle for Heat left text", description = "Toggle for Heat left text",
position = 5, position = 4,
section = infoPanelList section = infoPanelList
) )
default boolean drawHeatLeft() { default boolean drawHeatLeft() {

View File

@@ -49,7 +49,7 @@ public class FoundryOverlay2D extends OverlayPanel
@Override @Override
public Dimension render(Graphics2D graphics) public Dimension render(Graphics2D graphics)
{ {
if (!state.isEnabled() || state.getCurrentStage() == null || !config.drawInfoPanel()) if (!state.isEnabled() || state.getCurrentStage() == null)
{ {
return null; return null;
} }