aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WAbstractSlider.java10
1 files changed, 10 insertions, 0 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 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
@@ -344,6 +344,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.
*
* @param ch the key code