Index: src/news_gui.cpp =================================================================== 989a990,1045 > /** > * 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) > { > 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 > * > * @todo Make this configurable by the user. > */ > #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) > { > return _date - date < DAYS_TO_HIGHLIGHT_NEWS ? TC_WHITE : TC_SILVER; > } > 1016c1072 < this->date_width = GetStringBoundingBox(STR_SHORT_DATE).width; --- > this->date_width = GetStringBoundingBox(STR_JUST_DATE_TINY).width; 1049c1105 < DrawString(date_left, date_right, y, STR_SHORT_DATE); --- > DrawString(date_left, date_right, y, STR_JUST_DATE_TINY, DateColour(ni->date)); 1051c1107 < DrawNewsString(news_left, news_right, y, TC_WHITE, ni); --- > DrawNewsString(news_left, news_right, y, NewsItemColour(ni->type), ni);