mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-17 19:25:06 +00:00
adjust scrolling
This commit is contained in:
1 parent
3ae2128564
commit
587afa8e1d
2 files changed
+3
-9
No files matched your search
@@ -78,8 +78,8 @@ public class GuiScrollbar {
|
||||
|
||||
if (x > displayX && x <= displayX + width) {
|
||||
if (y > displayY && y <= displayY + scrollHeight) {
|
||||
int currentScroll = (y - displayY);
|
||||
currentScroll = Math.round(1.0f * currentScroll / scrollHeight) * getMaxScroll();
|
||||
int currentScroll = (y - displayY - height / 2);
|
||||
currentScroll = Math.round(1.0f * currentScroll * getMaxScroll() / (scrollHeight - height));
|
||||
setCurrentScroll(applyRange(currentScroll));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user