Skip to content

Commit 6eb4eaa

Browse files
committed
fix: use correct color when drawing horizon
Signed-off-by: Octol1ttle <[email protected]>
1 parent 28788f9 commit 6eb4eaa

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/main/kotlin/ru/octol1ttle/flightassistant/impl/display/AttitudeDisplay.kt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,17 @@ class AttitudeDisplay(computers: ComputerBus) : Display(computers) {
6767

6868
private fun GuiGraphics.renderHorizon() {
6969
ScreenSpace.getY(0.0f)?.let {
70+
val color = getPitchBarColor(0.0f)
71+
7072
val leftXEnd: Int = (centerXF - halfWidth * 0.025f).toInt()
7173
val leftXStart: Int = (leftXEnd - halfWidth * 0.3f).toInt()
72-
drawRightAlignedString("0", leftXStart - 3, it - 3, primaryColor)
73-
hLine(leftXStart, leftXEnd, it, primaryColor)
74+
drawRightAlignedString("0", leftXStart - 3, it - 3, color)
75+
hLine(leftXStart, leftXEnd, it, color)
7476

7577
val rightXStart: Int = (centerXF + halfWidth * 0.025f).toInt()
7678
val rightXEnd: Int = (rightXStart + halfWidth * 0.3f).toInt()
77-
hLine(rightXStart, rightXEnd, it, primaryColor)
78-
drawString("0", rightXEnd + 5, it - 3, primaryColor)
79+
hLine(rightXStart, rightXEnd, it, color)
80+
drawString("0", rightXEnd + 5, it - 3, color)
7981
}
8082
}
8183

0 commit comments

Comments
 (0)