detects corrupted and damaged and deleted and whatever savefiles; uiitem will call show() and hide() upon opening and closing

This commit is contained in:
minjaesong
2021-10-01 15:46:25 +09:00
parent 3a98bef509
commit 88c76105d2
12 changed files with 169 additions and 90 deletions

View File

@@ -233,18 +233,36 @@ abstract class UICanvas(
fun setAsAlwaysVisible() {
handler.setAsAlwaysVisible()
show()
}
open fun setAsOpen() {
handler.setAsOpen()
show()
}
open fun setAsClose() {
handler.setAsClose()
hide()
}
open fun toggleOpening() {
handler.toggleOpening()
// handler.toggleOpening()
if (handler.alwaysVisible && !handler.doNotWarnConstant) {
throw RuntimeException("[UIHandler] Tried to 'toggle opening of' constant UI")
}
if (isVisible) {
if (!isClosing) {
setAsClose()
hide()
}
}
else {
if (!isOpening) {
setAsOpen()
show()
}
}
}
inline val isOpened: Boolean

View File

@@ -78,7 +78,7 @@ void main() {
var initialX = posX
var initialY = posY
private var alwaysVisible = false
var alwaysVisible = false; private set
var isOpening = false
var isClosing = false

View File

@@ -167,7 +167,7 @@ class UIItemTextButtonList(
private var clickLatched = false
override fun show() {
printdbg(this, "${this.javaClass.simpleName} show()")
// printdbg(this, "${this.javaClass.simpleName} show()")
clickLatched = true
}