mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-10 02:24:05 +09:00
item list only wheel-scrolls when you move whell on the navbar
This commit is contained in:
@@ -603,11 +603,13 @@ open class UIItemInventoryItemGrid(
|
|||||||
super.scrolled(amountX, amountY)
|
super.scrolled(amountX, amountY)
|
||||||
|
|
||||||
items.forEach { if (it.mouseUp) it.scrolled(amountX, amountY) }
|
items.forEach { if (it.mouseUp) it.scrolled(amountX, amountY) }
|
||||||
|
navRemoCon.scrolled(amountX, amountY)
|
||||||
|
|
||||||
// scroll the item list (for now)
|
// scroll the item list (for now)
|
||||||
if (mouseUp) {
|
// commented out -- this clashes with the wheelFun
|
||||||
scrollItemPage(amountY.toInt())
|
// if (mouseUp) {
|
||||||
}
|
// scrollItemPage(amountY.toInt())
|
||||||
|
// }
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -177,6 +177,19 @@ class UIItemListNavBarVertical(
|
|||||||
return super.touchDown(screenX, screenY, pointer, button)
|
return super.touchDown(screenX, screenY, pointer, button)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun scrolled(amountX: Float, amountY: Float): Boolean {
|
||||||
|
if (mouseUp && amountY > 0f) {
|
||||||
|
scrollDownListener.invoke(this, scrollDownButton)
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
else if (mouseUp && amountY < 0f) {
|
||||||
|
scrollUpListener.invoke(this, scrollUpButton)
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
override fun dispose() {
|
override fun dispose() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user