From 6bf2f8a563865d89d7e0ad32da6ca702c1cce641 Mon Sep 17 00:00:00 2001 From: Juuxel Date: Tue, 27 Aug 2019 19:09:13 +0300 Subject: Fix todo in WSlider --- .../java/io/github/cottonmc/cotton/gui/client/modmenu/ConfigGui.java | 2 +- src/main/java/io/github/cottonmc/cotton/gui/widget/WSlider.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/io') diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/ConfigGui.java b/src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/ConfigGui.java index 454df9d..61d5d36 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/ConfigGui.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/ConfigGui.java @@ -27,7 +27,7 @@ public class ConfigGui extends LightweightGuiDescription { WTextField testField = new WTextField(); testField.setSuggestion("test"); root.add(testField, 0, 3, 4, 1); - root.add(new WSlider(100, 0, Axis.VERTICAL).setValueChangeListener(System.out::println), 0, 4, 1, 4); + root.add(new WSlider(50, 100, Axis.VERTICAL).setValueChangeListener(System.out::println), 0, 4, 1, 4); root.add(new WSlider(0, 123, Axis.HORIZONTAL).setValueChangeListener(System.out::println), 1, 4, 4, 1); root.add(new WKirbSprite(), 5, 4); 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 5aae891..c63b5ee 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 @@ -22,10 +22,10 @@ import java.util.function.IntConsumer; * * */ +// TODO: Fix the blocked pixel at the top of vertical sliders public class WSlider extends WWidget { private static final int TRACK_WIDTH = 6; private static final int THUMB_SIZE = 8; - // TODO: Horizontal textures private static final Identifier TEXTURE = new Identifier("libgui", "textures/widget/slider.png"); private final int min, max; -- cgit