Limit the progressBar height when there are only a few buttons
This commit is contained in:
parent
a973d8c001
commit
1c091b82ea
|
@ -46,7 +46,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 < (buttons.size * 8)) && (height < originalHeight)) || (supplied > 0))) {
|
||||
height -= supplied.toInt()
|
||||
if (buttons.isNotEmpty()) (height / 8).let {
|
||||
if (it > 0) barStage = it
|
||||
|
|
Loading…
Reference in New Issue