1
0
Fork 0

Codechange: Add constant for common blink interval.

pull/14344/head
Peter Nelson 2025-06-02 19:13:29 +01:00 committed by Peter Nelson
parent ecafbf884e
commit 10841ea3fd
3 changed files with 5 additions and 2 deletions

View File

@ -730,7 +730,7 @@ protected:
} }
/** Blink the industries (if selected) on a regular interval. */ /** Blink the industries (if selected) on a regular interval. */
const IntervalTimer<TimerWindow> blink_interval = {std::chrono::milliseconds(450), [this](auto) { const IntervalTimer<TimerWindow> blink_interval = {TIMER_BLINK_INTERVAL, [this](auto) {
Blink(); Blink();
}}; }};

View File

@ -32,4 +32,7 @@ public:
}; };
}; };
/** Interval used by blinking interface elements. */
static constexpr std::chrono::milliseconds TIMER_BLINK_INTERVAL{450};
#endif /* TIMER_WINDOW_H */ #endif /* TIMER_WINDOW_H */

View File

@ -3073,7 +3073,7 @@ static const IntervalTimer<TimerWindow> window_interval(std::chrono::millisecond
}); });
/** Blink the window highlight colour constantly. */ /** Blink the window highlight colour constantly. */
static const IntervalTimer<TimerWindow> highlight_interval(std::chrono::milliseconds(450), [](auto) { static const IntervalTimer<TimerWindow> highlight_interval(TIMER_BLINK_INTERVAL, [](auto) {
_window_highlight_colour = !_window_highlight_colour; _window_highlight_colour = !_window_highlight_colour;
}); });