Преглед на файлове

made checkbox's visually better

Jared преди 5 години
родител
ревизия
537fb2fc86
променени са 1 файла, в които са добавени 6 реда и са изтрити 1 реда
  1. 6 1
      src/main/java/com/blamejared/controlling/client/gui/GuiCheckBox.java

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

@@ -26,7 +26,12 @@ public class GuiCheckBox extends Button {
         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;
-            GuiUtils.drawContinuousTexturedBox(WIDGETS_LOCATION, this.x, this.y, 0, 46, this.boxWidth, this.height, 200, 20, 2, 3, 2, 2, 500);
+            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);
+            } else {
+                GuiUtils.drawContinuousTexturedBox(WIDGETS_LOCATION, this.x, this.y, 0, 46, this.boxWidth, this.height, 200, 20, 2, 3, 2, 2, 500);
+            }
             int color = 14737632;
             
             if(packedFGColor != 0) {