File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
src/main/kotlin/com/lambda/client/gui/rgui/windows Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -131,13 +131,16 @@ open class ListWindow(
131
131
val maxScrollProgress = lastVisible?.let { max(it.posY + it.height + ClickGUI .verticalMargin + ClickGUI .resizeBar - height, 0.01f ) }
132
132
? : draggableHeight
133
133
134
- scrollProgress = (scrollProgress + scrollSpeed)
135
- scrollSpeed * = 0.5f
134
+ var newProgress = scrollProgress + scrollSpeed
136
135
137
136
if (! ClickGUI .scrollRubberband) {
138
- scrollProgress = scrollProgress.coerceIn(.0f , maxScrollProgress)
139
- prevScrollProgress = prevScrollProgress.coerceIn(.0f , maxScrollProgress)
140
- } else if (scrollTimer.tick(100L , false )) {
137
+ newProgress = newProgress.coerceIn(0.0f , maxScrollProgress)
138
+ }
139
+
140
+ scrollProgress = newProgress
141
+ scrollSpeed * = 0.5f
142
+
143
+ if (scrollTimer.tick(100L , false )) {
141
144
if (scrollProgress < 0 ) {
142
145
scrollSpeed = scrollProgress * - ClickGUI .scrollRubberbandSpeed
143
146
} else if (scrollProgress > maxScrollProgress) {
You can’t perform that action at this time.
0 commit comments