# HG changeset patch # User frosch # Date 2010-06-07 20:00:21 # Node ID 6bb34bc1032f89356e92a7ae81e7922bd8be81f1 # Parent 4dd646d9f2a58e6f144336a49ac98ac18c1c0645 (svn r19944) -Feature(ette): Open vehicle view when clicking on the caption of vehicle news. diff --git a/src/news_gui.cpp b/src/news_gui.cpp --- a/src/news_gui.cpp +++ b/src/news_gui.cpp @@ -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" @@ -458,6 +459,12 @@ struct NewsWindow : Window { 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