mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-16 21:44:05 +09:00
detects corrupted and damaged and deleted and whatever savefiles; uiitem will call show() and hide() upon opening and closing
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user