aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-04-19 21:31:04 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-04-19 21:31:04 +0200
commitb6286ff5856d445c812b51213501c1388ef5f1f9 (patch)
treecba034613769272abb840c3f6c81e532bd48714a /src/main/java/at/hannibal2/skyhanni
parentb6df5621a3e020f24d5897ee58b0e93edd0c62f7 (diff)
downloadskyhanni-b6286ff5856d445c812b51213501c1388ef5f1f9.tar.gz
skyhanni-b6286ff5856d445c812b51213501c1388ef5f1f9.tar.bz2
skyhanni-b6286ff5856d445c812b51213501c1388ef5f1f9.zip
code cleanup
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/command/TrackSoundsCommand.kt16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/TrackSoundsCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/command/TrackSoundsCommand.kt
index b925950ed..4742bd45d 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/command/TrackSoundsCommand.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/command/TrackSoundsCommand.kt
@@ -112,14 +112,18 @@ object TrackSoundsCommand {
}
} else {
val sound = value.first()
- val volumeColor = when(sound.volume) {
- in 0.0..0.25 -> ChatFormatting.RED.toString()
- in 0.25..0.5 -> ChatFormatting.GOLD.toString()
- else -> ChatFormatting.GREEN.toString()
- }
+ val volumeColor = when (sound.volume) {
+ in 0.0..0.25 -> ChatFormatting.RED
+ in 0.25..0.5 -> ChatFormatting.GOLD
+ else -> ChatFormatting.GREEN
+ }.toString()
event.drawDynamicText(key, "§7§l${sound.soundName}", 0.8)
- event.drawDynamicText(key.up(-0.2), "§7P: §e%.2f §7V: $volumeColor%.2f".format(sound.pitch, sound.volume), 0.8)
+ event.drawDynamicText(
+ key.up(-0.2),
+ "§7P: §e%.2f §7V: $volumeColor%.2f".format(sound.pitch, sound.volume),
+ scaleMultiplier = 0.8
+ )
}
}
}