Skip to content

Commit 29eb955

Browse files
committed
hud: improve THR LK/TOGA LK display
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
1 parent a4ea433 commit 29eb955

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/main/kotlin/ru/octol1ttle/flightassistant/api/util/extensions/DrawContextExtensions.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ val DrawContext.centerYF: Float
2828
val DrawContext.centerY: Int
2929
get() = centerYF.toInt()
3030

31+
const val emptyColor: Int = 0
32+
3133
val primaryColor: Int
3234
get() = FAConfig.display.primaryColor.rgb
3335

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,10 @@ class AutomationModesDisplay(computers: ComputerView) : Display(computers) {
5656
if (computers.thrust.thrustLocked) {
5757
thrustDisplay.render(
5858
drawContext,
59-
if (FATickCounter.totalTicks % 20 >= 10)
60-
if (computers.thrust.current > TOGA_THRESHOLD) Text.translatable("mode.flightassistant.thrust.locked_toga").setColor(primaryColor)
61-
else Text.translatable("mode.flightassistant.thrust.locked", thrustValueText).setColor(primaryColor)
62-
else Text.empty(),
59+
if (computers.thrust.current > TOGA_THRESHOLD) Text.translatable("mode.flightassistant.thrust.locked_toga").setColor(primaryColor)
60+
else Text.translatable("mode.flightassistant.thrust.locked", thrustValueText).setColor(primaryColor),
6361
false,
64-
cautionColor
62+
if (FATickCounter.totalTicks % 20 >= 10) cautionColor else emptyColor
6563
)
6664

6765
return

0 commit comments

Comments
 (0)