diff options
author | Juuxel <6596629+Juuxel@users.noreply.github.com> | 2021-02-27 17:28:23 +0200 |
---|---|---|
committer | Juuxel <6596629+Juuxel@users.noreply.github.com> | 2021-02-27 17:28:23 +0200 |
commit | 55797f31d267ed88b87621105b910406adc7507a (patch) | |
tree | 45ec73a65bb0691b46d59f0a1703a0e2504da336 /src/main | |
parent | ae3311e993d402d0d26db5e9e0494adcbc9c59b5 (diff) | |
download | LibGui-55797f31d267ed88b87621105b910406adc7507a.tar.gz LibGui-55797f31d267ed88b87621105b910406adc7507a.tar.bz2 LibGui-55797f31d267ed88b87621105b910406adc7507a.zip |
Add WAbstractSlider.isDragging()
Closes #100.
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/io/github/cottonmc/cotton/gui/widget/WAbstractSlider.java | 10 |
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 |