removing auto/manual save selection: is practically useless

This commit is contained in:
minjaesong
2023-07-12 10:40:21 +09:00
parent 4eb7a8a77e
commit c77f1ffd23
6 changed files with 91 additions and 27 deletions

View File

@@ -21,7 +21,7 @@ import java.util.zip.GZIPInputStream
/**
* Created by minjaesong on 2023-07-05.
*/
class UILoadAutosave(val full: UILoadSavegame) : UICanvas() {
/*class UILoadAutosave(val full: UILoadSavegame) : UICanvas() {
override var width: Int = Toolkit.drawWidth
override var height: Int = App.scr.height
@@ -171,4 +171,4 @@ class UILoadAutosave(val full: UILoadSavegame) : UICanvas() {
App.fontSmallNumbers.draw(batch, lastPlayedStamp, item.posX + 5f, item.posY + 3f)
}
}
}
}*/

View File

@@ -513,8 +513,9 @@ class UIItemPlayerCells(
lateinit var worldUUID: UUID; private set
private val savegameStatus: Int
internal val pixmapManual: Pixmap?
internal val pixmapAuto: Pixmap?
// internal val pixmapManual: Pixmap?
// internal val pixmapAuto: Pixmap?
internal val savegameThumbnailPixmap: Pixmap?
init {
App.savegamePlayers[playerUUID]!!.loadable().getFile(SAVEGAMEINFO)?.bytes?.let {
@@ -537,8 +538,9 @@ class UIItemPlayerCells(
val savegamePair = SavegameCollectionPair(App.savegamePlayers[playerUUID], App.savegameWorlds[worldUUID])
savegameStatus = savegamePair.status
pixmapManual = savegamePair.getManualSave()?.player?.getThumbnailPixmap(SAVE_THUMBNAIL_MAIN_WIDTH, SAVE_THUMBNAIL_MAIN_HEIGHT, 2.0)
pixmapAuto = savegamePair.getAutoSave()?.player?.getThumbnailPixmap(SAVE_THUMBNAIL_MAIN_WIDTH, SAVE_THUMBNAIL_MAIN_HEIGHT, 2.0)
// pixmapManual = savegamePair.getManualSave()?.player?.getThumbnailPixmap(SAVE_THUMBNAIL_MAIN_WIDTH, SAVE_THUMBNAIL_MAIN_HEIGHT, 2.0)
// pixmapAuto = savegamePair.getAutoSave()?.player?.getThumbnailPixmap(SAVE_THUMBNAIL_MAIN_WIDTH, SAVE_THUMBNAIL_MAIN_HEIGHT, 2.0)
savegameThumbnailPixmap = savegamePair.getLoadableSave()?.player?.getThumbnailPixmap(SAVE_THUMBNAIL_MAIN_WIDTH, SAVE_THUMBNAIL_MAIN_HEIGHT, 2.0)
}
private fun parseDuration(seconds: Long): String {
@@ -710,8 +712,9 @@ class UIItemPlayerCells(
override fun dispose() {
sprite?.texture?.dispose()
pixmapManual?.dispose()
pixmapAuto?.dispose()
// pixmapManual?.dispose()
// pixmapAuto?.dispose()
savegameThumbnailPixmap?.dispose()
}

View File

@@ -70,7 +70,7 @@ class UILoadList(val full: UILoadSavegame) : UICanvas() {
App.printdbg(this, "Load playerUUID: ${UILoadGovernor.playerUUID}, worldUUID: ${UILoadGovernor.worldUUID}")
full.loadables = SavegameCollectionPair(App.savegamePlayers[UILoadGovernor.playerUUID], App.savegameWorlds[UILoadGovernor.worldUUID])
full.queueUpManageScr()
full.takeAutosaveSelectorDown()
// full.takeAutosaveSelectorDown()
full.changePanelTo(1)
}

View File

@@ -45,16 +45,16 @@ class UILoadManage(val full: UILoadSavegame) : UICanvas() {
it.clickOnceListener = { _,_ ->
App.printdbg(this, "Load playerUUID: ${UILoadGovernor.playerUUID}, worldUUID: ${UILoadGovernor.worldUUID}")
if (full.loadables.moreRecentAutosaveAvailable()) {
/*if (full.loadables.moreRecentAutosaveAvailable()) {
full.bringAutosaveSelectorUp()
full.changePanelTo(2)
}
else if (full.loadables.saveAvaliable()) {
else */if (full.loadables.saveAvaliable()) {
if (full.loadables.newerSaveIsDamaged) {
UILoadGovernor.previousSaveWasLoaded = true
}
full.takeAutosaveSelectorDown()
// full.takeAutosaveSelectorDown()
full.loadManageSelectedGame = full.loadables.getLoadableSave()!!
mode = MODE_LOAD
@@ -131,7 +131,7 @@ class UILoadManage(val full: UILoadSavegame) : UICanvas() {
full.playerButtonSelected?.forceUnhighlight = true
full.playerButtonSelected?.let { button ->
screencap?.texture?.tryDispose()
(button.pixmapAuto ?: button.pixmapManual)?.let {
button.savegameThumbnailPixmap?.let {
screencap = TextureRegion(Texture(it))
}
}

View File

@@ -73,7 +73,7 @@ class UILoadSavegame(val remoCon: UIRemoCon) : Advanceable() {
internal val drawY = (App.scr.height - 480) / 2
private val transitionalListing = UILoadList(this)
private val transitionalAutosave = UILoadAutosave(this)
// private val transitionalAutosave = UILoadAutosave(this)
private val transitionalManage = UILoadManage(this)
private val transitionalNewCharacter = UINewCharacter(remoCon)
private val transitionPanel = UIItemHorizontalFadeSlide(
@@ -85,14 +85,14 @@ class UILoadSavegame(val remoCon: UIRemoCon) : Advanceable() {
0f,
listOf(transitionalListing),
listOf(transitionalManage, transitionalNewCharacter),
listOf(NullUI, transitionalAutosave)
listOf(NullUI/*, transitionalAutosave*/)
)
internal fun queueUpManageScr() { transitionPanel.setCentreUIto(0) }
internal fun queueUpNewCharScr() { transitionPanel.setCentreUIto(1) }
internal fun bringAutosaveSelectorUp() { transitionPanel.setRightUIto(1) }
internal fun takeAutosaveSelectorDown() { transitionPanel.setRightUIto(0) }
// internal fun bringAutosaveSelectorUp() { transitionPanel.setRightUIto(1) }
// internal fun takeAutosaveSelectorDown() { transitionPanel.setRightUIto(0) }
internal fun changePanelTo(index: Int) {
transitionPanel.requestTransition(index)
@@ -109,7 +109,7 @@ class UILoadSavegame(val remoCon: UIRemoCon) : Advanceable() {
}
override fun show() {
takeAutosaveSelectorDown()
// takeAutosaveSelectorDown()
transitionPanel.show()
}