From 06c730b166caf0545c4f7894aed44e0284caea01 Mon Sep 17 00:00:00 2001 From: luisc Date: Fri, 21 Jan 2022 01:15:21 -0600 Subject: [PATCH] Fixed scale & color issues for custom GUI textured rectangles. --- .../client/gui/custom/components/CustomGuiTexturedRect.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/noppes/npcs/client/gui/custom/components/CustomGuiTexturedRect.java b/src/main/java/noppes/npcs/client/gui/custom/components/CustomGuiTexturedRect.java index f81de23ce..992e024ca 100644 --- a/src/main/java/noppes/npcs/client/gui/custom/components/CustomGuiTexturedRect.java +++ b/src/main/java/noppes/npcs/client/gui/custom/components/CustomGuiTexturedRect.java @@ -56,7 +56,11 @@ public class CustomGuiTexturedRect extends Gui implements IGuiComponent { boolean hovered = mouseX >= this.x && mouseY >= this.y && mouseX < this.x + this.width && mouseY < this.y + this.height; mc.getTextureManager().bindTexture(this.texture); - this.drawTexturedModalRect(this.x, this.y, this.textureX, this.textureY, (int)(this.width*this.scale), (int)(this.height*this.scale)); + GL11.glPushMatrix(); + GL11.glColor4f(1.0F,1.0F,1.0F,1.0F); + GL11.glScalef(this.scale, this.scale, this.scale); + this.drawTexturedModalRect((int) (this.x/this.scale), (int) (this.y/this.scale), this.textureX, this.textureY, (int)(this.width), (int)(this.height)); + GL11.glPopMatrix(); if (hovered && this.hoverText != null && this.hoverText.length > 0) { this.parent.hoverText = this.hoverText;