@@ -34,6 +34,8 @@ internal object ModuleList : HudElement(
34
34
private val rainbow by setting(" Rainbow" , true )
35
35
private val rainbowLength by setting(" Rainbow Length" , 10.0f , 1.0f .. 20.0f , 0.5f , { rainbow })
36
36
private val indexedHue by setting(" Indexed Hue" , 0.5f , 0.0f .. 1.0f , 0.05f , { rainbow })
37
+ private val saturation by setting(" Saturation" , 1.0f , 0.0f .. 1.0f , 0.05f , { rainbow })
38
+ private val brightness by setting(" Brightness" , 1.0f , 0.0f .. 1.0f , 0.05f , { rainbow })
37
39
private val primary by setting(" Primary Color" , ColorHolder (155 , 144 , 255 ), false )
38
40
private val secondary by setting(" Secondary Color" , ColorHolder (255 , 255 , 255 ), false )
39
41
@@ -103,7 +105,6 @@ internal object ModuleList : HudElement(
103
105
}
104
106
105
107
private fun drawModuleList () {
106
- val primaryHsb = Color .RGBtoHSB (primary.r, primary.g, primary.b, null )
107
108
val lengthMs = rainbowLength * 1000.0f
108
109
val timedHue = System .currentTimeMillis() % lengthMs.toLong() / lengthMs
109
110
@@ -127,7 +128,7 @@ internal object ModuleList : HudElement(
127
128
128
129
if (rainbow) {
129
130
val hue = timedHue + indexedHue * 0.05f * index++
130
- val color = ColorConverter .hexToRgb(Color .HSBtoRGB (hue, primaryHsb[ 1 ], primaryHsb[ 2 ] ))
131
+ val color = ColorConverter .hexToRgb(Color .HSBtoRGB (hue, saturation, brightness ))
131
132
module.newTextLine(color).drawLine(progress, true , HAlign .LEFT , FontRenderAdapter .useCustomFont)
132
133
} else {
133
134
textLine.drawLine(progress, true , HAlign .LEFT , FontRenderAdapter .useCustomFont)
0 commit comments