aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/gui/widgets/GT_GuiCoverTabLine.java
diff options
context:
space:
mode:
authorAlbi <12825442+Flanisch@users.noreply.github.com>2022-08-15 21:27:24 +0200
committerGitHub <noreply@github.com>2022-08-15 21:27:24 +0200
commit43c014a8db9ad4d44c19190718835a7596dc0a2d (patch)
tree173ca882874af36bde55889ae585dc9111825184 /src/main/java/gregtech/api/gui/widgets/GT_GuiCoverTabLine.java
parented8fb594433346dfd37235c0604851436e0980df (diff)
downloadGT5-Unofficial-43c014a8db9ad4d44c19190718835a7596dc0a2d.tar.gz
GT5-Unofficial-43c014a8db9ad4d44c19190718835a7596dc0a2d.tar.bz2
GT5-Unofficial-43c014a8db9ad4d44c19190718835a7596dc0a2d.zip
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
Diffstat (limited to 'src/main/java/gregtech/api/gui/widgets/GT_GuiCoverTabLine.java')
-rw-r--r--src/main/java/gregtech/api/gui/widgets/GT_GuiCoverTabLine.java6
1 files changed, 3 insertions, 3 deletions
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);
}