Skip to content

Commit

Permalink
change: increase f/mode flash time
Browse files Browse the repository at this point in the history
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
  • Loading branch information
Octol1ttle committed Jan 13, 2024
1 parent 00c3f52 commit ddaec6b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import static ru.octol1ttle.flightassistant.HudComponent.CONFIG;

public class FlightMode {
private static final int UPDATE_FLASH_TIME = 2000;
private static final int UPDATE_FLASH_TIME = 3000;
private final TimeComputer time;
@Nullable
private Float lastUpdateTime;
Expand Down Expand Up @@ -38,7 +38,7 @@ public void render(DrawContext context, TextRenderer textRenderer, float x, floa
if (lastUpdateTime == null) {
throw new IllegalStateException("Called render before updating");
}
if (time.prevMillis - lastUpdateTime < UPDATE_FLASH_TIME) {
if (time.prevMillis != null && time.prevMillis - lastUpdateTime <= UPDATE_FLASH_TIME) {
HudComponent.drawHighlightedMiddleAlignedText(textRenderer, context, lastText, x, y, CONFIG.amberColor, time.highlight);
return;
}
Expand Down

0 comments on commit ddaec6b

Please sign in to comment.