mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-17 00:56:07 +09:00
scrolling credit text outside of text area would not move the scrollbar
This commit is contained in:
@@ -25,9 +25,6 @@ open class UITitleWallOfText(private val text: List<String>) : UICanvas() {
|
||||
width, height
|
||||
).also {
|
||||
it.setWallOfText(text)
|
||||
it.scrolledListener = { x, y ->
|
||||
scrollbar?.scrolledForce(5*x, 5*y)
|
||||
}
|
||||
}
|
||||
|
||||
private val scrollbar: UIItemVertSlider? = if (true) {
|
||||
@@ -62,6 +59,7 @@ open class UITitleWallOfText(private val text: List<String>) : UICanvas() {
|
||||
|
||||
override fun scrolled(amountX: Float, amountY: Float): Boolean {
|
||||
textArea.scrolled(amountX, amountY)
|
||||
scrollbar?.scrolledForce(5*amountX, 5*amountY)
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user