Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ internal object ModuleList : HudElement(
private val rainbow by setting("Rainbow", true)
private val rainbowLength by setting("Rainbow Length", 10.0f, 1.0f..20.0f, 0.5f, { rainbow })
private val indexedHue by setting("Indexed Hue", 0.5f, 0.0f..1.0f, 0.05f, { rainbow })
private val saturation by setting("Saturation", 1.0f, 0.0f..1.0f, 0.05f, { rainbow })
private val brightness by setting("Brightness", 1.0f, 0.0f..1.0f, 0.05f, { rainbow })
private val primary by setting("Primary Color", ColorHolder(155, 144, 255), false)
private val secondary by setting("Secondary Color", ColorHolder(255, 255, 255), false)

Expand Down Expand Up @@ -103,7 +105,6 @@ internal object ModuleList : HudElement(
}

private fun drawModuleList() {
val primaryHsb = Color.RGBtoHSB(primary.r, primary.g, primary.b, null)
val lengthMs = rainbowLength * 1000.0f
val timedHue = System.currentTimeMillis() % lengthMs.toLong() / lengthMs

Expand All @@ -127,7 +128,7 @@ internal object ModuleList : HudElement(

if (rainbow) {
val hue = timedHue + indexedHue * 0.05f * index++
val color = ColorConverter.hexToRgb(Color.HSBtoRGB(hue, primaryHsb[1], primaryHsb[2]))
val color = ColorConverter.hexToRgb(Color.HSBtoRGB(hue, saturation, brightness))
module.newTextLine(color).drawLine(progress, true, HAlign.LEFT, FontRenderAdapter.useCustomFont)
} else {
textLine.drawLine(progress, true, HAlign.LEFT, FontRenderAdapter.useCustomFont)
Expand Down