Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -77,9 +77,9 @@ struct StatusBarWindow : Window {
|
||||
return pt;
|
||||
}
|
||||
|
||||
void FindWindowPlacementAndResize([[maybe_unused]] int def_width, [[maybe_unused]] int def_height) override
|
||||
void FindWindowPlacementAndResize(int, int def_height, bool allow_resize) override
|
||||
{
|
||||
Window::FindWindowPlacementAndResize(_toolbar_width, def_height);
|
||||
Window::FindWindowPlacementAndResize(_toolbar_width, def_height, allow_resize);
|
||||
}
|
||||
|
||||
void UpdateWidgetSize(WidgetID widget, Dimension &size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension &fill, [[maybe_unused]] Dimension &resize) override
|
||||
@@ -117,7 +117,7 @@ struct StatusBarWindow : Window {
|
||||
void DrawWidget(const Rect &r, WidgetID widget) const override
|
||||
{
|
||||
Rect tr = r.Shrink(WidgetDimensions::scaled.framerect, RectPadding::zero);
|
||||
tr.top = CenterBounds(r.top, r.bottom, GetCharacterHeight(FS_NORMAL));
|
||||
tr.top = CentreBounds(r.top, r.bottom, GetCharacterHeight(FS_NORMAL));
|
||||
switch (widget) {
|
||||
case WID_S_LEFT:
|
||||
/* Draw the date */
|
||||
@@ -166,7 +166,7 @@ struct StatusBarWindow : Window {
|
||||
|
||||
if (!this->reminder_timeout.HasFired()) {
|
||||
Dimension icon_size = GetSpriteSize(SPR_UNREAD_NEWS);
|
||||
DrawSprite(SPR_UNREAD_NEWS, PAL_NONE, tr.right - icon_size.width, CenterBounds(r.top, r.bottom, icon_size.height));
|
||||
DrawSprite(SPR_UNREAD_NEWS, PAL_NONE, tr.right - icon_size.width, CentreBounds(r.top, r.bottom, icon_size.height));
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -216,7 +216,7 @@ struct StatusBarWindow : Window {
|
||||
}
|
||||
|
||||
/** Move information on the ticker slowly from one side to the other. */
|
||||
IntervalTimer<TimerWindow> ticker_scroll_interval = {std::chrono::milliseconds(15), [this](uint count) {
|
||||
const IntervalTimer<TimerWindow> ticker_scroll_interval = {std::chrono::milliseconds(15), [this](uint count) {
|
||||
if (_pause_mode.Any()) return;
|
||||
|
||||
if (this->ticker_scroll < TICKER_STOP) {
|
||||
@@ -229,7 +229,7 @@ struct StatusBarWindow : Window {
|
||||
this->SetWidgetDirty(WID_S_MIDDLE);
|
||||
}};
|
||||
|
||||
IntervalTimer<TimerGameCalendar> daily_interval = {{TimerGameCalendar::DAY, TimerGameCalendar::Priority::NONE}, [this](auto) {
|
||||
const IntervalTimer<TimerGameCalendar> daily_interval = {{TimerGameCalendar::DAY, TimerGameCalendar::Priority::NONE}, [this](auto) {
|
||||
this->SetWidgetDirty(WID_S_LEFT);
|
||||
}};
|
||||
|
||||
@@ -248,7 +248,7 @@ static constexpr NWidgetPart _nested_main_status_widgets[] = {
|
||||
};
|
||||
|
||||
static WindowDesc _main_status_desc(
|
||||
WDP_MANUAL, nullptr, 0, 0,
|
||||
WDP_MANUAL, {}, 0, 0,
|
||||
WC_STATUS_BAR, WC_NONE,
|
||||
{WindowDefaultFlag::NoFocus, WindowDefaultFlag::NoClose},
|
||||
_nested_main_status_widgets
|
||||
|
||||
Reference in New Issue
Block a user