mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-10 18:44:05 +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 playerUUID: UUID; private set
|
||||||
lateinit var worldUUID: UUID; private set
|
lateinit var worldUUID: UUID; private set
|
||||||
|
|
||||||
|
private val savegameStatus: Int
|
||||||
|
|
||||||
init {
|
init {
|
||||||
App.savegamePlayers[playerUUID]!!.loadable().getFile(SAVEGAMEINFO)?.bytes?.let {
|
App.savegamePlayers[playerUUID]!!.loadable().getFile(SAVEGAMEINFO)?.bytes?.let {
|
||||||
var lastPlayTime0 = 0L
|
var lastPlayTime0 = 0L
|
||||||
@@ -527,6 +529,8 @@ class UIItemPlayerCells(
|
|||||||
.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))
|
.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
savegameStatus = SavegameCollectionPair(App.savegamePlayers[playerUUID], App.savegameWorlds[worldUUID]).status
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun parseDuration(seconds: Long): String {
|
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(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(13,0), x + 120f, y + height - 24f) // journal
|
||||||
batch.draw(icons.get(23,0), x + width - 4f - playTimeTextLen - 24f, y + height - 24f) // stopwatch
|
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
|
// infocell divider
|
||||||
batch.color = if (mouseUp) hruleColLit else hruleCol
|
batch.color = if (mouseUp) hruleColLit else hruleCol
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ class UIAutosaveNotifier : UICanvas() {
|
|||||||
batch.draw(spinner.get(0,4), offX, offY)
|
batch.draw(spinner.get(0,4), offX, offY)
|
||||||
}
|
}
|
||||||
batch.color = if (errored) errorCol else normalCol
|
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() {
|
fun setAsError() {
|
||||||
|
|||||||
Reference in New Issue
Block a user