From f56ebd81c35beb0094c487cc3dc45dc0427fae46 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sat, 24 Apr 2010 13:39:11 +0000 Subject: (svn r19709) -Feature: NewGRF debugging/inspecting of (primarily) enabled callbacks and values of variables --- src/vehicle_gui.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/vehicle_gui.cpp') diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index e9a9839d6..fa14063fe 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -20,6 +20,7 @@ #include "viewport_func.h" #include "newgrf_engine.h" #include "newgrf_text.h" +#include "newgrf_debug.h" #include "waypoint_base.h" #include "roadveh.h" #include "train.h" @@ -41,6 +42,7 @@ #include "company_base.h" #include "engine_base.h" #include "engine_func.h" +#include "newgrf.h" #include "table/sprites.h" #include "table/strings.h" @@ -1763,6 +1765,7 @@ static const NWidgetPart _nested_vehicle_view_widgets[] = { NWidget(NWID_HORIZONTAL), NWidget(WWT_CLOSEBOX, COLOUR_GREY), NWidget(WWT_CAPTION, COLOUR_GREY, VVW_WIDGET_CAPTION), SetDataTip(STR_VEHICLE_VIEW_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS), + NWidget(WWT_DEBUGBOX, COLOUR_GREY), NWidget(WWT_SHADEBOX, COLOUR_GREY), NWidget(WWT_STICKYBOX, COLOUR_GREY), EndContainer(), @@ -2195,6 +2198,16 @@ public: } } } + + virtual bool IsNewGRFInspectable() const + { + return ::IsNewGRFInspectable(GetGrfSpecFeature(Vehicle::Get(this->window_number)->type), this->window_number); + } + + virtual void ShowNewGRFInspectWindow() const + { + ::ShowNewGRFInspectWindow(GetGrfSpecFeature(Vehicle::Get(this->window_number)->type), this->window_number); + } }; -- cgit v1.2.3-54-g00ecf