diff options
Diffstat (limited to 'src')
3 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WAbstractSlider.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WAbstractSlider.java index 7a2ccec..d864b3b 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WAbstractSlider.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WAbstractSlider.java @@ -72,7 +72,7 @@ public abstract class WAbstractSlider extends WWidget { this.max = max; this.axis = axis; this.value = min; - this.direction = (axis == Axis.HORIZONTAL) ? Direction.RIGHT : Direction.UP; + this.direction = (axis == Axis.HORIZONTAL) ? Direction.LEFT : Direction.UP; } /** diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabeledSlider.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabeledSlider.java index 2ff9f68..77e51ce 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabeledSlider.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabeledSlider.java @@ -164,7 +164,7 @@ public class WLabeledSlider extends WAbstractSlider { int aWidth = axis == Axis.HORIZONTAL ? width : height; int aHeight = axis == Axis.HORIZONTAL ? height : width; int rotMouseX = axis == Axis.HORIZONTAL - ? (direction == Direction.RIGHT ? width - mouseX : mouseX) + ? (direction == Direction.LEFT ? width - mouseX : mouseX) : (direction == Direction.UP ? height - mouseY : mouseY); int rotMouseY = axis == Axis.HORIZONTAL ? mouseY : mouseX; diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WSlider.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WSlider.java index 630f23a..5934997 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WSlider.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WSlider.java @@ -72,7 +72,7 @@ public class WSlider extends WAbstractSlider { ScreenDrawing.texturedRect(trackX, y + height, TRACK_WIDTH, 1, texture, 16*px, 2*px, 22*px, 3*px, 0xFFFFFFFF); } else { int trackY = y + height / 2 - TRACK_WIDTH / 2; - thumbX = direction == Direction.RIGHT + thumbX = direction == Direction.LEFT ? (width - THUMB_SIZE) + 1 - (int) (coordToValueRatio * (value - min)) : Math.round(coordToValueRatio * (value - min)); thumbY = height / 2 - THUMB_SIZE / 2; |