diff --git a/src/main/java/forestry/apiculture/gui/GuiHabitatLocator.java b/src/main/java/forestry/apiculture/gui/GuiHabitatLocator.java index a4cf424eb..574ac1e86 100755 --- a/src/main/java/forestry/apiculture/gui/GuiHabitatLocator.java +++ b/src/main/java/forestry/apiculture/gui/GuiHabitatLocator.java @@ -30,6 +30,7 @@ import forestry.apiculture.gui.widgets.HabitatSlot; import forestry.apiculture.inventory.ItemInventoryHabitatLocator; import forestry.core.config.Constants; import forestry.core.gui.GuiForestry; +import forestry.core.render.ColourProperties; import forestry.core.utils.Translator; public class GuiHabitatLocator extends GuiForestry { @@ -85,7 +86,7 @@ public class GuiHabitatLocator extends GuiForestry activeBiomeTypes = EnumSet.noneOf(BiomeDictionary.Type.class); diff --git a/src/main/java/forestry/apiculture/gui/GuiImprinter.java b/src/main/java/forestry/apiculture/gui/GuiImprinter.java index e8fef311f..07074a10f 100755 --- a/src/main/java/forestry/apiculture/gui/GuiImprinter.java +++ b/src/main/java/forestry/apiculture/gui/GuiImprinter.java @@ -28,6 +28,7 @@ import forestry.core.gui.GuiForestry; import forestry.core.gui.GuiUtil; import forestry.core.network.packets.PacketGuiSelectRequest; import forestry.core.proxy.Proxies; +import forestry.core.render.ColourProperties; import forestry.core.utils.Translator; public class GuiImprinter extends GuiForestry { @@ -58,19 +59,19 @@ public class GuiImprinter extends GuiForestry { @@ -41,7 +42,7 @@ public class GuiSolderingIron extends GuiForestry { @@ -60,9 +61,9 @@ public class GuiAlyzer extends GuiForestry { public final int getColorCoding(boolean dominant) { if (dominant) { - return fontColor.get("gui.beealyzer.dominant"); + return ColourProperties.INSTANCE.get("gui.beealyzer.dominant"); } else { - return fontColor.get("gui.beealyzer.recessive"); + return ColourProperties.INSTANCE.get("gui.beealyzer.recessive"); } } @@ -83,7 +84,7 @@ public class GuiAlyzer extends GuiForestry { } public final void drawRow(String text0, String text1, String text2, IIndividual individual, IChromosomeType chromosome) { - textLayout.drawRow(text0, text1, text2, fontColor.get("gui.screen"), getColorCoding(individual.getGenome().getActiveAllele(chromosome).isDominant()), + textLayout.drawRow(text0, text1, text2, ColourProperties.INSTANCE.get("gui.screen"), getColorCoding(individual.getGenome().getActiveAllele(chromosome).isDominant()), getColorCoding(individual.getGenome().getInactiveAllele(chromosome).isDominant())); } @@ -91,7 +92,7 @@ public class GuiAlyzer extends GuiForestry { IAllele active = individual.getGenome().getActiveAllele(chromosome); IAllele inactive = individual.getGenome().getInactiveAllele(chromosome); textLayout.drawRow(chromosomeName, active.getName(), inactive.getName(), - fontColor.get("gui.screen"), getColorCoding(active.isDominant()), + ColourProperties.INSTANCE.get("gui.screen"), getColorCoding(active.isDominant()), getColorCoding(inactive.isDominant())); } @@ -195,10 +196,10 @@ public class GuiAlyzer extends GuiForestry { textLayout.newLine(); String title = Translator.translateToLocal("for.gui.portablealyzer").toUpperCase(); - textLayout.drawCenteredLine(title, 8, 208, fontColor.get("gui.screen")); + textLayout.drawCenteredLine(title, 8, 208, ColourProperties.INSTANCE.get("gui.screen")); textLayout.newLine(); - fontRendererObj.drawSplitString(Translator.translateToLocal("for.gui.portablealyzer.help"), guiLeft + COLUMN_0 + 4, guiTop + 42, 200, fontColor.get("gui.screen")); + fontRendererObj.drawSplitString(Translator.translateToLocal("for.gui.portablealyzer.help"), guiLeft + COLUMN_0 + 4, guiTop + 42, 200, ColourProperties.INSTANCE.get("gui.screen")); textLayout.newLine(); textLayout.newLine(); textLayout.newLine(); @@ -265,7 +266,7 @@ public class GuiAlyzer extends GuiForestry { if (AlleleManager.alleleRegistry.isBlacklisted(individual.getIdent())) { String extinct = ">> " + Translator.translateToLocal("for.gui.alyzer.extinct").toUpperCase() + " <<"; fontRendererObj.drawStringWithShadow(extinct, guiLeft + 200 - fontRendererObj.getStringWidth(extinct), - guiTop + textLayout.getLineY(), fontColor.get("gui.beealyzer.dominant")); + guiTop + textLayout.getLineY(), ColourProperties.INSTANCE.get("gui.beealyzer.dominant")); } textLayout.newLine(); diff --git a/src/main/java/forestry/core/gui/GuiForestry.java b/src/main/java/forestry/core/gui/GuiForestry.java index 7979fb41e..31b622783 100755 --- a/src/main/java/forestry/core/gui/GuiForestry.java +++ b/src/main/java/forestry/core/gui/GuiForestry.java @@ -26,7 +26,7 @@ import forestry.core.gui.ledgers.PowerLedger; import forestry.core.gui.widgets.WidgetManager; import forestry.core.owner.IOwnedTile; import forestry.core.proxy.Proxies; -import forestry.core.render.FontColour; +import forestry.core.render.ColourProperties; import forestry.core.render.ForestryResource; import forestry.core.tiles.IClimatised; import forestry.core.tiles.IPowerHandler; @@ -49,7 +49,6 @@ public abstract class GuiForestry ext protected final WidgetManager widgetManager; protected LedgerManager ledgerManager; protected TextLayoutHelper textLayout; - protected FontColour fontColor; protected GuiForestry(String texture, C container, I inventory) { this(new ForestryResource(texture), container, inventory); @@ -65,8 +64,7 @@ public abstract class GuiForestry ext this.inventory = inventory; this.container = container; - this.fontColor = new FontColour(Proxies.render.getSelectedTexturePack()); - this.textLayout = new TextLayoutHelper(this, this.fontColor); + this.textLayout = new TextLayoutHelper(this, ColourProperties.INSTANCE); } /* LEDGERS */ @@ -122,8 +120,8 @@ public abstract class GuiForestry ext ledgerManager.onGuiClosed(); } - public FontColour getFontColor() { - return fontColor; + public ColourProperties getFontColor() { + return ColourProperties.INSTANCE; } public FontRenderer getFontRenderer() { diff --git a/src/main/java/forestry/core/gui/GuiForestryTitled.java b/src/main/java/forestry/core/gui/GuiForestryTitled.java index 7097c26f1..53cf3551c 100644 --- a/src/main/java/forestry/core/gui/GuiForestryTitled.java +++ b/src/main/java/forestry/core/gui/GuiForestryTitled.java @@ -12,7 +12,7 @@ package forestry.core.gui; import net.minecraft.inventory.Container; import net.minecraft.inventory.IInventory; - +import forestry.core.render.ColourProperties; import forestry.core.tiles.ITitled; import forestry.core.utils.Translator; @@ -28,7 +28,7 @@ public abstract class GuiForestryTitled { @@ -40,7 +41,7 @@ public class GuiInfuser extends GuiForestry { String prompt = Translator.translateToLocal("for.gui.mail.nametrader"); textLayout.startPage(); textLayout.newLine(); - textLayout.drawCenteredLine(prompt, 0, fontColor.get("gui.mail.text")); + textLayout.drawCenteredLine(prompt, 0, ColourProperties.INSTANCE.get("gui.mail.text")); textLayout.endPage(); addressNameField.drawTextBox(); } diff --git a/src/main/java/forestry/mail/gui/GuiTrader.java b/src/main/java/forestry/mail/gui/GuiTrader.java index fa4da2a33..c7bb67bc9 100755 --- a/src/main/java/forestry/mail/gui/GuiTrader.java +++ b/src/main/java/forestry/mail/gui/GuiTrader.java @@ -14,6 +14,7 @@ import net.minecraft.entity.player.InventoryPlayer; import forestry.core.config.Constants; import forestry.core.gui.GuiForestry; +import forestry.core.render.ColourProperties; import forestry.core.utils.Translator; import forestry.mail.tiles.TileTrader; @@ -28,13 +29,13 @@ public class GuiTrader extends GuiForestry { @Override protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { String name = Translator.translateToLocal(inventory.getUnlocalizedTitle()); - this.fontRendererObj.drawString(name, textLayout.getCenteredOffset(name), 6, fontColor.get("gui.mail.text")); + this.fontRendererObj.drawString(name, textLayout.getCenteredOffset(name), 6, ColourProperties.INSTANCE.get("gui.mail.text")); String receive = Translator.translateToLocal("for.gui.mail.receive"); - this.fontRendererObj.drawString(receive, textLayout.getCenteredOffset(receive, 70) + 51, 45, fontColor.get("gui.mail.text")); + this.fontRendererObj.drawString(receive, textLayout.getCenteredOffset(receive, 70) + 51, 45, ColourProperties.INSTANCE.get("gui.mail.text")); String send = Translator.translateToLocal("for.gui.mail.send"); - this.fontRendererObj.drawString(send, textLayout.getCenteredOffset(send, 70) + 51, 99, fontColor.get("gui.mail.text")); + this.fontRendererObj.drawString(send, textLayout.getCenteredOffset(send, 70) + 51, 99, ColourProperties.INSTANCE.get("gui.mail.text")); super.drawGuiContainerForegroundLayer(mouseX, mouseY); } @@ -43,6 +44,6 @@ public class GuiTrader extends GuiForestry { protected void drawGuiContainerBackgroundLayer(float var1, int mouseX, int mouseY) { super.drawGuiContainerBackgroundLayer(var1, mouseX, mouseY); - fontRendererObj.drawString(container.getAddress().getName(), guiLeft + 19, guiTop + 22, fontColor.get("gui.mail.text")); + fontRendererObj.drawString(container.getAddress().getName(), guiLeft + 19, guiTop + 22, ColourProperties.INSTANCE.get("gui.mail.text")); } }