mirror of https://github.com/OpenTTD/OpenTTD
Codechange: Add constant for common blink interval.
parent
ecafbf884e
commit
10841ea3fd
|
@ -730,7 +730,7 @@ protected:
|
|||
}
|
||||
|
||||
/** 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();
|
||||
}};
|
||||
|
||||
|
|
|
@ -32,4 +32,7 @@ public:
|
|||
};
|
||||
};
|
||||
|
||||
/** Interval used by blinking interface elements. */
|
||||
static constexpr std::chrono::milliseconds TIMER_BLINK_INTERVAL{450};
|
||||
|
||||
#endif /* TIMER_WINDOW_H */
|
||||
|
|
|
@ -3073,7 +3073,7 @@ static const IntervalTimer<TimerWindow> window_interval(std::chrono::millisecond
|
|||
});
|
||||
|
||||
/** 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;
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue