mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 12:21:52 +09:00
musicplayer: click on the music title to close the list
This commit is contained in:
@@ -18,5 +18,6 @@
|
||||
<orderEntry type="library" scope="PROVIDED" name="jetbrains.kotlin.test" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="jetbrains.kotlinx.coroutines.core" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="io.airlift.aircompressor" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="jetbrains.kotlin.test1" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -7,11 +7,12 @@
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="jetbrains.kotlin.test" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="jetbrains.kotlin.test" level="project" />
|
||||
<orderEntry type="module" module-name="TerrarumBuild" scope="PROVIDED" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="badlogicgames.gdx" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="io.airlift.aircompressor" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="TerrarumSansBitmap" level="project" />
|
||||
<orderEntry type="library" name="apache.commons.math3" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="apache.commons.math3" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="jetbrains.kotlin.test1" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -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
|
||||
|
||||
@@ -30,5 +30,6 @@
|
||||
<orderEntry type="library" name="github.psambit9791.jdsp" level="project" />
|
||||
<orderEntry type="library" name="github.wendykierp.JTransforms" level="project" />
|
||||
<orderEntry type="library" name="io.airlift.aircompressor" level="project" />
|
||||
<orderEntry type="library" name="jetbrains.kotlin.test1" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
7
src/net/torvald/terrarum/MouseLatch.kt
Normal file
7
src/net/torvald/terrarum/MouseLatch.kt
Normal file
@@ -0,0 +1,7 @@
|
||||
package net.torvald.terrarum
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 2024-01-10.
|
||||
*/
|
||||
class MouseLatch {
|
||||
}
|
||||
Reference in New Issue
Block a user