From a65f5363045a3153996aca26ce9ae57077345eab Mon Sep 17 00:00:00 2001 From: Username404-59 Date: Wed, 12 May 2021 23:40:47 +0200 Subject: [PATCH] Improve a few conditions in ClickBox.kt --- .../kotlin/fr/username404/snowygui/gui/elements/ClickBox.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/kotlin/fr/username404/snowygui/gui/elements/ClickBox.kt b/common/src/main/kotlin/fr/username404/snowygui/gui/elements/ClickBox.kt index f5d7fa3..d6ba135 100644 --- a/common/src/main/kotlin/fr/username404/snowygui/gui/elements/ClickBox.kt +++ b/common/src/main/kotlin/fr/username404/snowygui/gui/elements/ClickBox.kt @@ -48,7 +48,7 @@ class ClickBox( fun scroll(d: Double, e: Double, supplied: Double) { if (withinBounds(d, e, offsetHeight = clickboxHeightOffset.toDouble())) { with(buttonsProgressBar) { - if ((height != 8 || (supplied < 0)) && ((height != originalHeight) || (supplied > 0))) { + if ((height > 8 || (supplied < 0)) && ((height < originalHeight) || (supplied > 0))) { height -= supplied.toInt() if (buttons.isNotEmpty()) (height / 8).let { if (it > 0) barStage = it