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