mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 20:31:51 +09:00
autosave marker on save list
This commit is contained in:
Binary file not shown.
@@ -510,6 +510,8 @@ class UIItemPlayerCells(
|
||||
// lateinit var playerUUID: UUID; private set
|
||||
lateinit var worldUUID: UUID; private set
|
||||
|
||||
private val savegameStatus: Int
|
||||
|
||||
init {
|
||||
App.savegamePlayers[playerUUID]!!.loadable().getFile(SAVEGAMEINFO)?.bytes?.let {
|
||||
var lastPlayTime0 = 0L
|
||||
@@ -527,6 +529,8 @@ class UIItemPlayerCells(
|
||||
.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))
|
||||
|
||||
}
|
||||
|
||||
savegameStatus = SavegameCollectionPair(App.savegamePlayers[playerUUID], App.savegameWorlds[worldUUID]).status
|
||||
}
|
||||
|
||||
private fun parseDuration(seconds: Long): String {
|
||||
@@ -663,6 +667,11 @@ class UIItemPlayerCells(
|
||||
batch.draw(icons.get(12,0), x + 119f, y + height - 53f) // world map
|
||||
batch.draw(icons.get(13,0), x + 120f, y + height - 24f) // journal
|
||||
batch.draw(icons.get(23,0), x + width - 4f - playTimeTextLen - 24f, y + height - 24f) // stopwatch
|
||||
// autosave marker
|
||||
if (savegameStatus == 2)
|
||||
batch.draw(icons.get(24,1), x + 459f, y + 5f)
|
||||
else if (savegameStatus == 0)
|
||||
batch.draw(icons.get(23,1), x + 459f, y + 5f)
|
||||
|
||||
// infocell divider
|
||||
batch.color = if (mouseUp) hruleColLit else hruleCol
|
||||
|
||||
@@ -65,7 +65,7 @@ class UIAutosaveNotifier : UICanvas() {
|
||||
batch.draw(spinner.get(0,4), offX, offY)
|
||||
}
|
||||
batch.color = if (errored) errorCol else normalCol
|
||||
App.fontGame.draw(batch, text, offX + 30f, offY)
|
||||
App.fontGame.draw(batch, text, offX + 30f, offY - 2f)
|
||||
}
|
||||
|
||||
fun setAsError() {
|
||||
|
||||
Reference in New Issue
Block a user