swapping save delete/cancel button so that accidental double click would not delete the save

This commit is contained in:
minjaesong
2023-07-09 02:20:38 +09:00
parent 71df31b93d
commit 7c7b3de68d

View File

@@ -80,14 +80,8 @@ class UILoadManage(val full: UILoadSavegame) : UICanvas() {
}
}
private val confirmCancelButton = UIItemTextButton(this,
{ Lang["MENU_LABEL_CANCEL"] }, buttonXleft, buttonRowY, buttonWidth, alignment = UIItemTextButton.Companion.Alignment.CENTRE, hasBorder = true).also {
it.clickOnceListener = { _,_ ->
mode = MODE_INIT
}
}
private val confirmDeleteButton = UIItemTextButton(this,
{ Lang["MENU_LABEL_DELETE"] }, buttonXright, buttonRowY, buttonWidth, alignment = UIItemTextButton.Companion.Alignment.CENTRE, hasBorder = true, inactiveCol = Toolkit.Theme.COL_RED, activeCol = Toolkit.Theme.COL_REDD).also {
{ Lang["MENU_LABEL_DELETE"] }, buttonXleft, buttonRowY, buttonWidth, alignment = UIItemTextButton.Companion.Alignment.CENTRE, hasBorder = true, inactiveCol = Toolkit.Theme.COL_RED, activeCol = Toolkit.Theme.COL_REDD).also {
it.clickOnceListener = { _,_ ->
val pu = full.playerButtonSelected!!.playerUUID
val wu = full.playerButtonSelected!!.worldUUID
@@ -100,6 +94,12 @@ class UILoadManage(val full: UILoadSavegame) : UICanvas() {
full.remoCon.openUI(UILoadSavegame(full.remoCon))
}
}
private val confirmCancelButton = UIItemTextButton(this,
{ Lang["MENU_LABEL_CANCEL"] }, buttonXright, buttonRowY, buttonWidth, alignment = UIItemTextButton.Companion.Alignment.CENTRE, hasBorder = true).also {
it.clickOnceListener = { _,_ ->
mode = MODE_INIT
}
}
private var mode = 0