summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNiels Martin Hansen <nielsm@indvikleren.dk>2019-04-23 21:25:40 +0200
committerNiels Martin Hansen <nielsm@indvikleren.dk>2019-04-24 23:04:55 +0200
commit2c67af391bfc3e8dea75a7832ae0588d6b455d28 (patch)
tree6e6c549608f45f0f3e562c2d42c9eef674e9f1ed /src
parent62dec9f174aaf003a114a55600bc4f201d2841b9 (diff)
downloadopenttd-2c67af391bfc3e8dea75a7832ae0588d6b455d28.tar.xz
Fix: Scale news ticker scroll speed by UI scale
Diffstat (limited to 'src')
-rw-r--r--src/statusbar_gui.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/statusbar_gui.cpp b/src/statusbar_gui.cpp
index 548fad5f1..a3a9e2c42 100644
--- a/src/statusbar_gui.cpp
+++ b/src/statusbar_gui.cpp
@@ -27,6 +27,7 @@
#include "toolbar_gui.h"
#include "core/geometry_func.hpp"
#include "guitimer_func.h"
+#include "zoom_func.h"
#include "widgets/statusbar_widget.h"
@@ -166,7 +167,7 @@ struct StatusBarWindow : Window {
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP, STR_STATUSBAR_PAUSED, TC_FROMSTRING, SA_HOR_CENTER);
} else if (this->ticker_scroll < TICKER_STOP && FindWindowById(WC_NEWS_WINDOW, 0) == nullptr && _statusbar_news_item != nullptr && _statusbar_news_item->string_id != 0) {
/* Draw the scrolling news text */
- if (!DrawScrollingStatusText(_statusbar_news_item, this->ticker_scroll, r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP, r.bottom)) {
+ if (!DrawScrollingStatusText(_statusbar_news_item, ScaleGUITrad(this->ticker_scroll), r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP, r.bottom)) {
InvalidateWindowData(WC_STATUS_BAR, 0, SBI_NEWS_DELETED);
if (Company::IsValidID(_local_company)) {
/* This is the default text */