Fix interactive scrolling

This commit is contained in:
DBotThePony 2022-06-16 15:02:39 +07:00
parent 7251ff7af5
commit 2597a8b15b
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -33,7 +33,7 @@ class ItemMonitorScreen(menu: ItemMonitorMenu, inventory: Inventory, title: Comp
}
override fun mouseClickedInner(mouse_x: Double, mouse_y: Double, mouse_click_type: Int): Boolean {
val index = i + scrollBar.getScroll(GRID_WIDTH) * GRID_WIDTH
val index = i + scrollBar.getScroll(menu.view.itemCount / GRID_WIDTH) * GRID_WIDTH
menu.view.mouseClick(index, mouse_click_type)
return true
}