mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-13 20:14:05 +09:00
fixed a bug where closing the inventory ui while tooltip is showing will make it persist when the ui is opened again
This commit is contained in:
@@ -34,6 +34,26 @@ import kotlin.math.roundToInt
|
||||
*
|
||||
* PosX/Y and relativeMouseX/Y are explained in ```work_files/terrarum_ui_elements_coord_explained.png```
|
||||
*
|
||||
* ## Show/Hide/Opening/Closing Timeline
|
||||
*
|
||||
* The functions `show`, `doOpening`, `doClosing`, `hide`, `endOpening`, `endClosing` are called sequentially in this order:
|
||||
*
|
||||
* ```
|
||||
* (open has triggered)
|
||||
* show()
|
||||
* doOpening()
|
||||
* doOpening()
|
||||
* ...
|
||||
* endOpening()
|
||||
* ...
|
||||
* (close has triggered)
|
||||
* hide()
|
||||
* doClosing()
|
||||
* doClosing()
|
||||
* ...
|
||||
* endClosing()
|
||||
* ```
|
||||
*
|
||||
* Created by minjaesong on 2015-12-31.
|
||||
*/
|
||||
abstract class UICanvas(
|
||||
|
||||
@@ -34,7 +34,7 @@ class UIItemSpinner(
|
||||
private val fbo = FrameBuffer(Pixmap.Format.RGBA8888, width - 2*buttonW - 6, height - 4, false)
|
||||
|
||||
var value = initialValue.coerceIn(min, max)
|
||||
private var fboUpdateLatch = true
|
||||
var fboUpdateLatch = true
|
||||
|
||||
private var mouseOnButton = 0 // 0: nothing, 1: left, 2: right
|
||||
|
||||
|
||||
@@ -124,6 +124,14 @@ open class UIItemTransitionContainer(
|
||||
return true
|
||||
}
|
||||
|
||||
override fun show() {
|
||||
uis.forEach { it.show() }
|
||||
}
|
||||
|
||||
override fun hide() {
|
||||
uis.forEach { it.hide() }
|
||||
}
|
||||
|
||||
override fun dispose() {
|
||||
uis.forEach { it.dispose() }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user