Skip to content

Commit

Permalink
Add Reset indicator to Violet Overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
Oxyopiia committed Aug 12, 2024
1 parent b6f9fbf commit 668bd49
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/main/java/net/oxyopia/vice/features/summer/VioletOverlay.kt
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,19 @@ object VioletOverlay : HudElement("Violet's Exchange Overlay", Vice.storage.summ
fun onHudRender(event: HudRenderEvent) {
if (!shouldDraw() || !drawCondition()) return

val reset = Vice.storage.summer.violetReset.timeDeltaUntil()
if (reset.inWholeMilliseconds < 0) return

val list = listOf(
val list = mutableListOf(
"Violet's Exchange".toText(Color(114, 89, 255), bold = true),
"Resets in ".toText(Colors.ChatColor.Grey).append(reset.formatDuration().toText(Color(114, 89, 255)))
)

val reset = Vice.storage.summer.violetReset.timeDeltaUntil()

if (reset.inWholeMilliseconds < 0) {
list.add("Reset!".toText(Colors.ChatColor.Green))
} else {
list.add("Resets in ".toText(Colors.ChatColor.Grey).append(reset.formatDuration().toText(Color(114, 89, 255))))
}


position.drawTexts(list, event.context)
}

Expand Down

0 comments on commit 668bd49

Please sign in to comment.