Improve a few conditions in ClickBox.kt

This commit is contained in:
Username404-59 2021-05-12 23:40:47 +02:00
parent 3dec941303
commit a65f536304
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 1 additions and 1 deletions

View File

@ -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