Add NewGRF debug window info for stations and industries

This commit is contained in:
Jonathan G Rennison
2019-06-16 13:19:27 +01:00
parent 5f44741428
commit 601afc56dc
4 changed files with 80 additions and 0 deletions

View File

@@ -35,6 +35,7 @@
#include "zoom_func.h"
#include "departures_gui.h"
#include "zoning.h"
#include "newgrf_debug.h"
#include "widgets/station_widget.h"
@@ -747,6 +748,7 @@ static const NWidgetPart _nested_station_view_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
NWidget(WWT_CAPTION, COLOUR_GREY, WID_SV_CAPTION), SetDataTip(STR_STATION_VIEW_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
NWidget(WWT_DEBUGBOX, COLOUR_GREY),
NWidget(WWT_SHADEBOX, COLOUR_GREY),
NWidget(WWT_DEFSIZEBOX, COLOUR_GREY),
NWidget(WWT_STICKYBOX, COLOUR_GREY),
@@ -2070,6 +2072,16 @@ struct StationViewWindow : public Window {
}
}
}
bool IsNewGRFInspectable() const override
{
return ::IsNewGRFInspectable(GSF_FAKE_STATION_STRUCT, this->window_number);
}
void ShowNewGRFInspectWindow() const override
{
::ShowNewGRFInspectWindow(GSF_FAKE_STATION_STRUCT, this->window_number);
}
};
const StringID StationViewWindow::_sort_names[] = {