mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 20:31:51 +09:00
swapping save delete/cancel button so that accidental double click would not delete the save
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user