From bbd40c34e104dcead78290af1394e6f5867df565 Mon Sep 17 00:00:00 2001 From: Albi <12825442+Flanisch@users.noreply.github.com> Date: Fri, 12 Aug 2022 20:34:37 +0200 Subject: Added means of customizing GUI colors for resource packs (#1203) * Added means of customizing GUI colors through lang file * Color values are now stored in json file instead of the lang file * Made json only load upon resource reload and ensured server compatibility Co-authored-by: Martin Robertz --- src/main/java/gregtech/api/gui/GT_GUIContainer_4by4.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main/java/gregtech/api/gui/GT_GUIContainer_4by4.java') diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainer_4by4.java b/src/main/java/gregtech/api/gui/GT_GUIContainer_4by4.java index 6c28653c0f..fa2695b633 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIContainer_4by4.java +++ b/src/main/java/gregtech/api/gui/GT_GUIContainer_4by4.java @@ -1,5 +1,6 @@ package gregtech.api.gui; +import gregtech.api.enums.GuiColors; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.entity.player.InventoryPlayer; @@ -8,6 +9,7 @@ import static gregtech.api.enums.GT_Values.RES_PATH_GUI; public class GT_GUIContainer_4by4 extends GT_GUIContainerMetaTile_Machine { private final String mName; + private final int textColor = GuiColors.fourByFour.getColor(); public GT_GUIContainer_4by4(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) { super(new GT_Container_4by4(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "4by4.png"); @@ -21,7 +23,7 @@ public class GT_GUIContainer_4by4 extends GT_GUIContainerMetaTile_Machine { @Override protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { - fontRendererObj.drawString(mName, 8, 4, 4210752); + fontRendererObj.drawString(mName, 8, 4, textColor); } @Override -- cgit