From 7e61da56c52ebfa00c2fdd036b6dc83d4c0f4e21 Mon Sep 17 00:00:00 2001 From: Juuxel <6596629+Juuxel@users.noreply.github.com> Date: Fri, 8 May 2020 21:52:55 +0300 Subject: Fix left and right being swapped when dragging sliders --- .../java/io/github/cottonmc/cotton/gui/widget/WAbstractSlider.java | 4 ++-- 1 file changed, 2 insertions(+), 2 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 c8570fd..8f93221 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 @@ -144,11 +144,11 @@ public abstract class WAbstractSlider extends WWidget { axisPos = y; break; case LEFT: - axisPos = x; + axisPos = width - x; break; case RIGHT: default: - axisPos = width - x; + axisPos = x; break; } -- cgit