소스 검색

Made hovering over the text trigger text box hover

Jared 5 년 전
부모
커밋
2426a90125
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/main/java/com/blamejared/controlling/client/gui/GuiCheckBox.java

+ 1 - 1
src/main/java/com/blamejared/controlling/client/gui/GuiCheckBox.java

@@ -28,7 +28,7 @@ public class GuiCheckBox extends Button {
     public void renderButton(int mouseX, int mouseY, float partial) {
         if(this.visible) {
             Minecraft mc = Minecraft.getInstance();
-            this.isHovered = mouseX >= this.x && mouseY >= this.y && mouseX < this.x + this.boxWidth && mouseY < this.y + this.height;
+            this.isHovered = mouseX >= this.x && mouseY >= this.y && mouseX < this.x + this.width && mouseY < this.y + this.height;
             if(isHovered()) {
                 GuiUtils.drawContinuousTexturedBox(WIDGETS_LOCATION, this.x, this.y, 0, 86, this.boxWidth, this.height, 200, 20, 2, 3, 2, 2, 500);
                 GuiUtils.drawContinuousTexturedBox(WIDGETS_LOCATION, this.x + 1, this.y + 1, 1, 45, this.boxWidth - 1, this.height - 2, 200, 20, 2, 3, 2, 2, 500);