From 43c014a8db9ad4d44c19190718835a7596dc0a2d Mon Sep 17 00:00:00 2001 From: Albi <12825442+Flanisch@users.noreply.github.com> Date: Mon, 15 Aug 2022 21:27:24 +0200 Subject: Overriding GUI colors with .mcmeta (#1261) * Implemented gui textcolor override with .mcmeta files * cleanup * Added shared class to reduce code duplication * Moved #drawLine back to GT_NEI_DefaultHandler --- src/main/java/gregtech/api/gui/widgets/GT_GuiCoverTabLine.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java/gregtech/api/gui/widgets/GT_GuiCoverTabLine.java') diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiCoverTabLine.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiCoverTabLine.java index c470936db2..8f729771f6 100644 --- a/src/main/java/gregtech/api/gui/widgets/GT_GuiCoverTabLine.java +++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiCoverTabLine.java @@ -35,7 +35,7 @@ public class GT_GuiCoverTabLine extends GT_GuiTabLine { // Not sure there's a point in JIT translation but that's what this is private String[] translatedSides; private IGregTechTileEntity tile; - private Dyes colorization; + private int colorization; /** * Let's you access an IGregTechTileEntity's covers as tabs on the GUI's sides @@ -58,7 +58,7 @@ public class GT_GuiCoverTabLine extends GT_GuiTabLine { */ public GT_GuiCoverTabLine(GT_GUIContainerMetaTile_Machine gui, int tabLineLeft, int tabLineTop, int tabHeight, int tabWidth, int tabSpacing, DisplayStyle xDir, DisplayStyle yDir, DisplayStyle displayMode, - GT_GuiTabIconSet tabBackground, IGregTechTileEntity tile, Dyes colorization) { + GT_GuiTabIconSet tabBackground, IGregTechTileEntity tile, int colorization) { super(gui, 6, tabLineLeft, tabLineTop, tabHeight, tabWidth, tabSpacing, xDir, yDir, displayMode, tabBackground); this.tile = tile; this.colorization = colorization; @@ -81,7 +81,7 @@ public class GT_GuiCoverTabLine extends GT_GuiTabLine { @Override protected void drawBackground(float parTicks, int mouseX, int mouseY) { // Apply this tile's coloration to draw the background - GL11.glColor3ub((byte) colorization.mRGBa[0], (byte) colorization.mRGBa[1], (byte) colorization.mRGBa[2]); + GL11.glColor3ub((byte) ((colorization >> 16) & 0xFF), (byte) ((colorization >> 8) & 0xFF), (byte) (colorization & 0xFF)); super.drawBackground(parTicks, mouseX, mouseY); } -- cgit