aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/gui/widget/PanelWidget.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/me/shedaniel/rei/gui/widget/PanelWidget.java')
-rw-r--r--src/main/java/me/shedaniel/rei/gui/widget/PanelWidget.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main/java/me/shedaniel/rei/gui/widget/PanelWidget.java b/src/main/java/me/shedaniel/rei/gui/widget/PanelWidget.java
index e6b534dcd..310d62263 100644
--- a/src/main/java/me/shedaniel/rei/gui/widget/PanelWidget.java
+++ b/src/main/java/me/shedaniel/rei/gui/widget/PanelWidget.java
@@ -28,6 +28,12 @@ public class PanelWidget extends WidgetWithBounds {
this.bounds = bounds;
}
+ public static void render(Rectangle bounds, int color) {
+ TEMP.bounds = bounds;
+ TEMP.color = color;
+ TEMP.render();
+ }
+
@Override
public Rectangle getBounds() {
return bounds;
@@ -38,12 +44,6 @@ public class PanelWidget extends WidgetWithBounds {
return Collections.emptyList();
}
- public static void render(Rectangle bounds, int color) {
- TEMP.bounds = bounds;
- TEMP.color = color;
- TEMP.render();
- }
-
public void render() {
render(0, 0, 0);
}
@@ -60,10 +60,10 @@ public class PanelWidget extends WidgetWithBounds {
public void render(int mouseX, int mouseY, float delta) {
if (!isRendering())
return;
+ float alpha = ((color >> 24) & 0xFF) / 255f;
float red = ((color >> 16) & 0xFF) / 255f;
float green = ((color >> 8) & 0xFF) / 255f;
- float blue = ((color >> 0) & 0xFF) / 255f;
- float alpha = ((color >> 32) & 0xFF) / 255f;
+ float blue = (color & 0xFF) / 255f;
RenderSystem.color4f(red, green, blue, alpha);
minecraft.getTextureManager().bindTexture(ScreenHelper.isDarkModeEnabled() ? CHEST_GUI_TEXTURE_DARK : CHEST_GUI_TEXTURE);
int x = bounds.x, y = bounds.y, width = bounds.width, height = bounds.height;