From 4587fc8700462a939ae5ee5cd81a2ff176880001 Mon Sep 17 00:00:00 2001 From: Juuxel Date: Sun, 1 Sep 2019 10:50:05 +0300 Subject: Improve dark slider textures --- .../java/io/github/cottonmc/cotton/gui/widget/WAbstractSlider.java | 4 ++-- src/main/java/io/github/cottonmc/cotton/gui/widget/WSlider.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java') 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 677686d..e07be56 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 @@ -28,7 +28,7 @@ public abstract class WAbstractSlider extends WWidget { /** * The minimum time between two draggingFinished events caused by scrolling ({@link #onMouseScroll}). */ - private static final int SCROLLING_DRAGGING_FINISHED_RATE_LIMIT = 10; + private static final int DRAGGING_FINISHED_RATE_LIMIT_FOR_SCROLLING = 10; protected final int min, max; protected final Axis axis; @@ -161,7 +161,7 @@ public abstract class WAbstractSlider extends WWidget { if (pendingDraggingFinishedFromScrolling && draggingFinishedFromScrollingTimer <= 0) { if (draggingFinishedListener != null) draggingFinishedListener.accept(value); pendingDraggingFinishedFromScrolling = false; - draggingFinishedFromScrollingTimer = SCROLLING_DRAGGING_FINISHED_RATE_LIMIT; + draggingFinishedFromScrollingTimer = DRAGGING_FINISHED_RATE_LIMIT_FOR_SCROLLING; } } 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 b921945..2dd3a8e 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 @@ -18,7 +18,7 @@ import javax.annotation.Nullable; public class WSlider extends WAbstractSlider { public static final int TRACK_WIDTH = 6; public static final int THUMB_SIZE = 8; - public static final Identifier LIGHT_TEXTURE = new Identifier("libgui", "textures/widget/slider.png"); + public static final Identifier LIGHT_TEXTURE = new Identifier("libgui", "textures/widget/slider_light.png"); public static final Identifier DARK_TEXTURE = new Identifier("libgui", "textures/widget/slider_dark.png"); @Environment(EnvType.CLIENT) -- cgit