Skip to content

Commit

Permalink
mouseScrolled
Browse files Browse the repository at this point in the history
  • Loading branch information
Enaium committed Jul 8, 2021
1 parent d9299a6 commit 7bb457f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/kotlin/cn/enaium/vac/client/screen/click/ClickGUI.kt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ class ClickGUI : Screen(LiteralText("")) {
return super.mouseReleased(mouseX, mouseY, button)
}

override fun mouseScrolled(mouseX: Double, mouseY: Double, amount: Double): Boolean {
typeList.forEach { it.mouseScrolled(mouseX, mouseY, amount) }
return super.mouseScrolled(mouseX, mouseY, amount)
}

override fun isPauseScreen(): Boolean {
return false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,9 @@ class TypePanel(private val type: String, private var x: Int, private var y: Int
dragging = false
return super.mouseReleased(mouseX, mouseY, button)
}

override fun mouseScrolled(mouseX: Double, mouseY: Double, amount: Double): Boolean {
y += amount.toInt() * 20
return super.mouseScrolled(mouseX, mouseY, amount)
}
}

0 comments on commit 7bb457f

Please sign in to comment.