diff options
author | rubidium <rubidium@openttd.org> | 2010-04-24 13:39:11 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-04-24 13:39:11 +0000 |
commit | f56ebd81c35beb0094c487cc3dc45dc0427fae46 (patch) | |
tree | 36776a247dae7d416030b82239b506698c94ce29 /src/vehicle_gui.cpp | |
parent | 21883a84d7883df5feb25d6536ec8f67a053fe42 (diff) | |
download | openttd-f56ebd81c35beb0094c487cc3dc45dc0427fae46.tar.xz |
(svn r19709) -Feature: NewGRF debugging/inspecting of (primarily) enabled callbacks and values of variables
Diffstat (limited to 'src/vehicle_gui.cpp')
-rw-r--r-- | src/vehicle_gui.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
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); + } }; |