musicplayer: click on the music title to close the list

This commit is contained in:
minjaesong
2024-01-10 00:17:59 +09:00
parent c4c76a41fb
commit 9c3aeab74f
5 changed files with 17 additions and 2 deletions

View File

@@ -440,6 +440,11 @@ class MusicPlayer(private val ingame: TerrarumIngame) : UICanvas() {
}
}
}
// click on the music title to return to MODE_MOUSE_UP
else if (mouseUp && relativeMouseY.toFloat() in _posY + height - capsuleHeight .. _posY + height && Terrarum.mouseDown && !transitionOngoing && mode > MODE_MOUSE_UP) {
playControlButtonLatched = true
transitionRequest = MODE_MOUSE_UP
}
// unlatch the click latch
else if (!Terrarum.mouseDown) {
playControlButtonLatched = false