diff options
author | Juuxel <kasperi.kauppi@gmail.com> | 2019-09-01 10:50:05 +0300 |
---|---|---|
committer | Juuxel <kasperi.kauppi@gmail.com> | 2019-09-01 10:50:05 +0300 |
commit | 4587fc8700462a939ae5ee5cd81a2ff176880001 (patch) | |
tree | 0c2522225913fd7cbcc3ae73dd63a051328be56c /src | |
parent | 0d6f07bc2360ae83d4bc4348c3cad3ed10bac12b (diff) | |
download | LibGui-4587fc8700462a939ae5ee5cd81a2ff176880001.tar.gz LibGui-4587fc8700462a939ae5ee5cd81a2ff176880001.tar.bz2 LibGui-4587fc8700462a939ae5ee5cd81a2ff176880001.zip |
Improve dark slider textures
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/io/github/cottonmc/cotton/gui/widget/WAbstractSlider.java | 4 | ||||
-rw-r--r-- | src/main/java/io/github/cottonmc/cotton/gui/widget/WSlider.java | 2 | ||||
-rw-r--r-- | src/main/resources/assets/libgui/textures/widget/slider_dark.png | bin | 2723 -> 2871 bytes | |||
-rw-r--r-- | src/main/resources/assets/libgui/textures/widget/slider_light.png (renamed from src/main/resources/assets/libgui/textures/widget/slider.png) | bin | 2978 -> 2978 bytes |
4 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 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) diff --git a/src/main/resources/assets/libgui/textures/widget/slider_dark.png b/src/main/resources/assets/libgui/textures/widget/slider_dark.png Binary files differindex fd7e8af..d558e11 100644 --- a/src/main/resources/assets/libgui/textures/widget/slider_dark.png +++ b/src/main/resources/assets/libgui/textures/widget/slider_dark.png diff --git a/src/main/resources/assets/libgui/textures/widget/slider.png b/src/main/resources/assets/libgui/textures/widget/slider_light.png Binary files differindex e41250e..e41250e 100644 --- a/src/main/resources/assets/libgui/textures/widget/slider.png +++ b/src/main/resources/assets/libgui/textures/widget/slider_light.png |