From b6286ff5856d445c812b51213501c1388ef5f1f9 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Fri, 19 Apr 2024 21:31:04 +0200 Subject: code cleanup --- .../skyhanni/test/command/TrackSoundsCommand.kt | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni') 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 + ) } } } -- cgit