utilising new mouselatch

This commit is contained in:
minjaesong
2024-01-10 01:46:39 +09:00
parent a149107b48
commit acaedc4d80
11 changed files with 45 additions and 40 deletions

View File

@@ -495,7 +495,7 @@ class UIItemControlPaletteBaloon(val parent: UIKeyboardControlPanel, initialX: I
iconButtons.forEachIndexed { index, it ->
it.update(delta)
if (it.mousePushed) {
selected = index
selected = index
}
}
@@ -503,13 +503,10 @@ class UIItemControlPaletteBaloon(val parent: UIKeyboardControlPanel, initialX: I
closeButton2.update(delta)
// close
if (!mouseLatched && mousePushed) {
mouseLatched = true
if (mouseUp) mouseLatch.latch {
parent.setControlOf(parent.keycapClicked, selected)
parent.keycapClicked = -13372
}
if (!mouseDown) mouseLatched = false
}
}