Index: src/widget.cpp =================================================================== --- src/widget.cpp (revision 19933) +++ src/widget.cpp (working copy) @@ -526,7 +526,7 @@ * @param owner 'Owner' of the window. * @param str Text to draw in the bar. */ -static inline void DrawCaption(const Rect &r, Colours colour, Owner owner, StringID str) +void DrawCaption(const Rect &r, Colours colour, Owner owner, StringID str) { DrawFrameRect(r.left, r.top, r.right, r.bottom, colour, FR_BORDERONLY); DrawFrameRect(r.left + 1, r.top + 1, r.right - 1, r.bottom - 1, colour, (owner == INVALID_OWNER) ? FR_LOWERED | FR_DARKENED : FR_LOWERED | FR_DARKENED | FR_BORDERONLY); Index: src/news_gui.cpp =================================================================== --- src/news_gui.cpp (revision 19933) +++ src/news_gui.cpp (working copy) @@ -18,6 +18,7 @@ #include "date_func.h" #include "vehicle_base.h" #include "vehicle_func.h" +#include "vehicle_gui.h" #include "station_base.h" #include "industry.h" #include "town.h" @@ -196,7 +197,7 @@ /* Caption + close box */ NWidget(NWID_HORIZONTAL), NWidget(WWT_CLOSEBOX, COLOUR_LIGHT_BLUE, NTW_CLOSEBOX), - NWidget(WWT_CAPTION, COLOUR_LIGHT_BLUE, NTW_CAPTION), SetDataTip(STR_NEWS_MESSAGE_CAPTION, STR_NULL), + NWidget(WWT_EMPTY, COLOUR_LIGHT_BLUE, NTW_CAPTION), SetFill(1, 0), EndContainer(), /* Main part */ @@ -393,10 +394,15 @@ virtual void DrawWidget(const Rect &r, int widget) const { + extern void DrawCaption(const Rect &r, Colours colour, Owner owner, StringID str); switch (widget) { + case NTW_CAPTION: + DrawCaption(r, COLOUR_LIGHT_BLUE, this->owner, STR_NEWS_MESSAGE_CAPTION); + break; + case NTW_PANEL: this->DrawNewsBorder(r); - return; + break; case NTW_MESSAGE: CopyInDParam(0, this->ni->params, lengthof(this->ni->params)); @@ -454,6 +460,12 @@ break; case NTW_CAPTION: + if (this->ni->reftype1 == NR_VEHICLE) { + const Vehicle *v = Vehicle::Get(this->ni->ref1); + ShowVehicleViewWindow(v); + } + break; + case NTW_VIEWPORT: break; // Ignore clicks