mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 11:04:05 +09:00
loadlost: preloading game screenshots
This commit is contained in:
@@ -512,6 +512,8 @@ class UIItemPlayerCells(
|
||||
lateinit var worldUUID: UUID; private set
|
||||
|
||||
private val savegameStatus: Int
|
||||
internal val pixmapManual: Pixmap?
|
||||
internal val pixmapAuto: Pixmap?
|
||||
|
||||
init {
|
||||
App.savegamePlayers[playerUUID]!!.loadable().getFile(SAVEGAMEINFO)?.bytes?.let {
|
||||
@@ -533,6 +535,8 @@ 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)
|
||||
}
|
||||
|
||||
private fun parseDuration(seconds: Long): String {
|
||||
@@ -696,6 +700,8 @@ class UIItemPlayerCells(
|
||||
|
||||
override fun dispose() {
|
||||
sprite?.texture?.dispose()
|
||||
pixmapManual?.dispose()
|
||||
pixmapAuto?.dispose()
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user