Index: src/settings.cpp =================================================================== 840a841,846 > static bool InvalidateNewsDisplayWindow(int32 p1) > { > InvalidateWindowData(WC_MESSAGE_HISTORY, 0); > return true; > } > Index: src/lang/english.txt =================================================================== 1494a1495,1498 > STR_CONFIG_SETTING_NEWS_DISPLAY_COLOURIZED :Colourized items in the message history window: {STRING2} > STR_CONFIG_SETTING_NEWS_DISPLAY_COLOURIZED_HELPTEXT :Colourize each message per category > STR_CONFIG_SETTING_NEWS_DISPLAY_HIGHLIGHT_RECENT :Highlight recent news in the message history window: {STRING2} > STR_CONFIG_SETTING_NEWS_DISPLAY_HIGHLIGHT_RECENT_HELPTEXT :Highlight messages that were generated in the last 10 days. Index: src/settings_gui.cpp =================================================================== 1469a1470,1471 > SettingEntry("gui.news_display_colourized"), > SettingEntry("gui.news_display_highlight_recent"), Index: src/table/settings.ini =================================================================== 41a42 > static bool InvalidateNewsDisplayWindow(int32 p1); 2835a2837,2854 > cat = SC_EXPERT > > [SDTC_BOOL] > var = gui.news_display_colourized > flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC > def = false > str = STR_CONFIG_SETTING_NEWS_DISPLAY_COLOURIZED > strhelp = STR_CONFIG_SETTING_NEWS_DISPLAY_COLOURIZED_HELPTEXT > proc = InvalidateNewsDisplayWindow > cat = SC_EXPERT > > [SDTC_BOOL] > var = gui.news_display_highlight_recent > flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC > def = false > str = STR_CONFIG_SETTING_NEWS_DISPLAY_HIGHLIGHT_RECENT > strhelp = STR_CONFIG_SETTING_NEWS_DISPLAY_HIGHLIGHT_RECENT_HELPTEXT > proc = InvalidateNewsDisplayWindow Index: src/news_gui.cpp =================================================================== 989a990,1047 > /** > * Return the colour to be used in the message history window, given the news type. > * > * @param type The type of the news item > * > * @see MessageHistoryWindow > * @see NewsItem > * @see NewsType > * > * @todo Make the colours configurable for the user. > */ > static TextColour NewsItemColour(NewsType type) > { > if (!_settings_client.gui.news_display_colourized) > return TC_WHITE; > switch (type) > { > case NT_ARRIVAL_COMPANY: return TC_WHITE; > case NT_ARRIVAL_OTHER: return TC_SILVER; > case NT_ACCIDENT: return TC_RED; > case NT_COMPANY_INFO: return TC_SILVER; > case NT_INDUSTRY_OPEN: return TC_GOLD; > case NT_INDUSTRY_CLOSE: return TC_ORANGE; > case NT_ECONOMY: return TC_DARK_BLUE; > case NT_INDUSTRY_COMPANY: return TC_YELLOW; > case NT_INDUSTRY_OTHER: return TC_LIGHT_BROWN; > case NT_INDUSTRY_NOBODY: return TC_LIGHT_BROWN; > case NT_ADVICE: return TC_CREAM; > case NT_NEW_VEHICLES: return TC_GREEN; > case NT_ACCEPTANCE: return TC_LIGHT_BLUE; > case NT_SUBSIDIES: return TC_PURPLE; > case NT_GENERAL: return TC_WHITE; > } > return TC_WHITE; > } > > /** > * Amount of days to highlight a news item > */ > #define DAYS_TO_HIGHLIGHT_NEWS 10 > > /** > * Return the colour to be used to show the news item date. This allows > * to highlight recent items. > * > * @param date The given date. > * > * @see Date > * @see MessageHistoryWindow > * @see DAYS_TO_HIGHLIGHT_NEWS > */ > static TextColour DateColour(Date date) > { > if (_settings_client.gui.news_display_highlight_recent) > return _date - date < DAYS_TO_HIGHLIGHT_NEWS ? TC_WHITE : TC_SILVER; > return TC_WHITE; > } > 1016c1074 < this->date_width = GetStringBoundingBox(STR_SHORT_DATE).width; --- > this->date_width = GetStringBoundingBox(STR_JUST_DATE_TINY).width; 1031c1089,1094 < if (widget != WID_MH_BACKGROUND || _total_news == 0) return; --- > if (widget != WID_MH_BACKGROUND) return; > > if (_settings_client.gui.news_display_colourized) > GfxFillRect(r.left + 1, r.top + 1, r.right - 1, r.bottom - 1, PC_VERY_DARK_RED); > > if (_total_news == 0) return; 1049c1112 < DrawString(date_left, date_right, y, STR_SHORT_DATE); --- > DrawString(date_left, date_right, y, STR_JUST_DATE_TINY, DateColour(ni->date)); 1051c1114 < DrawNewsString(news_left, news_right, y, TC_WHITE, ni); --- > DrawNewsString(news_left, news_right, y, NewsItemColour(ni->type), ni); Index: src/settings_type.h =================================================================== 118a119,120 > bool news_display_colourized; ///< colourized news items by type in news history > bool news_display_highlight_recent; ///< highlight recent items in news history