[fix] ShowDate / ShowTime options not working in Time HUD

Signed-off-by: Dominika <sokolov.dominika@gmail.com>
This commit is contained in:
Dominika 2021-01-04 23:44:54 -05:00
parent 978364f111
commit c1dbe4b84f
No known key found for this signature in database
GPG Key ID: B4A5A6DCA70F861F
1 changed files with 5 additions and 2 deletions

View File

@ -16,9 +16,12 @@ object Time : LabelHud(
private val timeFormat = setting("TimeFormat", TimeUtils.TimeFormat.HHMM, { showTime.value })
private val timeUnit = setting("TimeUnit", TimeUtils.TimeUnit.H12, { showTime.value })
override val minWidth = 10f
override val minHeight = 10f
override fun updateText() {
displayText.addLine(TimeUtils.getDate(dateFormat.value))
displayText.addLine(TimeUtils.getTime(timeFormat.value, timeUnit.value))
if (showDate.value) displayText.addLine(TimeUtils.getDate(dateFormat.value))
if (showTime.value) displayText.addLine(TimeUtils.getTime(timeFormat.value, timeUnit.value))
}
}