(svn r19709) -Feature: NewGRF debugging/inspecting of (primarily) enabled callbacks and values of variables

This commit is contained in:
rubidium
2010-04-24 13:39:11 +00:00
parent ab8562f71c
commit cb92cdf975
8 changed files with 57 additions and 2 deletions

View File

@@ -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);
}
};