From 55797f31d267ed88b87621105b910406adc7507a Mon Sep 17 00:00:00 2001 From: Juuxel <6596629+Juuxel@users.noreply.github.com> Date: Sat, 27 Feb 2021 17:28:23 +0200 Subject: Add WAbstractSlider.isDragging() Closes #100. --- .../io/github/cottonmc/cotton/gui/widget/WAbstractSlider.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (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 bc9807c..5993179 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 @@ -343,6 +343,16 @@ public abstract class WAbstractSlider extends WWidget { } } + /** + * Tests whether the user is dragging this slider. + * + * @return true if this slider is being dragged, false otherwise + * @since 4.0.0 + */ + public boolean isDragging() { + return dragging; + } + /** * Tests if the key should decrease sliders with the specified direction. * -- cgit