Fixed textured rects hover hitbox not changing with rescale

This commit is contained in:
Goodbird committed 2024-01-03 21:40:43 +03:00
1 parent 79a15fe1e8
commit 095d7f405c
1 file changed
+1 -1
@@ -63,7 +63,7 @@ public class CustomGuiTexturedRect extends Gui implements IGuiComponent {
}
public void onRender(Minecraft mc, int mouseX, int mouseY, int mouseWheel, float partialTicks) {
boolean hovered = mouseX >= this.x + GuiCustom.guiLeft && mouseY >= this.y + GuiCustom.guiTop && mouseX < this.x + GuiCustom.guiLeft + this.width && mouseY < this.y + GuiCustom.guiTop + this.height;
boolean hovered = mouseX >= this.x + GuiCustom.guiLeft && mouseY >= this.y + GuiCustom.guiTop && mouseX < this.x + GuiCustom.guiLeft + this.width*scale && mouseY < this.y + GuiCustom.guiTop + this.height*scale;
if (this.imageData != null && this.imageData.imageLoaded()) {
int totalWidth = this.imageData.getTotalWidth();