mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-11 13:10:45 +00:00
(svn r19944) -Feature(ette): Open vehicle view when clicking on the caption of vehicle news.
This commit is contained in:
parent
38b8259f3b
commit
7de069af3b
@ -18,6 +18,7 @@
|
|||||||
#include "date_func.h"
|
#include "date_func.h"
|
||||||
#include "vehicle_base.h"
|
#include "vehicle_base.h"
|
||||||
#include "vehicle_func.h"
|
#include "vehicle_func.h"
|
||||||
|
#include "vehicle_gui.h"
|
||||||
#include "station_base.h"
|
#include "station_base.h"
|
||||||
#include "industry.h"
|
#include "industry.h"
|
||||||
#include "town.h"
|
#include "town.h"
|
||||||
@ -458,6 +459,12 @@ struct NewsWindow : Window {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case NTW_CAPTION:
|
case NTW_CAPTION:
|
||||||
|
if (this->ni->reftype1 == NR_VEHICLE) {
|
||||||
|
const Vehicle *v = Vehicle::Get(this->ni->ref1);
|
||||||
|
ShowVehicleViewWindow(v);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case NTW_VIEWPORT:
|
case NTW_VIEWPORT:
|
||||||
break; // Ignore clicks
|
break; // Ignore clicks
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user