musicplayer: albumlist wip

This commit is contained in:
minjaesong
2024-01-06 03:13:59 +09:00
parent 23df3ac02b
commit 96776ef1bb
2 changed files with 12 additions and 2 deletions

View File

@@ -399,7 +399,7 @@ class MusicPlayer(private val ingame: TerrarumIngame) : UICanvas() {
}
}
// make playlist clicking work
else if (!playControlButtonLatched && mouseOnList != null && Terrarum.mouseDown) {
else if (listViewPanelScroll == 1f && !playControlButtonLatched && mouseOnList != null && Terrarum.mouseDown) {
playControlButtonLatched = true
val index = playlistScroll + mouseOnList!!
val list = songsInGovernor
@@ -416,6 +416,13 @@ class MusicPlayer(private val ingame: TerrarumIngame) : UICanvas() {
}
}
}
// make album list clicking work
else if (listViewPanelScroll == 0f && !playControlButtonLatched && mouseOnList != null && Terrarum.mouseDown) {
playControlButtonLatched = true
val index = albumlistScroll + mouseOnList!!
val list = albumsList//.map { albumPropCache[it] }
}
// unlatch the click latch
else if (!Terrarum.mouseDown) {
playControlButtonLatched = false