diff --git a/src/airport_gui.cpp.orig b/src/airport_gui.cpp.orig
deleted file mode 100644
index 0ba237c024..0000000000
--- a/src/airport_gui.cpp.orig
+++ /dev/null
@@ -1,574 +0,0 @@
-/* $Id$ */
-
-/*
- * This file is part of OpenTTD.
- * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
- * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see .
- */
-
-/** @file airport_gui.cpp The GUI for airports. */
-
-#include "stdafx.h"
-#include "window_gui.h"
-#include "station_gui.h"
-#include "terraform_gui.h"
-#include "sound_func.h"
-#include "window_func.h"
-#include "strings_func.h"
-#include "viewport_func.h"
-#include "company_func.h"
-#include "tilehighlight_func.h"
-#include "company_base.h"
-#include "station_type.h"
-#include "newgrf_airport.h"
-#include "newgrf_callbacks.h"
-#include "widgets/dropdown_type.h"
-#include "core/geometry_func.hpp"
-#include "hotkeys.h"
-#include "vehicle_func.h"
-#include "gui.h"
-
-#include "widgets/airport_widget.h"
-
-
-static AirportClassID _selected_airport_class; ///< the currently visible airport class
-static int _selected_airport_index; ///< the index of the selected airport in the current class or -1
-static byte _selected_airport_layout; ///< selected airport layout number.
-
-static void ShowBuildAirportPicker(Window *parent);
-
-SpriteID GetCustomAirportSprite(const AirportSpec *as, byte layout);
-
-void CcBuildAirport(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
-{
- if (result.Failed()) return;
-
- if (_settings_client.sound.confirm) SndPlayTileFx(SND_1F_SPLAT, tile);
- if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
-}
-
-/**
- * Place an airport.
- * @param tile Position to put the new airport.
- */
-static void PlaceAirport(TileIndex tile)
-{
- if (_selected_airport_index == -1) return;
- uint32 p2 = _ctrl_pressed;
- SB(p2, 16, 16, INVALID_STATION); // no station to join
-
- uint32 p1 = AirportClass::Get(_selected_airport_class)->GetSpec(_selected_airport_index)->GetIndex();
- p1 |= _selected_airport_layout << 8;
- CommandContainer cmdcont = { tile, p1, p2, CMD_BUILD_AIRPORT | CMD_MSG(STR_ERROR_CAN_T_BUILD_AIRPORT_HERE), CcBuildAirport, "" };
- ShowSelectStationIfNeeded(cmdcont, TileArea(tile, _thd.size.x / TILE_SIZE, _thd.size.y / TILE_SIZE));
-}
-
-/** Airport build toolbar window handler. */
-struct BuildAirToolbarWindow : Window {
- int last_user_action; // Last started user action.
-
- BuildAirToolbarWindow(WindowDesc *desc, WindowNumber window_number) : Window(desc)
- {
- this->InitNested(window_number);
- if (_settings_client.gui.link_terraform_toolbar) ShowTerraformToolbar(this);
- this->last_user_action = WIDGET_LIST_END;
- }
-
- ~BuildAirToolbarWindow()
- {
- if (_settings_client.gui.link_terraform_toolbar) DeleteWindowById(WC_SCEN_LAND_GEN, 0, false);
- }
-
- virtual void OnClick(Point pt, int widget, int click_count)
- {
- switch (widget) {
- case WID_AT_AIRPORT:
- if (HandlePlacePushButton(this, WID_AT_AIRPORT, SPR_CURSOR_AIRPORT, HT_RECT)) {
- ShowBuildAirportPicker(this);
- this->last_user_action = widget;
- }
- break;
-
- case WID_AT_DEMOLISH:
- HandlePlacePushButton(this, WID_AT_DEMOLISH, ANIMCURSOR_DEMOLISH, HT_RECT | HT_DIAGONAL);
- this->last_user_action = widget;
- break;
-
- default: break;
- }
- }
-
-
- virtual void OnPlaceObject(Point pt, TileIndex tile)
- {
- switch (this->last_user_action) {
- case WID_AT_AIRPORT:
- PlaceAirport(tile);
- break;
-
- case WID_AT_DEMOLISH:
- PlaceProc_DemolishArea(tile);
- break;
-
- default: NOT_REACHED();
- }
- }
-
- virtual void OnPlaceDrag(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt)
- {
- VpSelectTilesWithMethod(pt.x, pt.y, select_method);
- }
-
- virtual void OnPlaceMouseUp(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt, TileIndex start_tile, TileIndex end_tile)
- {
- if (pt.x != -1 && select_proc == DDSP_DEMOLISH_AREA) {
- GUIPlaceProcDragXY(select_proc, start_tile, end_tile);
- }
- }
-
- virtual void OnPlaceObjectAbort()
- {
- this->RaiseButtons();
-
- DeleteWindowById(WC_BUILD_STATION, TRANSPORT_AIR);
- DeleteWindowById(WC_SELECT_STATION, 0);
- }
-
- static HotkeyList hotkeys;
-};
-
-/**
- * Handler for global hotkeys of the BuildAirToolbarWindow.
- * @param hotkey Hotkey
- * @return ES_HANDLED if hotkey was accepted.
- */
-static EventState AirportToolbarGlobalHotkeys(int hotkey)
-{
- if (_game_mode != GM_NORMAL || !CanBuildVehicleInfrastructure(VEH_AIRCRAFT)) return ES_NOT_HANDLED;
- Window *w = ShowBuildAirToolbar();
- if (w == NULL) return ES_NOT_HANDLED;
- return w->OnHotkey(hotkey);
-}
-
-static Hotkey airtoolbar_hotkeys[] = {
- Hotkey('1', "airport", WID_AT_AIRPORT),
- Hotkey('2', "demolish", WID_AT_DEMOLISH),
- HOTKEY_LIST_END
-};
-HotkeyList BuildAirToolbarWindow::hotkeys("airtoolbar", airtoolbar_hotkeys, AirportToolbarGlobalHotkeys);
-
-static const NWidgetPart _nested_air_toolbar_widgets[] = {
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
- NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_TOOLBAR_AIRCRAFT_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
- NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN),
- EndContainer(),
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_AT_AIRPORT), SetFill(0, 1), SetMinimalSize(42, 22), SetDataTip(SPR_IMG_AIRPORT, STR_TOOLBAR_AIRCRAFT_BUILD_AIRPORT_TOOLTIP),
- NWidget(WWT_PANEL, COLOUR_DARK_GREEN), SetMinimalSize(4, 22), SetFill(1, 1), EndContainer(),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_AT_DEMOLISH), SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_DYNAMITE, STR_TOOLTIP_DEMOLISH_BUILDINGS_ETC),
- EndContainer(),
-};
-
-static WindowDesc _air_toolbar_desc(
- WDP_ALIGN_TOOLBAR, "toolbar_air", 0, 0,
- WC_BUILD_TOOLBAR, WC_NONE,
- WDF_CONSTRUCTION,
- _nested_air_toolbar_widgets, lengthof(_nested_air_toolbar_widgets),
- &BuildAirToolbarWindow::hotkeys
-);
-
-/**
- * Open the build airport toolbar window
- *
- * If the terraform toolbar is linked to the toolbar, that window is also opened.
- *
- * @return newly opened airport toolbar, or NULL if the toolbar could not be opened.
- */
-Window *ShowBuildAirToolbar()
-{
- if (!Company::IsValidID(_local_company)) return NULL;
-
- DeleteWindowByClass(WC_BUILD_TOOLBAR);
- return AllocateWindowDescFront(&_air_toolbar_desc, TRANSPORT_AIR);
-}
-
-class BuildAirportWindow : public PickerWindowBase {
- SpriteID preview_sprite; ///< Cached airport preview sprite.
- int line_height;
- Scrollbar *vscroll;
-
- /** Build a dropdown list of available airport classes */
- static DropDownList *BuildAirportClassDropDown()
- {
- DropDownList *list = new DropDownList();
-
- for (uint i = 0; i < AirportClass::GetClassCount(); i++) {
- *list->Append() = new DropDownListStringItem(AirportClass::Get((AirportClassID)i)->name, i, false);
- }
-
- return list;
- }
-
-public:
- BuildAirportWindow(WindowDesc *desc, Window *parent) : PickerWindowBase(desc, parent)
- {
- this->CreateNestedTree();
-
- this->vscroll = this->GetScrollbar(WID_AP_SCROLLBAR);
- this->vscroll->SetCapacity(5);
- this->vscroll->SetPosition(0);
-
- this->FinishInitNested(TRANSPORT_AIR);
-
- this->SetWidgetLoweredState(WID_AP_BTN_DONTHILIGHT, !_settings_client.gui.station_show_coverage);
- this->SetWidgetLoweredState(WID_AP_BTN_DOHILIGHT, _settings_client.gui.station_show_coverage);
- this->OnInvalidateData();
-
- this->vscroll->SetCount(AirportClass::Get(_selected_airport_class)->GetSpecCount());
- this->SelectFirstAvailableAirport(true);
- }
-
- virtual ~BuildAirportWindow()
- {
- DeleteWindowById(WC_SELECT_STATION, 0);
- }
-
- virtual void SetStringParameters(int widget) const
- {
- switch (widget) {
- case WID_AP_CLASS_DROPDOWN:
- SetDParam(0, AirportClass::Get(_selected_airport_class)->name);
- break;
-
- case WID_AP_LAYOUT_NUM:
- SetDParam(0, STR_EMPTY);
- if (_selected_airport_index != -1) {
- const AirportSpec *as = AirportClass::Get(_selected_airport_class)->GetSpec(_selected_airport_index);
- StringID string = GetAirportTextCallback(as, _selected_airport_layout, CBID_AIRPORT_LAYOUT_NAME);
- if (string != STR_UNDEFINED) {
- SetDParam(0, string);
- } else if (as->num_table > 1) {
- SetDParam(0, STR_STATION_BUILD_AIRPORT_LAYOUT_NAME);
- SetDParam(1, _selected_airport_layout + 1);
- }
- }
- break;
-
- default: break;
- }
- }
-
- virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
- {
- switch (widget) {
- case WID_AP_CLASS_DROPDOWN: {
- Dimension d = {0, 0};
- for (uint i = 0; i < AirportClass::GetClassCount(); i++) {
- SetDParam(0, AirportClass::Get((AirportClassID)i)->name);
- d = maxdim(d, GetStringBoundingBox(STR_BLACK_STRING));
- }
- d.width += padding.width;
- d.height += padding.height;
- *size = maxdim(*size, d);
- break;
- }
-
- case WID_AP_AIRPORT_LIST: {
- for (int i = 0; i < NUM_AIRPORTS; i++) {
- const AirportSpec *as = AirportSpec::Get(i);
- if (!as->enabled) continue;
-
- size->width = max(size->width, GetStringBoundingBox(as->name).width);
- }
-
- this->line_height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
- size->height = 5 * this->line_height;
- break;
- }
-
- case WID_AP_AIRPORT_SPRITE:
- for (int i = 0; i < NUM_AIRPORTS; i++) {
- const AirportSpec *as = AirportSpec::Get(i);
- if (!as->enabled) continue;
- for (byte layout = 0; layout < as->num_table; layout++) {
- SpriteID sprite = GetCustomAirportSprite(as, layout);
- if (sprite != 0) {
- Dimension d = GetSpriteSize(sprite);
- d.width += WD_FRAMERECT_LEFT + WD_FRAMERECT_RIGHT;
- d.height += WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM;
- *size = maxdim(d, *size);
- }
- }
- }
- break;
-
- case WID_AP_EXTRA_TEXT:
- for (int i = NEW_AIRPORT_OFFSET; i < NUM_AIRPORTS; i++) {
- const AirportSpec *as = AirportSpec::Get(i);
- if (!as->enabled) continue;
- for (byte layout = 0; layout < as->num_table; layout++) {
- StringID string = GetAirportTextCallback(as, layout, CBID_AIRPORT_ADDITIONAL_TEXT);
- if (string == STR_UNDEFINED) continue;
-
- /* STR_BLACK_STRING is used to start the string with {BLACK} */
- SetDParam(0, string);
- Dimension d = GetStringMultiLineBoundingBox(STR_BLACK_STRING, *size);
- *size = maxdim(d, *size);
- }
- }
- break;
-
- default: break;
- }
- }
-
- virtual void DrawWidget(const Rect &r, int widget) const
- {
- switch (widget) {
- case WID_AP_AIRPORT_LIST: {
- int y = r.top;
- AirportClass *apclass = AirportClass::Get(_selected_airport_class);
- for (uint i = this->vscroll->GetPosition(); this->vscroll->IsVisible(i) && i < apclass->GetSpecCount(); i++) {
- const AirportSpec *as = apclass->GetSpec(i);
- if (!as->IsAvailable()) {
- GfxFillRect(r.left + 1, y + 1, r.right - 1, y + this->line_height - 2, PC_BLACK, FILLRECT_CHECKER);
- }
-
- DrawString(r.left + WD_MATRIX_LEFT, r.right - WD_MATRIX_RIGHT, Center(y, this->line_height), as->name, ((int)i == _selected_airport_index) ? TC_WHITE : TC_BLACK);
-
- y += this->line_height;
- }
- break;
- }
-
- case WID_AP_AIRPORT_SPRITE:
- if (this->preview_sprite != 0) {
- Dimension d = GetSpriteSize(this->preview_sprite);
- DrawSprite(this->preview_sprite, COMPANY_SPRITE_COLOUR(_local_company), (r.left + r.right - d.width) / 2, (r.top + r.bottom - d.height) / 2);
- }
- break;
-
- case WID_AP_EXTRA_TEXT:
- if (_selected_airport_index != -1) {
- const AirportSpec *as = AirportClass::Get(_selected_airport_class)->GetSpec(_selected_airport_index);
- StringID string = GetAirportTextCallback(as, _selected_airport_layout, CBID_AIRPORT_ADDITIONAL_TEXT);
- if (string != STR_UNDEFINED) {
- SetDParam(0, string);
- DrawStringMultiLine(r.left, r.right, r.top, r.bottom, STR_BLACK_STRING);
- }
- }
- break;
- }
- }
-
- virtual void OnPaint()
- {
- this->DrawWidgets();
-
- uint16 top = this->GetWidget(WID_AP_BTN_DOHILIGHT)->pos_y + this->GetWidget(WID_AP_BTN_DOHILIGHT)->current_y + WD_PAR_VSEP_NORMAL;
- NWidgetBase *panel_nwi = this->GetWidget(WID_AP_BOTTOMPANEL);
-
- int right = panel_nwi->pos_x + panel_nwi->current_x;
- int bottom = panel_nwi->pos_y + panel_nwi->current_y;
-
- if (_selected_airport_index != -1) {
- const AirportSpec *as = AirportClass::Get(_selected_airport_class)->GetSpec(_selected_airport_index);
- int rad = _settings_game.station.modified_catchment ? as->catchment : (uint)CA_UNMODIFIED;
-
- /* only show the station (airport) noise, if the noise option is activated */
- if (_settings_game.economy.station_noise_level) {
- /* show the noise of the selected airport */
- SetDParam(0, as->noise_level);
- DrawString(panel_nwi->pos_x + WD_FRAMERECT_LEFT, right - WD_FRAMERECT_RIGHT, top, STR_STATION_BUILD_NOISE);
- top += FONT_HEIGHT_NORMAL + WD_PAR_VSEP_NORMAL;
- }
-
- /* strings such as 'Size' and 'Coverage Area' */
- top = DrawStationCoverageAreaText(panel_nwi->pos_x + WD_FRAMERECT_LEFT, right - WD_FRAMERECT_RIGHT, top, SCT_ALL, rad, false) + WD_PAR_VSEP_NORMAL;
- top = DrawStationCoverageAreaText(panel_nwi->pos_x + WD_FRAMERECT_LEFT, right - WD_FRAMERECT_RIGHT, top, SCT_ALL, rad, true) + WD_PAR_VSEP_NORMAL;
- }
-
- /* Resize background if the window is too small.
- * Never make the window smaller to avoid oscillating if the size change affects the acceptance.
- * (This is the case, if making the window bigger moves the mouse into the window.) */
- if (top > bottom) {
- ResizeWindow(this, 0, top - bottom);
- }
- }
-
- void SelectOtherAirport(int airport_index)
- {
- _selected_airport_index = airport_index;
- _selected_airport_layout = 0;
-
- this->UpdateSelectSize();
- this->SetDirty();
- }
-
- void UpdateSelectSize()
- {
- if (_selected_airport_index == -1) {
- SetTileSelectSize(1, 1);
- this->DisableWidget(WID_AP_LAYOUT_DECREASE);
- this->DisableWidget(WID_AP_LAYOUT_INCREASE);
- } else {
- const AirportSpec *as = AirportClass::Get(_selected_airport_class)->GetSpec(_selected_airport_index);
- int w = as->size_x;
- int h = as->size_y;
- Direction rotation = as->rotation[_selected_airport_layout];
- if (rotation == DIR_E || rotation == DIR_W) Swap(w, h);
- SetTileSelectSize(w, h);
-
- this->preview_sprite = GetCustomAirportSprite(as, _selected_airport_layout);
-
- this->SetWidgetDisabledState(WID_AP_LAYOUT_DECREASE, _selected_airport_layout == 0);
- this->SetWidgetDisabledState(WID_AP_LAYOUT_INCREASE, _selected_airport_layout + 1 >= as->num_table);
-
- int rad = _settings_game.station.modified_catchment ? as->catchment : (uint)CA_UNMODIFIED;
- if (_settings_client.gui.station_show_coverage) SetTileSelectBigSize(-rad, -rad, 2 * rad, 2 * rad);
- }
- }
-
- virtual void OnClick(Point pt, int widget, int click_count)
- {
- switch (widget) {
- case WID_AP_CLASS_DROPDOWN:
- ShowDropDownList(this, BuildAirportClassDropDown(), _selected_airport_class, WID_AP_CLASS_DROPDOWN);
- break;
-
- case WID_AP_AIRPORT_LIST: {
- int num_clicked = this->vscroll->GetPosition() + (pt.y - this->nested_array[widget]->pos_y) / this->line_height;
- if (num_clicked >= this->vscroll->GetCount()) break;
- const AirportSpec *as = AirportClass::Get(_selected_airport_class)->GetSpec(num_clicked);
- if (as->IsAvailable()) this->SelectOtherAirport(num_clicked);
- break;
- }
-
- case WID_AP_BTN_DONTHILIGHT: case WID_AP_BTN_DOHILIGHT:
- _settings_client.gui.station_show_coverage = (widget != WID_AP_BTN_DONTHILIGHT);
- this->SetWidgetLoweredState(WID_AP_BTN_DONTHILIGHT, !_settings_client.gui.station_show_coverage);
- this->SetWidgetLoweredState(WID_AP_BTN_DOHILIGHT, _settings_client.gui.station_show_coverage);
- this->SetDirty();
- if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
- this->UpdateSelectSize();
- break;
-
- case WID_AP_LAYOUT_DECREASE:
- _selected_airport_layout--;
- this->UpdateSelectSize();
- this->SetDirty();
- break;
-
- case WID_AP_LAYOUT_INCREASE:
- _selected_airport_layout++;
- this->UpdateSelectSize();
- this->SetDirty();
- break;
- }
- }
-
- /**
- * Select the first available airport.
- * @param change_class If true, change the class if no airport in the current
- * class is available.
- */
- void SelectFirstAvailableAirport(bool change_class)
- {
- /* First try to select an airport in the selected class. */
- AirportClass *sel_apclass = AirportClass::Get(_selected_airport_class);
- for (uint i = 0; i < sel_apclass->GetSpecCount(); i++) {
- const AirportSpec *as = sel_apclass->GetSpec(i);
- if (as->IsAvailable()) {
- this->SelectOtherAirport(i);
- return;
- }
- }
- if (change_class) {
- /* If that fails, select the first available airport
- * from a random class. */
- for (AirportClassID j = APC_BEGIN; j < APC_MAX; j++) {
- AirportClass *apclass = AirportClass::Get(j);
- for (uint i = 0; i < apclass->GetSpecCount(); i++) {
- const AirportSpec *as = apclass->GetSpec(i);
- if (as->IsAvailable()) {
- _selected_airport_class = j;
- this->SelectOtherAirport(i);
- return;
- }
- }
- }
- }
- /* If all airports are unavailable, select nothing. */
- this->SelectOtherAirport(-1);
- }
-
- virtual void OnDropdownSelect(int widget, int index)
- {
- assert(widget == WID_AP_CLASS_DROPDOWN);
- _selected_airport_class = (AirportClassID)index;
- this->vscroll->SetCount(AirportClass::Get(_selected_airport_class)->GetSpecCount());
- this->SelectFirstAvailableAirport(false);
- }
-
- virtual void OnTick()
- {
- CheckRedrawStationCoverage(this);
- }
-};
-
-static const NWidgetPart _nested_build_airport_widgets[] = {
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
- NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_STATION_BUILD_AIRPORT_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
- EndContainer(),
- NWidget(WWT_PANEL, COLOUR_DARK_GREEN), SetFill(1, 0), SetPIP(2, 0, 2),
- NWidget(WWT_LABEL, COLOUR_DARK_GREEN), SetDataTip(STR_STATION_BUILD_AIRPORT_CLASS_LABEL, STR_NULL), SetFill(1, 0),
- NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_AP_CLASS_DROPDOWN), SetFill(1, 0), SetDataTip(STR_BLACK_STRING, STR_STATION_BUILD_AIRPORT_TOOLTIP),
- NWidget(WWT_EMPTY, COLOUR_DARK_GREEN, WID_AP_AIRPORT_SPRITE), SetFill(1, 0),
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_MATRIX, COLOUR_GREY, WID_AP_AIRPORT_LIST), SetFill(1, 0), SetMatrixDataTip(1, 5, STR_STATION_BUILD_AIRPORT_TOOLTIP), SetScrollbar(WID_AP_SCROLLBAR),
- NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_AP_SCROLLBAR),
- EndContainer(),
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_AP_LAYOUT_DECREASE), SetMinimalSize(12, 0), SetDataTip(AWV_DECREASE, STR_NULL),
- NWidget(WWT_LABEL, COLOUR_GREY, WID_AP_LAYOUT_NUM), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_BLACK_STRING, STR_NULL),
- NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_AP_LAYOUT_INCREASE), SetMinimalSize(12, 0), SetDataTip(AWV_INCREASE, STR_NULL),
- EndContainer(),
- NWidget(WWT_EMPTY, COLOUR_DARK_GREEN, WID_AP_EXTRA_TEXT), SetFill(1, 0), SetMinimalSize(150, 0),
- EndContainer(),
- /* Bottom panel. */
- NWidget(WWT_PANEL, COLOUR_DARK_GREEN, WID_AP_BOTTOMPANEL), SetPIP(2, 2, 2),
- NWidget(WWT_LABEL, COLOUR_DARK_GREEN), SetDataTip(STR_STATION_BUILD_COVERAGE_AREA_TITLE, STR_NULL), SetFill(1, 0),
- NWidget(NWID_HORIZONTAL),
- NWidget(NWID_SPACER), SetMinimalSize(14, 0), SetFill(1, 0),
- NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
- NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_AP_BTN_DONTHILIGHT), SetMinimalSize(60, 12), SetFill(1, 0),
- SetDataTip(STR_STATION_BUILD_COVERAGE_OFF, STR_STATION_BUILD_COVERAGE_AREA_OFF_TOOLTIP),
- NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_AP_BTN_DOHILIGHT), SetMinimalSize(60, 12), SetFill(1, 0),
- SetDataTip(STR_STATION_BUILD_COVERAGE_ON, STR_STATION_BUILD_COVERAGE_AREA_ON_TOOLTIP),
- EndContainer(),
- NWidget(NWID_SPACER), SetMinimalSize(14, 0), SetFill(1, 0),
- EndContainer(),
- NWidget(NWID_SPACER), SetMinimalSize(0, 10), SetResize(0, 1), SetFill(1, 0),
- EndContainer(),
-};
-
-static WindowDesc _build_airport_desc(
- WDP_AUTO, "build_station_air", 0, 0,
- WC_BUILD_STATION, WC_BUILD_TOOLBAR,
- WDF_CONSTRUCTION,
- _nested_build_airport_widgets, lengthof(_nested_build_airport_widgets)
-);
-
-static void ShowBuildAirportPicker(Window *parent)
-{
- new BuildAirportWindow(&_build_airport_desc, parent);
-}
-
-void InitializeAirportGui()
-{
- _selected_airport_class = APC_BEGIN;
- _selected_airport_index = -1;
-}
diff --git a/src/autoreplace_gui.cpp.orig b/src/autoreplace_gui.cpp.orig
deleted file mode 100644
index dc1f5ed738..0000000000
--- a/src/autoreplace_gui.cpp.orig
+++ /dev/null
@@ -1,624 +0,0 @@
-/* $Id$ */
-
-/*
- * This file is part of OpenTTD.
- * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
- * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see .
- */
-
-/** @file autoreplace_gui.cpp GUI for autoreplace handling. */
-
-#include "stdafx.h"
-#include "command_func.h"
-#include "vehicle_gui.h"
-#include "newgrf_engine.h"
-#include "rail.h"
-#include "strings_func.h"
-#include "window_func.h"
-#include "autoreplace_func.h"
-#include "company_func.h"
-#include "engine_base.h"
-#include "window_gui.h"
-#include "engine_gui.h"
-#include "settings_func.h"
-#include "core/geometry_func.hpp"
-#include "rail_gui.h"
-#include "widgets/dropdown_func.h"
-
-#include "widgets/autoreplace_widget.h"
-
-
-uint GetEngineListHeight(VehicleType type);
-void DrawEngineList(VehicleType type, int x, int r, int y, const GUIEngineList *eng_list, uint16 min, uint16 max, EngineID selected_id, bool show_count, GroupID selected_group);
-
-static int CDECL EngineNumberSorter(const EngineID *a, const EngineID *b)
-{
- int r = Engine::Get(*a)->list_position - Engine::Get(*b)->list_position;
-
- return r;
-}
-
-/**
- * Rebuild the left autoreplace list if an engine is removed or added
- * @param e Engine to check if it is removed or added
- * @param id_g The group the engine belongs to
- * Note: this function only works if it is called either
- * - when a new vehicle is build, but before it's counted in num_engines
- * - when a vehicle is deleted and after it's subtracted from num_engines
- * - when not changing the count (used when changing replace orders)
- */
-void InvalidateAutoreplaceWindow(EngineID e, GroupID id_g)
-{
- if (GetGroupNumEngines(_local_company, id_g, e) == 0 || GetGroupNumEngines(_local_company, ALL_GROUP, e) == 0) {
- /* We don't have any of this engine type.
- * Either we just sold the last one, we build a new one or we stopped replacing it.
- * In all cases, we need to update the left list */
- InvalidateWindowData(WC_REPLACE_VEHICLE, Engine::Get(e)->type, 1);
- }
-}
-
-/**
- * When an engine is made buildable or is removed from being buildable, add/remove it from the build/autoreplace lists
- * @param type The type of engine
- */
-void AddRemoveEngineFromAutoreplaceAndBuildWindows(VehicleType type)
-{
- InvalidateWindowData(WC_REPLACE_VEHICLE, type, 0); // Update the autoreplace window
- InvalidateWindowClassesData(WC_BUILD_VEHICLE); // The build windows needs updating as well
-}
-
-static const StringID _start_replace_dropdown[] = {
- STR_REPLACE_VEHICLES_NOW,
- STR_REPLACE_VEHICLES_WHEN_OLD,
- INVALID_STRING_ID
-};
-
-/**
- * Window for the autoreplacing of vehicles.
- */
-class ReplaceVehicleWindow : public Window {
- EngineID sel_engine[2]; ///< Selected engine left and right.
- GUIEngineList engines[2]; ///< Left and right list of engines.
- bool replace_engines; ///< If \c true, engines are replaced, if \c false, wagons are replaced (only for trains).
- bool reset_sel_engine; ///< Also reset #sel_engine while updating left and/or right (#update_left and/or #update_right) and no valid engine selected.
- GroupID sel_group; ///< Group selected to replace.
- int details_height; ///< Minimal needed height of the details panels (found so far).
- RailType sel_railtype; ///< Type of rail tracks selected.
- Scrollbar *vscroll[2];
-
- /**
- * Figure out if an engine should be added to a list.
- * @param e The EngineID.
- * @param draw_left If \c true, the left list is drawn (the engines specific to the railtype you selected).
- * @param show_engines If \c true, the locomotives are drawn, else the wagons are drawn (never both).
- * @return \c true if the engine should be in the list (based on this check), else \c false.
- */
- bool GenerateReplaceRailList(EngineID e, bool draw_left, bool show_engines)
- {
- const RailVehicleInfo *rvi = RailVehInfo(e);
-
- /* Ensure that the wagon/engine selection fits the engine. */
- if ((rvi->railveh_type == RAILVEH_WAGON) == show_engines) return false;
-
- if (draw_left && show_engines) {
- /* Ensure that the railtype is specific to the selected one */
- if (rvi->railtype != this->sel_railtype) return false;
- }
- return true;
- }
-
-
- /**
- * Generate an engines list
- * @param draw_left true if generating the left list, otherwise false
- */
- void GenerateReplaceVehList(bool draw_left)
- {
- EngineID selected_engine = INVALID_ENGINE;
- VehicleType type = (VehicleType)this->window_number;
- byte side = draw_left ? 0 : 1;
-
- GUIEngineList *list = &this->engines[side];
- list->Clear();
-
- const Engine *e;
- FOR_ALL_ENGINES_OF_TYPE(e, type) {
- EngineID eid = e->index;
- if (type == VEH_TRAIN && !this->GenerateReplaceRailList(eid, draw_left, this->replace_engines)) continue; // special rules for trains
-
- if (draw_left) {
- const uint num_engines = GetGroupNumEngines(_local_company, this->sel_group, eid);
-
- /* Skip drawing the engines we don't have any of and haven't set for replacement */
- if (num_engines == 0 && EngineReplacementForCompany(Company::Get(_local_company), eid, this->sel_group) == INVALID_ENGINE) continue;
- } else {
- if (!CheckAutoreplaceValidity(this->sel_engine[0], eid, _local_company)) continue;
- }
-
- *list->Append() = eid;
- if (eid == this->sel_engine[side]) selected_engine = eid; // The selected engine is still in the list
- }
- this->sel_engine[side] = selected_engine; // update which engine we selected (the same or none, if it's not in the list anymore)
- EngList_Sort(list, &EngineNumberSorter);
- }
-
- /** Generate the lists */
- void GenerateLists()
- {
- EngineID e = this->sel_engine[0];
-
- if (this->engines[0].NeedRebuild()) {
- /* We need to rebuild the left engines list */
- this->GenerateReplaceVehList(true);
- this->vscroll[0]->SetCount(this->engines[0].Length());
- if (this->reset_sel_engine && this->sel_engine[0] == INVALID_ENGINE && this->engines[0].Length() != 0) {
- this->sel_engine[0] = this->engines[0][0];
- }
- }
-
- if (this->engines[1].NeedRebuild() || e != this->sel_engine[0]) {
- /* Either we got a request to rebuild the right engines list, or the left engines list selected a different engine */
- if (this->sel_engine[0] == INVALID_ENGINE) {
- /* Always empty the right engines list when nothing is selected in the left engines list */
- this->engines[1].Clear();
- this->sel_engine[1] = INVALID_ENGINE;
- } else {
- if (this->reset_sel_engine && this->sel_engine[0] != INVALID_ENGINE) {
- /* Select the current replacement for sel_engine[0]. */
- const Company *c = Company::Get(_local_company);
- this->sel_engine[1] = EngineReplacementForCompany(c, this->sel_engine[0], this->sel_group);
- }
- /* Regenerate the list on the right. Note: This resets sel_engine[1] to INVALID_ENGINE, if it is no longer available. */
- this->GenerateReplaceVehList(false);
- this->vscroll[1]->SetCount(this->engines[1].Length());
- if (this->reset_sel_engine && this->sel_engine[1] != INVALID_ENGINE) {
- int position = 0;
- for (EngineID *it = this->engines[1].Begin(); it != this->engines[1].End(); ++it) {
- if (*it == this->sel_engine[1]) break;
- ++position;
- }
- this->vscroll[1]->ScrollTowards(position);
- }
- }
- }
- /* Reset the flags about needed updates */
- this->engines[0].RebuildDone();
- this->engines[1].RebuildDone();
- this->reset_sel_engine = false;
- }
-
- /**
- * Handle click on the start replace button.
- * @param replace_when_old Replace now or only when old?
- */
- void ReplaceClick_StartReplace(bool replace_when_old)
- {
- EngineID veh_from = this->sel_engine[0];
- EngineID veh_to = this->sel_engine[1];
- DoCommandP(0, (replace_when_old ? 1 : 0) | (this->sel_group << 16), veh_from + (veh_to << 16), CMD_SET_AUTOREPLACE);
- }
-
-public:
- ReplaceVehicleWindow(WindowDesc *desc, VehicleType vehicletype, GroupID id_g) : Window(desc)
- {
- if (vehicletype == VEH_TRAIN) {
- /* For rail vehicles find the most used vehicle type, which is usually
- * better than 'just' the first/previous vehicle type. */
- uint type_count[RAILTYPE_END];
- memset(type_count, 0, sizeof(type_count));
-
- const Engine *e;
- FOR_ALL_ENGINES_OF_TYPE(e, VEH_TRAIN) {
- if (e->u.rail.railveh_type == RAILVEH_WAGON) continue;
- type_count[e->u.rail.railtype] += GetGroupNumEngines(_local_company, id_g, e->index);
- }
-
- this->sel_railtype = RAILTYPE_BEGIN;
- for (RailType rt = RAILTYPE_BEGIN; rt < RAILTYPE_END; rt++) {
- if (type_count[this->sel_railtype] < type_count[rt]) this->sel_railtype = rt;
- }
- }
-
- this->replace_engines = true; // start with locomotives (all other vehicles will not read this bool)
- this->engines[0].ForceRebuild();
- this->engines[1].ForceRebuild();
- this->reset_sel_engine = true;
- this->details_height = ((vehicletype == VEH_TRAIN) ? 10 : 9) * FONT_HEIGHT_NORMAL + WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM;
- this->sel_engine[0] = INVALID_ENGINE;
- this->sel_engine[1] = INVALID_ENGINE;
-
- this->CreateNestedTree();
- this->vscroll[0] = this->GetScrollbar(WID_RV_LEFT_SCROLLBAR);
- this->vscroll[1] = this->GetScrollbar(WID_RV_RIGHT_SCROLLBAR);
- this->FinishInitNested(vehicletype);
-
- this->owner = _local_company;
- this->sel_group = id_g;
- }
-
- virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
- {
- switch (widget) {
- case WID_RV_LEFT_MATRIX:
- case WID_RV_RIGHT_MATRIX:
- resize->height = GetEngineListHeight((VehicleType)this->window_number);
- size->height = (this->window_number <= VEH_ROAD ? 8 : 4) * resize->height;
- break;
-
- case WID_RV_LEFT_DETAILS:
- case WID_RV_RIGHT_DETAILS:
- size->height = this->details_height;
- break;
-
- case WID_RV_TRAIN_WAGONREMOVE_TOGGLE: {
- StringID str = this->GetWidget(widget)->widget_data;
- SetDParam(0, STR_CONFIG_SETTING_ON);
- Dimension d = GetStringBoundingBox(str);
- SetDParam(0, STR_CONFIG_SETTING_OFF);
- d = maxdim(d, GetStringBoundingBox(str));
- d.width += padding.width;
- d.height += padding.height;
- *size = maxdim(*size, d);
- break;
- }
-
- case WID_RV_TRAIN_ENGINEWAGON_TOGGLE: {
- StringID str = this->GetWidget(widget)->widget_data;
- SetDParam(0, STR_REPLACE_ENGINES);
- Dimension d = GetStringBoundingBox(str);
- SetDParam(0, STR_REPLACE_WAGONS);
- d = maxdim(d, GetStringBoundingBox(str));
- d.width += padding.width;
- d.height += padding.height;
- *size = maxdim(*size, d);
- break;
- }
-
- case WID_RV_INFO_TAB: {
- SetDParam(0, STR_REPLACE_NOT_REPLACING);
- Dimension d = GetStringBoundingBox(STR_BLACK_STRING);
- SetDParam(0, STR_REPLACE_NOT_REPLACING_VEHICLE_SELECTED);
- d = maxdim(d, GetStringBoundingBox(STR_BLACK_STRING));
- d.width += WD_FRAMETEXT_LEFT + WD_FRAMETEXT_RIGHT;
- d.height += WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM;
- *size = maxdim(*size, d);
- break;
- }
-
- case WID_RV_TRAIN_RAILTYPE_DROPDOWN: {
- Dimension d = {0, 0};
- for (RailType rt = RAILTYPE_BEGIN; rt != RAILTYPE_END; rt++) {
- const RailtypeInfo *rti = GetRailTypeInfo(rt);
- /* Skip rail type if it has no label */
- if (rti->label == 0) continue;
- d = maxdim(d, GetStringBoundingBox(rti->strings.replace_text));
- }
- d.width += padding.width;
- d.height += padding.height;
- *size = maxdim(*size, d);
- break;
- }
-
- case WID_RV_START_REPLACE: {
- Dimension d = GetStringBoundingBox(STR_REPLACE_VEHICLES_START);
- for (int i = 0; _start_replace_dropdown[i] != INVALID_STRING_ID; i++) {
- d = maxdim(d, GetStringBoundingBox(_start_replace_dropdown[i]));
- }
- d.width += padding.width;
- d.height += padding.height;
- *size = maxdim(*size, d);
- break;
- }
- }
- }
-
- virtual void SetStringParameters(int widget) const
- {
- switch (widget) {
- case WID_RV_CAPTION:
- SetDParam(0, STR_REPLACE_VEHICLE_TRAIN + this->window_number);
- switch (this->sel_group) {
- case ALL_GROUP:
- SetDParam(1, STR_GROUP_ALL_TRAINS + this->window_number);
- break;
-
- case DEFAULT_GROUP:
- SetDParam(1, STR_GROUP_DEFAULT_TRAINS + this->window_number);
- break;
-
- default:
- SetDParam(1, STR_GROUP_NAME);
- SetDParam(2, sel_group);
- break;
- }
- break;
-
- case WID_RV_TRAIN_WAGONREMOVE_TOGGLE: {
- const Company *c = Company::Get(_local_company);
- SetDParam(0, c->settings.renew_keep_length ? STR_CONFIG_SETTING_ON : STR_CONFIG_SETTING_OFF);
- break;
- }
-
- case WID_RV_TRAIN_ENGINEWAGON_TOGGLE:
- SetDParam(0, this->replace_engines ? STR_REPLACE_ENGINES : STR_REPLACE_WAGONS);
- break;
- }
- }
-
- virtual void DrawWidget(const Rect &r, int widget) const
- {
- switch (widget) {
- case WID_RV_INFO_TAB: {
- const Company *c = Company::Get(_local_company);
- if (this->sel_engine[0] != INVALID_ENGINE) {
- if (!EngineHasReplacementForCompany(c, this->sel_engine[0], this->sel_group)) {
- SetDParam(0, STR_REPLACE_NOT_REPLACING);
- } else {
- bool when_old = false;
- EngineID e = EngineReplacementForCompany(c, this->sel_engine[0], this->sel_group, &when_old);
- SetDParam(0, when_old ? STR_REPLACE_REPLACING_WHEN_OLD : STR_ENGINE_NAME);
- SetDParam(1, e);
- }
- } else {
- SetDParam(0, STR_REPLACE_NOT_REPLACING_VEHICLE_SELECTED);
- }
-
- DrawString(r.left + WD_FRAMETEXT_LEFT, r.right - WD_FRAMETEXT_RIGHT, r.top + WD_FRAMERECT_TOP, STR_BLACK_STRING, TC_FROMSTRING, SA_HOR_CENTER);
- break;
- }
-
- case WID_RV_LEFT_MATRIX:
- case WID_RV_RIGHT_MATRIX: {
- int side = (widget == WID_RV_LEFT_MATRIX) ? 0 : 1;
- EngineID start = this->vscroll[side]->GetPosition(); // what is the offset for the start (scrolling)
- EngineID end = min(this->vscroll[side]->GetCapacity() + start, this->engines[side].Length());
-
- /* Do the actual drawing */
- DrawEngineList((VehicleType)this->window_number, r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP,
- &this->engines[side], start, end, this->sel_engine[side], side == 0, this->sel_group);
- break;
- }
- }
- }
-
- virtual void OnPaint()
- {
- if (this->engines[0].NeedRebuild() || this->engines[1].NeedRebuild()) this->GenerateLists();
-
- Company *c = Company::Get(_local_company);
-
- /* Disable the "Start Replacing" button if:
- * Either engines list is empty
- * or The selected replacement engine has a replacement (to prevent loops). */
- this->SetWidgetDisabledState(WID_RV_START_REPLACE,
- this->sel_engine[0] == INVALID_ENGINE ||
- this->sel_engine[1] == INVALID_ENGINE ||
- EngineReplacementForCompany(c, this->sel_engine[1], this->sel_group) != INVALID_ENGINE);
-
- /* Disable the "Stop Replacing" button if:
- * The left engines list (existing vehicle) is empty
- * or The selected vehicle has no replacement set up */
- this->SetWidgetDisabledState(WID_RV_STOP_REPLACE,
- this->sel_engine[0] == INVALID_ENGINE ||
- !EngineHasReplacementForCompany(c, this->sel_engine[0], this->sel_group));
-
- if (this->window_number == VEH_TRAIN) {
- /* sets the colour of that art thing */
- this->GetWidget(WID_RV_TRAIN_FLUFF_LEFT)->colour = _company_colours[_local_company];
- this->GetWidget(WID_RV_TRAIN_FLUFF_RIGHT)->colour = _company_colours[_local_company];
-
- /* Show the selected railtype in the pulldown menu */
- this->GetWidget(WID_RV_TRAIN_RAILTYPE_DROPDOWN)->widget_data = GetRailTypeInfo(sel_railtype)->strings.replace_text;
- }
-
- this->DrawWidgets();
-
- if (!this->IsShaded()) {
- int needed_height = this->details_height;
- /* Draw details panels. */
- for (int side = 0; side < 2; side++) {
- if (this->sel_engine[side] != INVALID_ENGINE) {
- NWidgetBase *nwi = this->GetWidget(side == 0 ? WID_RV_LEFT_DETAILS : WID_RV_RIGHT_DETAILS);
- int text_end = DrawVehiclePurchaseInfo(nwi->pos_x + WD_FRAMETEXT_LEFT, nwi->pos_x + nwi->current_x - WD_FRAMETEXT_RIGHT,
- nwi->pos_y + WD_FRAMERECT_TOP, this->sel_engine[side]);
- needed_height = max(needed_height, text_end - (int)nwi->pos_y + WD_FRAMERECT_BOTTOM);
- }
- }
- if (needed_height != this->details_height) { // Details window are not high enough, enlarge them.
- this->details_height = needed_height;
- this->ReInit();
- return;
- }
- }
- }
-
- virtual void OnClick(Point pt, int widget, int click_count)
- {
- switch (widget) {
- case WID_RV_TRAIN_ENGINEWAGON_TOGGLE:
- this->replace_engines = !(this->replace_engines);
- this->engines[0].ForceRebuild();
- this->reset_sel_engine = true;
- this->SetDirty();
- break;
-
- case WID_RV_TRAIN_RAILTYPE_DROPDOWN: // Railtype selection dropdown menu
- ShowDropDownList(this, GetRailTypeDropDownList(true), sel_railtype, WID_RV_TRAIN_RAILTYPE_DROPDOWN);
- break;
-
- case WID_RV_TRAIN_WAGONREMOVE_TOGGLE: // toggle renew_keep_length
- DoCommandP(0, GetCompanySettingIndex("company.renew_keep_length"), Company::Get(_local_company)->settings.renew_keep_length ? 0 : 1, CMD_CHANGE_COMPANY_SETTING);
- break;
-
- case WID_RV_START_REPLACE: { // Start replacing
- if (this->GetWidget(widget)->ButtonHit(pt)) {
- this->HandleButtonClick(WID_RV_START_REPLACE);
- ReplaceClick_StartReplace(false);
- } else {
- bool replacment_when_old = EngineHasReplacementWhenOldForCompany(Company::Get(_local_company), this->sel_engine[0], this->sel_group);
- ShowDropDownMenu(this, _start_replace_dropdown, replacment_when_old ? 1 : 0, WID_RV_START_REPLACE, !this->replace_engines ? 1 << 1 : 0, 0);
- }
- break;
- }
-
- case WID_RV_STOP_REPLACE: { // Stop replacing
- EngineID veh_from = this->sel_engine[0];
- DoCommandP(0, this->sel_group << 16, veh_from + (INVALID_ENGINE << 16), CMD_SET_AUTOREPLACE);
- break;
- }
-
- case WID_RV_LEFT_MATRIX:
- case WID_RV_RIGHT_MATRIX: {
- byte click_side;
- if (widget == WID_RV_LEFT_MATRIX) {
- click_side = 0;
- } else {
- click_side = 1;
- }
- uint i = this->vscroll[click_side]->GetScrolledRowFromWidget(pt.y, this, widget);
- size_t engine_count = this->engines[click_side].Length();
-
- EngineID e = engine_count > i ? this->engines[click_side][i] : INVALID_ENGINE;
- if (e == this->sel_engine[click_side]) break; // we clicked the one we already selected
- this->sel_engine[click_side] = e;
- if (click_side == 0) {
- this->engines[1].ForceRebuild();
- this->reset_sel_engine = true;
- }
- this->SetDirty();
- break;
- }
- }
- }
-
- virtual void OnDropdownSelect(int widget, int index)
- {
- switch (widget) {
- case WID_RV_TRAIN_RAILTYPE_DROPDOWN: {
- RailType temp = (RailType)index;
- if (temp == sel_railtype) return; // we didn't select a new one. No need to change anything
- sel_railtype = temp;
- /* Reset scrollbar positions */
- this->vscroll[0]->SetPosition(0);
- this->vscroll[1]->SetPosition(0);
- /* Rebuild the lists */
- this->engines[0].ForceRebuild();
- this->engines[1].ForceRebuild();
- this->reset_sel_engine = true;
- this->SetDirty();
- break;
- }
-
- case WID_RV_START_REPLACE:
- this->ReplaceClick_StartReplace(index != 0);
- break;
- }
- }
-
- virtual void OnResize()
- {
- this->vscroll[0]->SetCapacityFromWidget(this, WID_RV_LEFT_MATRIX);
- this->vscroll[1]->SetCapacityFromWidget(this, WID_RV_RIGHT_MATRIX);
- }
-
- /**
- * Some data on this window has become invalid.
- * @param data Information about the changed data.
- * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
- */
- virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
- {
- if (data != 0) {
- /* This needs to be done in command-scope to enforce rebuilding before resorting invalid data */
- this->engines[0].ForceRebuild();
- } else {
- this->engines[1].ForceRebuild();
- }
- }
-};
-
-static const NWidgetPart _nested_replace_rail_vehicle_widgets[] = {
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_CLOSEBOX, COLOUR_GREY),
- NWidget(WWT_CAPTION, COLOUR_GREY, WID_RV_CAPTION), SetDataTip(STR_REPLACE_VEHICLES_WHITE, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
- NWidget(WWT_SHADEBOX, COLOUR_GREY),
- NWidget(WWT_DEFSIZEBOX, COLOUR_GREY),
- NWidget(WWT_STICKYBOX, COLOUR_GREY),
- EndContainer(),
- NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
- NWidget(WWT_MATRIX, COLOUR_GREY, WID_RV_LEFT_MATRIX), SetMinimalSize(216, 0), SetFill(1, 1), SetMatrixDataTip(1, 0, STR_REPLACE_HELP_LEFT_ARRAY), SetResize(1, 1), SetScrollbar(WID_RV_LEFT_SCROLLBAR),
- NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_RV_LEFT_SCROLLBAR),
- NWidget(WWT_MATRIX, COLOUR_GREY, WID_RV_RIGHT_MATRIX), SetMinimalSize(216, 0), SetFill(1, 1), SetMatrixDataTip(1, 0, STR_REPLACE_HELP_RIGHT_ARRAY), SetResize(1, 1), SetScrollbar(WID_RV_RIGHT_SCROLLBAR),
- NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_RV_RIGHT_SCROLLBAR),
- EndContainer(),
- NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
- NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_LEFT_DETAILS), SetMinimalSize(240, 122), SetResize(1, 0), EndContainer(),
- NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_RIGHT_DETAILS), SetMinimalSize(240, 122), SetResize(1, 0), EndContainer(),
- EndContainer(),
- NWidget(NWID_HORIZONTAL),
- NWidget(NWID_PUSHBUTTON_DROPDOWN, COLOUR_GREY, WID_RV_START_REPLACE), SetMinimalSize(139, 12), SetDataTip(STR_REPLACE_VEHICLES_START, STR_REPLACE_HELP_START_BUTTON),
- NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_INFO_TAB), SetMinimalSize(167, 12), SetDataTip(0x0, STR_REPLACE_HELP_REPLACE_INFO_TAB), SetResize(1, 0),
- EndContainer(),
- NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_RV_STOP_REPLACE), SetMinimalSize(150, 12), SetDataTip(STR_REPLACE_VEHICLES_STOP, STR_REPLACE_HELP_STOP_BUTTON),
- EndContainer(),
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_RV_TRAIN_ENGINEWAGON_TOGGLE), SetMinimalSize(139, 12), SetDataTip(STR_REPLACE_ENGINE_WAGON_SELECT, STR_REPLACE_ENGINE_WAGON_SELECT_HELP),
- NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_TRAIN_FLUFF_LEFT), SetMinimalSize(15, 12), EndContainer(),
- NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_RV_TRAIN_RAILTYPE_DROPDOWN), SetMinimalSize(136, 12), SetDataTip(0x0, STR_REPLACE_HELP_RAILTYPE), SetResize(1, 0),
- NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_TRAIN_FLUFF_RIGHT), SetMinimalSize(16, 12), EndContainer(),
- NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_RV_TRAIN_WAGONREMOVE_TOGGLE), SetMinimalSize(138, 12), SetDataTip(STR_REPLACE_REMOVE_WAGON, STR_REPLACE_REMOVE_WAGON_HELP),
- NWidget(WWT_RESIZEBOX, COLOUR_GREY),
- EndContainer(),
-};
-
-static WindowDesc _replace_rail_vehicle_desc(
- WDP_AUTO, "replace_vehicle_train", 500, 140,
- WC_REPLACE_VEHICLE, WC_NONE,
- WDF_CONSTRUCTION,
- _nested_replace_rail_vehicle_widgets, lengthof(_nested_replace_rail_vehicle_widgets)
-);
-
-static const NWidgetPart _nested_replace_vehicle_widgets[] = {
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_CLOSEBOX, COLOUR_GREY),
- NWidget(WWT_CAPTION, COLOUR_GREY, WID_RV_CAPTION), SetMinimalSize(433, 14), SetDataTip(STR_REPLACE_VEHICLES_WHITE, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
- NWidget(WWT_SHADEBOX, COLOUR_GREY),
- NWidget(WWT_DEFSIZEBOX, COLOUR_GREY),
- NWidget(WWT_STICKYBOX, COLOUR_GREY),
- EndContainer(),
- NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
- NWidget(WWT_MATRIX, COLOUR_GREY, WID_RV_LEFT_MATRIX), SetMinimalSize(216, 0), SetFill(1, 1), SetMatrixDataTip(1, 0, STR_REPLACE_HELP_LEFT_ARRAY), SetResize(1, 1), SetScrollbar(WID_RV_LEFT_SCROLLBAR),
- NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_RV_LEFT_SCROLLBAR),
- NWidget(WWT_MATRIX, COLOUR_GREY, WID_RV_RIGHT_MATRIX), SetMinimalSize(216, 0), SetFill(1, 1), SetMatrixDataTip(1, 0, STR_REPLACE_HELP_RIGHT_ARRAY), SetResize(1, 1), SetScrollbar(WID_RV_RIGHT_SCROLLBAR),
- NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_RV_RIGHT_SCROLLBAR),
- EndContainer(),
- NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
- NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_LEFT_DETAILS), SetMinimalSize(228, 92), SetResize(1, 0), EndContainer(),
- NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_RIGHT_DETAILS), SetMinimalSize(228, 92), SetResize(1, 0), EndContainer(),
- EndContainer(),
- NWidget(NWID_HORIZONTAL),
- NWidget(NWID_PUSHBUTTON_DROPDOWN, COLOUR_GREY, WID_RV_START_REPLACE), SetMinimalSize(139, 12), SetDataTip(STR_REPLACE_VEHICLES_START, STR_REPLACE_HELP_START_BUTTON),
- NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_INFO_TAB), SetMinimalSize(167, 12), SetDataTip(0x0, STR_REPLACE_HELP_REPLACE_INFO_TAB), SetResize(1, 0), EndContainer(),
- NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_RV_STOP_REPLACE), SetMinimalSize(138, 12), SetDataTip(STR_REPLACE_VEHICLES_STOP, STR_REPLACE_HELP_STOP_BUTTON),
- NWidget(WWT_RESIZEBOX, COLOUR_GREY),
- EndContainer(),
-};
-
-static WindowDesc _replace_vehicle_desc(
- WDP_AUTO, "replace_vehicle", 456, 118,
- WC_REPLACE_VEHICLE, WC_NONE,
- WDF_CONSTRUCTION,
- _nested_replace_vehicle_widgets, lengthof(_nested_replace_vehicle_widgets)
-);
-
-/**
- * Show the autoreplace configuration window for a particular group.
- * @param id_g The group to replace the vehicles for.
- * @param vehicletype The type of vehicles in the group.
- */
-void ShowReplaceGroupVehicleWindow(GroupID id_g, VehicleType vehicletype)
-{
- DeleteWindowById(WC_REPLACE_VEHICLE, vehicletype);
- new ReplaceVehicleWindow(vehicletype == VEH_TRAIN ? &_replace_rail_vehicle_desc : &_replace_vehicle_desc, vehicletype, id_g);
-}
diff --git a/src/build_vehicle_gui.cpp.orig b/src/build_vehicle_gui.cpp.orig
deleted file mode 100644
index 410b2dbb3b..0000000000
--- a/src/build_vehicle_gui.cpp.orig
+++ /dev/null
@@ -1,1427 +0,0 @@
-/* $Id$ */
-
-/*
- * This file is part of OpenTTD.
- * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
- * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see .
- */
-
-/** @file build_vehicle_gui.cpp GUI for building vehicles. */
-
-#include "stdafx.h"
-#include "engine_base.h"
-#include "engine_func.h"
-#include "station_base.h"
-#include "network/network.h"
-#include "articulated_vehicles.h"
-#include "textbuf_gui.h"
-#include "command_func.h"
-#include "company_func.h"
-#include "vehicle_gui.h"
-#include "newgrf_engine.h"
-#include "newgrf_text.h"
-#include "group.h"
-#include "string_func.h"
-#include "strings_func.h"
-#include "window_func.h"
-#include "date_func.h"
-#include "vehicle_func.h"
-#include "widgets/dropdown_func.h"
-#include "engine_gui.h"
-#include "cargotype.h"
-#include "core/geometry_func.hpp"
-#include "autoreplace_func.h"
-
-#include "widgets/build_vehicle_widget.h"
-
-#include "table/strings.h"
-
-/**
- * Get the height of a single 'entry' in the engine lists.
- * @param type the vehicle type to get the height of
- * @return the height for the entry
- */
-uint GetEngineListHeight(VehicleType type)
-{
- return max(FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM, GetVehicleImageCellSize(type, EIT_PURCHASE).height);
-}
-
-static const NWidgetPart _nested_build_vehicle_widgets[] = {
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_CLOSEBOX, COLOUR_GREY),
- NWidget(WWT_CAPTION, COLOUR_GREY, WID_BV_CAPTION), SetDataTip(STR_WHITE_STRING, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
- NWidget(WWT_SHADEBOX, COLOUR_GREY),
- NWidget(WWT_DEFSIZEBOX, COLOUR_GREY),
- NWidget(WWT_STICKYBOX, COLOUR_GREY),
- EndContainer(),
- NWidget(WWT_PANEL, COLOUR_GREY),
- NWidget(NWID_HORIZONTAL),
- NWidget(NWID_VERTICAL),
- NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_BV_SORT_ASSENDING_DESCENDING), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER), SetFill(1, 0),
- NWidget(NWID_SPACER), SetFill(1, 1),
- EndContainer(),
- NWidget(NWID_VERTICAL),
- NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_BV_SORT_DROPDOWN), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_JUST_STRING, STR_TOOLTIP_SORT_CRITERIA),
- NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_BV_CARGO_FILTER_DROPDOWN), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_JUST_STRING, STR_TOOLTIP_FILTER_CRITERIA),
- EndContainer(),
- EndContainer(),
- EndContainer(),
- /* Vehicle list. */
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_MATRIX, COLOUR_GREY, WID_BV_LIST), SetResize(1, 1), SetFill(1, 0), SetMatrixDataTip(1, 0, STR_NULL), SetScrollbar(WID_BV_SCROLLBAR),
- NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_BV_SCROLLBAR),
- EndContainer(),
- /* Panel with details. */
- NWidget(WWT_PANEL, COLOUR_GREY, WID_BV_PANEL), SetMinimalSize(240, 122), SetResize(1, 0), EndContainer(),
- /* Build/rename buttons, resize button. */
- NWidget(NWID_HORIZONTAL),
- NWidget(NWID_SELECTION, INVALID_COLOUR, WID_BV_BUILD_SEL),
- NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_BV_BUILD), SetResize(1, 0), SetFill(1, 0),
- EndContainer(),
- NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_BV_RENAME), SetResize(1, 0), SetFill(1, 0),
- NWidget(WWT_RESIZEBOX, COLOUR_GREY),
- EndContainer(),
-};
-
-/** Special cargo filter criteria */
-static const CargoID CF_ANY = CT_NO_REFIT; ///< Show all vehicles independent of carried cargo (i.e. no filtering)
-static const CargoID CF_NONE = CT_INVALID; ///< Show only vehicles which do not carry cargo (e.g. train engines)
-
-static bool _internal_sort_order; ///< false = descending, true = ascending
-static byte _last_sort_criteria[] = {0, 0, 0, 0};
-static bool _last_sort_order[] = {false, false, false, false};
-static CargoID _last_filter_criteria[] = {CF_ANY, CF_ANY, CF_ANY, CF_ANY};
-
-/**
- * Determines order of engines by engineID
- * @param *a first engine to compare
- * @param *b second engine to compare
- * @return for descending order: returns < 0 if a < b and > 0 for a > b. Vice versa for ascending order and 0 for equal
- */
-static int CDECL EngineNumberSorter(const EngineID *a, const EngineID *b)
-{
- int r = Engine::Get(*a)->list_position - Engine::Get(*b)->list_position;
-
- return _internal_sort_order ? -r : r;
-}
-
-/**
- * Determines order of engines by introduction date
- * @param *a first engine to compare
- * @param *b second engine to compare
- * @return for descending order: returns < 0 if a < b and > 0 for a > b. Vice versa for ascending order and 0 for equal
- */
-static int CDECL EngineIntroDateSorter(const EngineID *a, const EngineID *b)
-{
- const int va = Engine::Get(*a)->intro_date;
- const int vb = Engine::Get(*b)->intro_date;
- const int r = va - vb;
-
- /* Use EngineID to sort instead since we want consistent sorting */
- if (r == 0) return EngineNumberSorter(a, b);
- return _internal_sort_order ? -r : r;
-}
-
-/**
- * Determines order of engines by name
- * @param *a first engine to compare
- * @param *b second engine to compare
- * @return for descending order: returns < 0 if a < b and > 0 for a > b. Vice versa for ascending order and 0 for equal
- */
-static int CDECL EngineNameSorter(const EngineID *a, const EngineID *b)
-{
- static EngineID last_engine[2] = { INVALID_ENGINE, INVALID_ENGINE };
- static char last_name[2][64] = { "\0", "\0" };
-
- const EngineID va = *a;
- const EngineID vb = *b;
-
- if (va != last_engine[0]) {
- last_engine[0] = va;
- SetDParam(0, va);
- GetString(last_name[0], STR_ENGINE_NAME, lastof(last_name[0]));
- }
-
- if (vb != last_engine[1]) {
- last_engine[1] = vb;
- SetDParam(0, vb);
- GetString(last_name[1], STR_ENGINE_NAME, lastof(last_name[1]));
- }
-
- int r = strnatcmp(last_name[0], last_name[1]); // Sort by name (natural sorting).
-
- /* Use EngineID to sort instead since we want consistent sorting */
- if (r == 0) return EngineNumberSorter(a, b);
- return _internal_sort_order ? -r : r;
-}
-
-/**
- * Determines order of engines by reliability
- * @param *a first engine to compare
- * @param *b second engine to compare
- * @return for descending order: returns < 0 if a < b and > 0 for a > b. Vice versa for ascending order and 0 for equal
- */
-static int CDECL EngineReliabilitySorter(const EngineID *a, const EngineID *b)
-{
- const int va = Engine::Get(*a)->reliability;
- const int vb = Engine::Get(*b)->reliability;
- const int r = va - vb;
-
- /* Use EngineID to sort instead since we want consistent sorting */
- if (r == 0) return EngineNumberSorter(a, b);
- return _internal_sort_order ? -r : r;
-}
-
-/**
- * Determines order of engines by purchase cost
- * @param *a first engine to compare
- * @param *b second engine to compare
- * @return for descending order: returns < 0 if a < b and > 0 for a > b. Vice versa for ascending order and 0 for equal
- */
-static int CDECL EngineCostSorter(const EngineID *a, const EngineID *b)
-{
- Money va = Engine::Get(*a)->GetCost();
- Money vb = Engine::Get(*b)->GetCost();
- int r = ClampToI32(va - vb);
-
- /* Use EngineID to sort instead since we want consistent sorting */
- if (r == 0) return EngineNumberSorter(a, b);
- return _internal_sort_order ? -r : r;
-}
-
-/**
- * Determines order of engines by speed
- * @param *a first engine to compare
- * @param *b second engine to compare
- * @return for descending order: returns < 0 if a < b and > 0 for a > b. Vice versa for ascending order and 0 for equal
- */
-static int CDECL EngineSpeedSorter(const EngineID *a, const EngineID *b)
-{
- int va = Engine::Get(*a)->GetDisplayMaxSpeed();
- int vb = Engine::Get(*b)->GetDisplayMaxSpeed();
- int r = va - vb;
-
- /* Use EngineID to sort instead since we want consistent sorting */
- if (r == 0) return EngineNumberSorter(a, b);
- return _internal_sort_order ? -r : r;
-}
-
-/**
- * Determines order of engines by power
- * @param *a first engine to compare
- * @param *b second engine to compare
- * @return for descending order: returns < 0 if a < b and > 0 for a > b. Vice versa for ascending order and 0 for equal
- */
-static int CDECL EnginePowerSorter(const EngineID *a, const EngineID *b)
-{
- int va = Engine::Get(*a)->GetPower();
- int vb = Engine::Get(*b)->GetPower();
- int r = va - vb;
-
- /* Use EngineID to sort instead since we want consistent sorting */
- if (r == 0) return EngineNumberSorter(a, b);
- return _internal_sort_order ? -r : r;
-}
-
-/**
- * Determines order of engines by tractive effort
- * @param *a first engine to compare
- * @param *b second engine to compare
- * @return for descending order: returns < 0 if a < b and > 0 for a > b. Vice versa for ascending order and 0 for equal
- */
-static int CDECL EngineTractiveEffortSorter(const EngineID *a, const EngineID *b)
-{
- int va = Engine::Get(*a)->GetDisplayMaxTractiveEffort();
- int vb = Engine::Get(*b)->GetDisplayMaxTractiveEffort();
- int r = va - vb;
-
- /* Use EngineID to sort instead since we want consistent sorting */
- if (r == 0) return EngineNumberSorter(a, b);
- return _internal_sort_order ? -r : r;
-}
-
-/**
- * Determines order of engines by running costs
- * @param *a first engine to compare
- * @param *b second engine to compare
- * @return for descending order: returns < 0 if a < b and > 0 for a > b. Vice versa for ascending order and 0 for equal
- */
-static int CDECL EngineRunningCostSorter(const EngineID *a, const EngineID *b)
-{
- Money va = Engine::Get(*a)->GetRunningCost();
- Money vb = Engine::Get(*b)->GetRunningCost();
- int r = ClampToI32(va - vb);
-
- /* Use EngineID to sort instead since we want consistent sorting */
- if (r == 0) return EngineNumberSorter(a, b);
- return _internal_sort_order ? -r : r;
-}
-
-/**
- * Determines order of engines by running costs
- * @param *a first engine to compare
- * @param *b second engine to compare
- * @return for descending order: returns < 0 if a < b and > 0 for a > b. Vice versa for ascending order and 0 for equal
- */
-static int CDECL EnginePowerVsRunningCostSorter(const EngineID *a, const EngineID *b)
-{
- const Engine *e_a = Engine::Get(*a);
- const Engine *e_b = Engine::Get(*b);
-
- /* Here we are using a few tricks to get the right sort.
- * We want power/running cost, but since we usually got higher running cost than power and we store the result in an int,
- * we will actually calculate cunning cost/power (to make it more than 1).
- * Because of this, the return value have to be reversed as well and we return b - a instead of a - b.
- * Another thing is that both power and running costs should be doubled for multiheaded engines.
- * Since it would be multiplying with 2 in both numerator and denominator, it will even themselves out and we skip checking for multiheaded. */
- Money va = (e_a->GetRunningCost()) / max(1U, (uint)e_a->GetPower());
- Money vb = (e_b->GetRunningCost()) / max(1U, (uint)e_b->GetPower());
- int r = ClampToI32(vb - va);
-
- /* Use EngineID to sort instead since we want consistent sorting */
- if (r == 0) return EngineNumberSorter(a, b);
- return _internal_sort_order ? -r : r;
-}
-
-/* Train sorting functions */
-
-/**
- * Determines order of train engines by capacity
- * @param *a first engine to compare
- * @param *b second engine to compare
- * @return for descending order: returns < 0 if a < b and > 0 for a > b. Vice versa for ascending order and 0 for equal
- */
-static int CDECL TrainEngineCapacitySorter(const EngineID *a, const EngineID *b)
-{
- const RailVehicleInfo *rvi_a = RailVehInfo(*a);
- const RailVehicleInfo *rvi_b = RailVehInfo(*b);
-
- int va = GetTotalCapacityOfArticulatedParts(*a) * (rvi_a->railveh_type == RAILVEH_MULTIHEAD ? 2 : 1);
- int vb = GetTotalCapacityOfArticulatedParts(*b) * (rvi_b->railveh_type == RAILVEH_MULTIHEAD ? 2 : 1);
- int r = va - vb;
-
- /* Use EngineID to sort instead since we want consistent sorting */
- if (r == 0) return EngineNumberSorter(a, b);
- return _internal_sort_order ? -r : r;
-}
-
-/**
- * Determines order of train engines by engine / wagon
- * @param *a first engine to compare
- * @param *b second engine to compare
- * @return for descending order: returns < 0 if a < b and > 0 for a > b. Vice versa for ascending order and 0 for equal
- */
-static int CDECL TrainEnginesThenWagonsSorter(const EngineID *a, const EngineID *b)
-{
- int val_a = (RailVehInfo(*a)->railveh_type == RAILVEH_WAGON ? 1 : 0);
- int val_b = (RailVehInfo(*b)->railveh_type == RAILVEH_WAGON ? 1 : 0);
- int r = val_a - val_b;
-
- /* Use EngineID to sort instead since we want consistent sorting */
- if (r == 0) return EngineNumberSorter(a, b);
- return _internal_sort_order ? -r : r;
-}
-
-/* Road vehicle sorting functions */
-
-/**
- * Determines order of road vehicles by capacity
- * @param *a first engine to compare
- * @param *b second engine to compare
- * @return for descending order: returns < 0 if a < b and > 0 for a > b. Vice versa for ascending order and 0 for equal
- */
-static int CDECL RoadVehEngineCapacitySorter(const EngineID *a, const EngineID *b)
-{
- int va = GetTotalCapacityOfArticulatedParts(*a);
- int vb = GetTotalCapacityOfArticulatedParts(*b);
- int r = va - vb;
-
- /* Use EngineID to sort instead since we want consistent sorting */
- if (r == 0) return EngineNumberSorter(a, b);
- return _internal_sort_order ? -r : r;
-}
-
-/* Ship vehicle sorting functions */
-
-/**
- * Determines order of ships by capacity
- * @param *a first engine to compare
- * @param *b second engine to compare
- * @return for descending order: returns < 0 if a < b and > 0 for a > b. Vice versa for ascending order and 0 for equal
- */
-static int CDECL ShipEngineCapacitySorter(const EngineID *a, const EngineID *b)
-{
- const Engine *e_a = Engine::Get(*a);
- const Engine *e_b = Engine::Get(*b);
-
- int va = e_a->GetDisplayDefaultCapacity();
- int vb = e_b->GetDisplayDefaultCapacity();
- int r = va - vb;
-
- /* Use EngineID to sort instead since we want consistent sorting */
- if (r == 0) return EngineNumberSorter(a, b);
- return _internal_sort_order ? -r : r;
-}
-
-/* Aircraft sorting functions */
-
-/**
- * Determines order of aircraft by cargo
- * @param *a first engine to compare
- * @param *b second engine to compare
- * @return for descending order: returns < 0 if a < b and > 0 for a > b. Vice versa for ascending order and 0 for equal
- */
-static int CDECL AircraftEngineCargoSorter(const EngineID *a, const EngineID *b)
-{
- const Engine *e_a = Engine::Get(*a);
- const Engine *e_b = Engine::Get(*b);
-
- uint16 mail_a, mail_b;
- int va = e_a->GetDisplayDefaultCapacity(&mail_a);
- int vb = e_b->GetDisplayDefaultCapacity(&mail_b);
- int r = va - vb;
-
- if (r == 0) {
- /* The planes have the same passenger capacity. Check mail capacity instead */
- r = mail_a - mail_b;
-
- if (r == 0) {
- /* Use EngineID to sort instead since we want consistent sorting */
- return EngineNumberSorter(a, b);
- }
- }
- return _internal_sort_order ? -r : r;
-}
-
-/**
- * Determines order of aircraft by range.
- * @param *a first engine to compare.
- * @param *b second engine to compare.
- * @return for descending order: returns < 0 if a < b and > 0 for a > b. Vice versa for ascending order and 0 for equal.
- */
-static int CDECL AircraftRangeSorter(const EngineID *a, const EngineID *b)
-{
- uint16 r_a = Engine::Get(*a)->GetRange();
- uint16 r_b = Engine::Get(*b)->GetRange();
-
- int r = r_a - r_b;
-
- /* Use EngineID to sort instead since we want consistent sorting */
- if (r == 0) return EngineNumberSorter(a, b);
- return _internal_sort_order ? -r : r;
-}
-
-static EngList_SortTypeFunction * const _sorter[][11] = {{
- /* Trains */
- &EngineNumberSorter,
- &EngineCostSorter,
- &EngineSpeedSorter,
- &EnginePowerSorter,
- &EngineTractiveEffortSorter,
- &EngineIntroDateSorter,
- &EngineNameSorter,
- &EngineRunningCostSorter,
- &EnginePowerVsRunningCostSorter,
- &EngineReliabilitySorter,
- &TrainEngineCapacitySorter,
-}, {
- /* Road vehicles */
- &EngineNumberSorter,
- &EngineCostSorter,
- &EngineSpeedSorter,
- &EnginePowerSorter,
- &EngineTractiveEffortSorter,
- &EngineIntroDateSorter,
- &EngineNameSorter,
- &EngineRunningCostSorter,
- &EnginePowerVsRunningCostSorter,
- &EngineReliabilitySorter,
- &RoadVehEngineCapacitySorter,
-}, {
- /* Ships */
- &EngineNumberSorter,
- &EngineCostSorter,
- &EngineSpeedSorter,
- &EngineIntroDateSorter,
- &EngineNameSorter,
- &EngineRunningCostSorter,
- &EngineReliabilitySorter,
- &ShipEngineCapacitySorter,
-}, {
- /* Aircraft */
- &EngineNumberSorter,
- &EngineCostSorter,
- &EngineSpeedSorter,
- &EngineIntroDateSorter,
- &EngineNameSorter,
- &EngineRunningCostSorter,
- &EngineReliabilitySorter,
- &AircraftEngineCargoSorter,
- &AircraftRangeSorter,
-}};
-
-static const StringID _sort_listing[][12] = {{
- /* Trains */
- STR_SORT_BY_ENGINE_ID,
- STR_SORT_BY_COST,
- STR_SORT_BY_MAX_SPEED,
- STR_SORT_BY_POWER,
- STR_SORT_BY_TRACTIVE_EFFORT,
- STR_SORT_BY_INTRO_DATE,
- STR_SORT_BY_NAME,
- STR_SORT_BY_RUNNING_COST,
- STR_SORT_BY_POWER_VS_RUNNING_COST,
- STR_SORT_BY_RELIABILITY,
- STR_SORT_BY_CARGO_CAPACITY,
- INVALID_STRING_ID
-}, {
- /* Road vehicles */
- STR_SORT_BY_ENGINE_ID,
- STR_SORT_BY_COST,
- STR_SORT_BY_MAX_SPEED,
- STR_SORT_BY_POWER,
- STR_SORT_BY_TRACTIVE_EFFORT,
- STR_SORT_BY_INTRO_DATE,
- STR_SORT_BY_NAME,
- STR_SORT_BY_RUNNING_COST,
- STR_SORT_BY_POWER_VS_RUNNING_COST,
- STR_SORT_BY_RELIABILITY,
- STR_SORT_BY_CARGO_CAPACITY,
- INVALID_STRING_ID
-}, {
- /* Ships */
- STR_SORT_BY_ENGINE_ID,
- STR_SORT_BY_COST,
- STR_SORT_BY_MAX_SPEED,
- STR_SORT_BY_INTRO_DATE,
- STR_SORT_BY_NAME,
- STR_SORT_BY_RUNNING_COST,
- STR_SORT_BY_RELIABILITY,
- STR_SORT_BY_CARGO_CAPACITY,
- INVALID_STRING_ID
-}, {
- /* Aircraft */
- STR_SORT_BY_ENGINE_ID,
- STR_SORT_BY_COST,
- STR_SORT_BY_MAX_SPEED,
- STR_SORT_BY_INTRO_DATE,
- STR_SORT_BY_NAME,
- STR_SORT_BY_RUNNING_COST,
- STR_SORT_BY_RELIABILITY,
- STR_SORT_BY_CARGO_CAPACITY,
- STR_SORT_BY_RANGE,
- INVALID_STRING_ID
-}};
-
-/** Cargo filter functions */
-static bool CDECL CargoFilter(const EngineID *eid, const CargoID cid)
-{
- if (cid == CF_ANY) return true;
- uint32 refit_mask = GetUnionOfArticulatedRefitMasks(*eid, true) & _standard_cargo_mask;
- return (cid == CF_NONE ? refit_mask == 0 : HasBit(refit_mask, cid));
-}
-
-static GUIEngineList::FilterFunction * const _filter_funcs[] = {
- &CargoFilter,
-};
-
-static int DrawCargoCapacityInfo(int left, int right, int y, EngineID engine, bool refittable)
-{
- CargoArray cap = GetCapacityOfArticulatedParts(engine);
-
- for (CargoID c = 0; c < NUM_CARGO; c++) {
- if (cap[c] == 0) continue;
-
- SetDParam(0, c);
- SetDParam(1, cap[c]);
- SetDParam(2, refittable ? STR_PURCHASE_INFO_REFITTABLE : STR_EMPTY);
- DrawString(left, right, y, STR_PURCHASE_INFO_CAPACITY);
- y += FONT_HEIGHT_NORMAL;
-
- /* Only show as refittable once */
- refittable = false;
- }
-
- return y;
-}
-
-/* Draw rail wagon specific details */
-static int DrawRailWagonPurchaseInfo(int left, int right, int y, EngineID engine_number, const RailVehicleInfo *rvi)
-{
- const Engine *e = Engine::Get(engine_number);
-
- /* Purchase cost */
- SetDParam(0, e->GetCost());
- DrawString(left, right, y, STR_PURCHASE_INFO_COST);
- y += FONT_HEIGHT_NORMAL;
-
- /* Wagon weight - (including cargo) */
- uint weight = e->GetDisplayWeight();
- SetDParam(0, weight);
- uint cargo_weight = (e->CanCarryCargo() ? CargoSpec::Get(e->GetDefaultCargoType())->weight * GetTotalCapacityOfArticulatedParts(engine_number) / 16 : 0);
- SetDParam(1, cargo_weight + weight);
- DrawString(left, right, y, STR_PURCHASE_INFO_WEIGHT_CWEIGHT);
- y += FONT_HEIGHT_NORMAL;
-
- /* Wagon speed limit, displayed if above zero */
- if (_settings_game.vehicle.wagon_speed_limits) {
- uint max_speed = e->GetDisplayMaxSpeed();
- if (max_speed > 0) {
- SetDParam(0, max_speed);
- DrawString(left, right, y, STR_PURCHASE_INFO_SPEED);
- y += FONT_HEIGHT_NORMAL;
- }
- }
-
- /* Running cost */
- if (rvi->running_cost_class != INVALID_PRICE) {
- SetDParam(0, e->GetRunningCost());
- DrawString(left, right, y, STR_PURCHASE_INFO_RUNNINGCOST);
- y += FONT_HEIGHT_NORMAL;
- }
-
- return y;
-}
-
-/* Draw locomotive specific details */
-static int DrawRailEnginePurchaseInfo(int left, int right, int y, EngineID engine_number, const RailVehicleInfo *rvi)
-{
- const Engine *e = Engine::Get(engine_number);
-
- /* Purchase Cost - Engine weight */
- SetDParam(0, e->GetCost());
- SetDParam(1, e->GetDisplayWeight());
- DrawString(left, right, y, STR_PURCHASE_INFO_COST_WEIGHT);
- y += FONT_HEIGHT_NORMAL;
-
- /* Max speed - Engine power */
- SetDParam(0, e->GetDisplayMaxSpeed());
- SetDParam(1, e->GetPower());
- DrawString(left, right, y, STR_PURCHASE_INFO_SPEED_POWER);
- y += FONT_HEIGHT_NORMAL;
-
- /* Max tractive effort - not applicable if old acceleration or maglev */
- if (_settings_game.vehicle.train_acceleration_model != AM_ORIGINAL && GetRailTypeInfo(rvi->railtype)->acceleration_type != 2) {
- SetDParam(0, e->GetDisplayMaxTractiveEffort());
- DrawString(left, right, y, STR_PURCHASE_INFO_MAX_TE);
- y += FONT_HEIGHT_NORMAL;
- }
-
- /* Running cost */
- if (rvi->running_cost_class != INVALID_PRICE) {
- SetDParam(0, e->GetRunningCost());
- DrawString(left, right, y, STR_PURCHASE_INFO_RUNNINGCOST);
- y += FONT_HEIGHT_NORMAL;
- }
-
- /* Powered wagons power - Powered wagons extra weight */
- if (rvi->pow_wag_power != 0) {
- SetDParam(0, rvi->pow_wag_power);
- SetDParam(1, rvi->pow_wag_weight);
- DrawString(left, right, y, STR_PURCHASE_INFO_PWAGPOWER_PWAGWEIGHT);
- y += FONT_HEIGHT_NORMAL;
- }
-
- return y;
-}
-
-/* Draw road vehicle specific details */
-static int DrawRoadVehPurchaseInfo(int left, int right, int y, EngineID engine_number)
-{
- const Engine *e = Engine::Get(engine_number);
-
- if (_settings_game.vehicle.roadveh_acceleration_model != AM_ORIGINAL) {
- /* Purchase Cost */
- SetDParam(0, e->GetCost());
- DrawString(left, right, y, STR_PURCHASE_INFO_COST);
- y += FONT_HEIGHT_NORMAL;
-
- /* Road vehicle weight - (including cargo) */
- int16 weight = e->GetDisplayWeight();
- SetDParam(0, weight);
- uint cargo_weight = (e->CanCarryCargo() ? CargoSpec::Get(e->GetDefaultCargoType())->weight * GetTotalCapacityOfArticulatedParts(engine_number) / 16 : 0);
- SetDParam(1, cargo_weight + weight);
- DrawString(left, right, y, STR_PURCHASE_INFO_WEIGHT_CWEIGHT);
- y += FONT_HEIGHT_NORMAL;
-
- /* Max speed - Engine power */
- SetDParam(0, e->GetDisplayMaxSpeed());
- SetDParam(1, e->GetPower());
- DrawString(left, right, y, STR_PURCHASE_INFO_SPEED_POWER);
- y += FONT_HEIGHT_NORMAL;
-
- /* Max tractive effort */
- SetDParam(0, e->GetDisplayMaxTractiveEffort());
- DrawString(left, right, y, STR_PURCHASE_INFO_MAX_TE);
- y += FONT_HEIGHT_NORMAL;
- } else {
- /* Purchase cost - Max speed */
- SetDParam(0, e->GetCost());
- SetDParam(1, e->GetDisplayMaxSpeed());
- DrawString(left, right, y, STR_PURCHASE_INFO_COST_SPEED);
- y += FONT_HEIGHT_NORMAL;
- }
-
- /* Running cost */
- SetDParam(0, e->GetRunningCost());
- DrawString(left, right, y, STR_PURCHASE_INFO_RUNNINGCOST);
- y += FONT_HEIGHT_NORMAL;
-
- return y;
-}
-
-/* Draw ship specific details */
-static int DrawShipPurchaseInfo(int left, int right, int y, EngineID engine_number, bool refittable)
-{
- const Engine *e = Engine::Get(engine_number);
-
- /* Purchase cost - Max speed */
- uint raw_speed = e->GetDisplayMaxSpeed();
- uint ocean_speed = e->u.ship.ApplyWaterClassSpeedFrac(raw_speed, true);
- uint canal_speed = e->u.ship.ApplyWaterClassSpeedFrac(raw_speed, false);
-
- SetDParam(0, e->GetCost());
- if (ocean_speed == canal_speed) {
- SetDParam(1, ocean_speed);
- DrawString(left, right, y, STR_PURCHASE_INFO_COST_SPEED);
- y += FONT_HEIGHT_NORMAL;
- } else {
- DrawString(left, right, y, STR_PURCHASE_INFO_COST);
- y += FONT_HEIGHT_NORMAL;
-
- SetDParam(0, ocean_speed);
- DrawString(left, right, y, STR_PURCHASE_INFO_SPEED_OCEAN);
- y += FONT_HEIGHT_NORMAL;
-
- SetDParam(0, canal_speed);
- DrawString(left, right, y, STR_PURCHASE_INFO_SPEED_CANAL);
- y += FONT_HEIGHT_NORMAL;
- }
-
- /* Cargo type + capacity */
- SetDParam(0, e->GetDefaultCargoType());
- SetDParam(1, e->GetDisplayDefaultCapacity());
- SetDParam(2, refittable ? STR_PURCHASE_INFO_REFITTABLE : STR_EMPTY);
- DrawString(left, right, y, STR_PURCHASE_INFO_CAPACITY);
- y += FONT_HEIGHT_NORMAL;
-
- /* Running cost */
- SetDParam(0, e->GetRunningCost());
- DrawString(left, right, y, STR_PURCHASE_INFO_RUNNINGCOST);
- y += FONT_HEIGHT_NORMAL;
-
- return y;
-}
-
-/* Draw aircraft specific details */
-static int DrawAircraftPurchaseInfo(int left, int right, int y, EngineID engine_number, bool refittable)
-{
- const Engine *e = Engine::Get(engine_number);
- CargoID cargo = e->GetDefaultCargoType();
-
- /* Purchase cost - Max speed */
- SetDParam(0, e->GetCost());
- SetDParam(1, e->GetDisplayMaxSpeed());
- DrawString(left, right, y, STR_PURCHASE_INFO_COST_SPEED);
- y += FONT_HEIGHT_NORMAL;
-
- /* Cargo capacity */
- uint16 mail_capacity;
- uint capacity = e->GetDisplayDefaultCapacity(&mail_capacity);
- if (mail_capacity > 0) {
- SetDParam(0, cargo);
- SetDParam(1, capacity);
- SetDParam(2, CT_MAIL);
- SetDParam(3, mail_capacity);
- DrawString(left, right, y, STR_PURCHASE_INFO_AIRCRAFT_CAPACITY);
- } else {
- /* Note, if the default capacity is selected by the refit capacity
- * callback, then the capacity shown is likely to be incorrect. */
- SetDParam(0, cargo);
- SetDParam(1, capacity);
- SetDParam(2, refittable ? STR_PURCHASE_INFO_REFITTABLE : STR_EMPTY);
- DrawString(left, right, y, STR_PURCHASE_INFO_CAPACITY);
- }
- y += FONT_HEIGHT_NORMAL;
-
- /* Running cost */
- SetDParam(0, e->GetRunningCost());
- DrawString(left, right, y, STR_PURCHASE_INFO_RUNNINGCOST);
- y += FONT_HEIGHT_NORMAL;
-
- uint16 range = e->GetRange();
- if (range != 0) {
- SetDParam(0, range);
- DrawString(left, right, y, STR_PURCHASE_INFO_AIRCRAFT_RANGE);
- y += FONT_HEIGHT_NORMAL;
- }
-
- return y;
-}
-
-/**
- * Display additional text from NewGRF in the purchase information window
- * @param left Left border of text bounding box
- * @param right Right border of text bounding box
- * @param y Top border of text bounding box
- * @param engine Engine to query the additional purchase information for
- * @return Bottom border of text bounding box
- */
-static uint ShowAdditionalText(int left, int right, int y, EngineID engine)
-{
- uint16 callback = GetVehicleCallback(CBID_VEHICLE_ADDITIONAL_TEXT, 0, 0, engine, NULL);
- if (callback == CALLBACK_FAILED || callback == 0x400) return y;
- const GRFFile *grffile = Engine::Get(engine)->GetGRF();
- if (callback > 0x400) {
- ErrorUnknownCallbackResult(grffile->grfid, CBID_VEHICLE_ADDITIONAL_TEXT, callback);
- return y;
- }
-
- StartTextRefStackUsage(grffile, 6);
- uint result = DrawStringMultiLine(left, right, y, INT32_MAX, GetGRFStringID(grffile->grfid, 0xD000 + callback), TC_BLACK);
- StopTextRefStackUsage();
- return result;
-}
-
-/**
- * Draw the purchase info details of a vehicle at a given location.
- * @param left,right,y location where to draw the info
- * @param engine_number the engine of which to draw the info of
- * @return y after drawing all the text
- */
-int DrawVehiclePurchaseInfo(int left, int right, int y, EngineID engine_number)
-{
- const Engine *e = Engine::Get(engine_number);
- YearMonthDay ymd;
- ConvertDateToYMD(e->intro_date, &ymd);
- bool refittable = IsArticulatedVehicleRefittable(engine_number);
- bool articulated_cargo = false;
-
- switch (e->type) {
- default: NOT_REACHED();
- case VEH_TRAIN:
- if (e->u.rail.railveh_type == RAILVEH_WAGON) {
- y = DrawRailWagonPurchaseInfo(left, right, y, engine_number, &e->u.rail);
- } else {
- y = DrawRailEnginePurchaseInfo(left, right, y, engine_number, &e->u.rail);
- }
- articulated_cargo = true;
- break;
-
- case VEH_ROAD:
- y = DrawRoadVehPurchaseInfo(left, right, y, engine_number);
- articulated_cargo = true;
- break;
-
- case VEH_SHIP:
- y = DrawShipPurchaseInfo(left, right, y, engine_number, refittable);
- break;
-
- case VEH_AIRCRAFT:
- y = DrawAircraftPurchaseInfo(left, right, y, engine_number, refittable);
- break;
- }
-
- if (articulated_cargo) {
- /* Cargo type + capacity, or N/A */
- int new_y = DrawCargoCapacityInfo(left, right, y, engine_number, refittable);
-
- if (new_y == y) {
- SetDParam(0, CT_INVALID);
- SetDParam(2, STR_EMPTY);
- DrawString(left, right, y, STR_PURCHASE_INFO_CAPACITY);
- y += FONT_HEIGHT_NORMAL;
- } else {
- y = new_y;
- }
- }
-
- /* Draw details that apply to all types except rail wagons. */
- if (e->type != VEH_TRAIN || e->u.rail.railveh_type != RAILVEH_WAGON) {
- /* Design date - Life length */
- SetDParam(0, ymd.year);
- SetDParam(1, e->GetLifeLengthInDays() / DAYS_IN_LEAP_YEAR);
- DrawString(left, right, y, STR_PURCHASE_INFO_DESIGNED_LIFE);
- y += FONT_HEIGHT_NORMAL;
-
- /* Reliability */
- SetDParam(0, ToPercent16(e->reliability));
- DrawString(left, right, y, STR_PURCHASE_INFO_RELIABILITY);
- y += FONT_HEIGHT_NORMAL;
- }
-
- if (refittable) y = ShowRefitOptionsList(left, right, y, engine_number);
-
- /* Additional text from NewGRF */
- y = ShowAdditionalText(left, right, y, engine_number);
-
- return y;
-}
-
-/**
- * Engine drawing loop
- * @param type Type of vehicle (VEH_*)
- * @param l The left most location of the list
- * @param r The right most location of the list
- * @param y The top most location of the list
- * @param eng_list What engines to draw
- * @param min where to start in the list
- * @param max where in the list to end
- * @param selected_id what engine to highlight as selected, if any
- * @param show_count Whether to show the amount of engines or not
- * @param selected_group the group to list the engines of
- */
-void DrawEngineList(VehicleType type, int l, int r, int y, const GUIEngineList *eng_list, uint16 min, uint16 max, EngineID selected_id, bool show_count, GroupID selected_group)
-{
- static const int sprite_y_offsets[] = { -1, -1, -2, -2 };
-
- /* Obligatory sanity checks! */
- assert(max <= eng_list->Length());
-
- bool rtl = _current_text_dir == TD_RTL;
- int step_size = GetEngineListHeight(type);
- int sprite_left = GetVehicleImageCellSize(type, EIT_PURCHASE).extend_left;
- int sprite_right = GetVehicleImageCellSize(type, EIT_PURCHASE).extend_right;
- int sprite_width = sprite_left + sprite_right;
-
- int sprite_x = rtl ? r - sprite_right - 1 : l + sprite_left + 1;
-
- Dimension replace_icon = {0, 0};
- int count_width = 0;
- if (show_count) {
- replace_icon = GetSpriteSize(SPR_GROUP_REPLACE_ACTIVE);
- SetDParamMaxDigits(0, 3, FS_SMALL);
- count_width = GetStringBoundingBox(STR_TINY_BLACK_COMA).width;
- }
-
- int text_left = l + (rtl ? WD_FRAMERECT_LEFT + replace_icon.width + 8 + count_width : sprite_width + WD_FRAMETEXT_LEFT);
- int text_right = r - (rtl ? sprite_width + WD_FRAMETEXT_RIGHT : WD_FRAMERECT_RIGHT + replace_icon.width + 8 + count_width);
- int replace_icon_left = rtl ? l + WD_FRAMERECT_LEFT : r - WD_FRAMERECT_RIGHT - replace_icon.width;
- int count_left = l;
- int count_right = rtl ? text_left : r - WD_FRAMERECT_RIGHT - replace_icon.width - 8;
-
- for (; min < max; min++, y += step_size) {
- const EngineID engine = (*eng_list)[min];
- /* Note: num_engines is only used in the autoreplace GUI, so it is correct to use _local_company here. */
- const uint num_engines = GetGroupNumEngines(_local_company, selected_group, engine);
-
- SetDParam(0, engine);
- DrawString(text_left, text_right, Center(y, step_size), STR_ENGINE_NAME, text_colour);
- DrawVehicleEngine(l, r, sprite_x, Center(y, step_size, sprite_y_offsets[type]), engine, palette_crash ? PALETTE_CRASH : GetEnginePalette(engine, _local_company), EIT_PURCHASE);
- if (show_count) {
- SetDParam(0, num_engines);
- DrawString(count_left, count_right, Center(y, step_size, FONT_HEIGHT_SMALL), STR_TINY_BLACK_COMA, TC_FROMSTRING, SA_RIGHT | SA_FORCE);
- if (EngineHasReplacementForCompany(Company::Get(_local_company), engine, selected_group)) DrawSprite(SPR_GROUP_REPLACE_ACTIVE, num_engines == 0 ? PALETTE_CRASH : PAL_NONE, replace_icon_left, Center(y, step_size, replace_icon.height));
- }
- }
-}
-
-
-struct BuildVehicleWindow : Window {
- VehicleType vehicle_type;
- union {
- RailTypeByte railtype;
- RoadTypes roadtypes;
- } filter;
- bool descending_sort_order;
- byte sort_criteria;
- bool listview_mode;
- EngineID sel_engine;
- EngineID rename_engine;
- GUIEngineList eng_list;
- CargoID cargo_filter[NUM_CARGO + 2]; ///< Available cargo filters; CargoID or CF_ANY or CF_NONE
- StringID cargo_filter_texts[NUM_CARGO + 3]; ///< Texts for filter_cargo, terminated by INVALID_STRING_ID
- byte cargo_filter_criteria; ///< Selected cargo filter
- int details_height; ///< Minimal needed height of the details panels (found so far).
- Scrollbar *vscroll;
-
- BuildVehicleWindow(WindowDesc *desc, TileIndex tile, VehicleType type) : Window(desc)
- {
- this->vehicle_type = type;
- this->window_number = tile == INVALID_TILE ? (int)type : tile;
-
- this->sel_engine = INVALID_ENGINE;
-
- this->sort_criteria = _last_sort_criteria[type];
- this->descending_sort_order = _last_sort_order[type];
-
- switch (type) {
- default: NOT_REACHED();
- case VEH_TRAIN:
- this->filter.railtype = (tile == INVALID_TILE) ? RAILTYPE_END : GetRailType(tile);
- break;
- case VEH_ROAD:
- this->filter.roadtypes = (tile == INVALID_TILE) ? ROADTYPES_ALL : GetRoadTypes(tile);
- case VEH_SHIP:
- case VEH_AIRCRAFT:
- break;
- }
-
- this->listview_mode = (this->window_number <= VEH_END);
-
- this->CreateNestedTree();
-
- this->vscroll = this->GetScrollbar(WID_BV_SCROLLBAR);
-
- /* If we are just viewing the list of vehicles, we do not need the Build button.
- * So we just hide it, and enlarge the Rename button by the now vacant place. */
- if (this->listview_mode) this->GetWidget(WID_BV_BUILD_SEL)->SetDisplayedPlane(SZSP_NONE);
-
- /* disable renaming engines in network games if you are not the server */
- this->SetWidgetDisabledState(WID_BV_RENAME, _networking && !_network_server);
-
- NWidgetCore *widget = this->GetWidget(WID_BV_LIST);
- widget->tool_tip = STR_BUY_VEHICLE_TRAIN_LIST_TOOLTIP + type;
-
- widget = this->GetWidget(WID_BV_BUILD);
- widget->widget_data = STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_BUTTON + type;
- widget->tool_tip = STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_TOOLTIP + type;
-
- widget = this->GetWidget(WID_BV_RENAME);
- widget->widget_data = STR_BUY_VEHICLE_TRAIN_RENAME_BUTTON + type;
- widget->tool_tip = STR_BUY_VEHICLE_TRAIN_RENAME_TOOLTIP + type;
-
- this->details_height = ((this->vehicle_type == VEH_TRAIN) ? 10 : 9) * FONT_HEIGHT_NORMAL + WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM;
-
- this->FinishInitNested(tile == INVALID_TILE ? (int)type : tile);
-
- this->owner = (tile != INVALID_TILE) ? GetTileOwner(tile) : _local_company;
-
- this->eng_list.ForceRebuild();
- this->GenerateBuildList(); // generate the list, since we need it in the next line
- /* Select the first engine in the list as default when opening the window */
- if (this->eng_list.Length() > 0) this->sel_engine = this->eng_list[0];
- }
-
- /** Populate the filter list and set the cargo filter criteria. */
- void SetCargoFilterArray()
- {
- uint filter_items = 0;
-
- /* Add item for disabling filtering. */
- this->cargo_filter[filter_items] = CF_ANY;
- this->cargo_filter_texts[filter_items] = STR_PURCHASE_INFO_ALL_TYPES;
- filter_items++;
-
- /* Add item for vehicles not carrying anything, e.g. train engines.
- * This could also be useful for eyecandy vehicles of other types, but is likely too confusing for joe, */
- if (this->vehicle_type == VEH_TRAIN) {
- this->cargo_filter[filter_items] = CF_NONE;
- this->cargo_filter_texts[filter_items] = STR_LAND_AREA_INFORMATION_LOCAL_AUTHORITY_NONE;
- filter_items++;
- }
-
- /* Collect available cargo types for filtering. */
- const CargoSpec *cs;
- FOR_ALL_SORTED_STANDARD_CARGOSPECS(cs) {
- this->cargo_filter[filter_items] = cs->Index();
- this->cargo_filter_texts[filter_items] = cs->name;
- filter_items++;
- }
-
- /* Terminate the filter list. */
- this->cargo_filter_texts[filter_items] = INVALID_STRING_ID;
-
- /* If not found, the cargo criteria will be set to all cargoes. */
- this->cargo_filter_criteria = 0;
-
- /* Find the last cargo filter criteria. */
- for (uint i = 0; i < filter_items; i++) {
- if (this->cargo_filter[i] == _last_filter_criteria[this->vehicle_type]) {
- this->cargo_filter_criteria = i;
- break;
- }
- }
-
- this->eng_list.SetFilterFuncs(_filter_funcs);
- this->eng_list.SetFilterState(this->cargo_filter[this->cargo_filter_criteria] != CF_ANY);
- }
-
- void OnInit()
- {
- this->SetCargoFilterArray();
- }
-
- /** Filter the engine list against the currently selected cargo filter */
- void FilterEngineList()
- {
- this->eng_list.Filter(this->cargo_filter[this->cargo_filter_criteria]);
- if (0 == this->eng_list.Length()) { // no engine passed through the filter, invalidate the previously selected engine
- this->sel_engine = INVALID_ENGINE;
- } else if (!this->eng_list.Contains(this->sel_engine)) { // previously selected engine didn't pass the filter, select the first engine of the list
- this->sel_engine = this->eng_list[0];
- }
- }
-
- /** Filter a single engine */
- bool FilterSingleEngine(EngineID eid)
- {
- CargoID filter_type = this->cargo_filter[this->cargo_filter_criteria];
- return (filter_type == CF_ANY || CargoFilter(&eid, filter_type));
- }
-
- /* Figure out what train EngineIDs to put in the list */
- void GenerateBuildTrainList()
- {
- EngineID sel_id = INVALID_ENGINE;
- int num_engines = 0;
- int num_wagons = 0;
-
- this->filter.railtype = (this->listview_mode) ? RAILTYPE_END : GetRailType(this->window_number);
-
- this->eng_list.Clear();
-
- /* Make list of all available train engines and wagons.
- * Also check to see if the previously selected engine is still available,
- * and if not, reset selection to INVALID_ENGINE. This could be the case
- * when engines become obsolete and are removed */
- const Engine *e;
- FOR_ALL_ENGINES_OF_TYPE(e, VEH_TRAIN) {
- EngineID eid = e->index;
- const RailVehicleInfo *rvi = &e->u.rail;
-
- if (this->filter.railtype != RAILTYPE_END && !HasPowerOnRail(rvi->railtype, this->filter.railtype)) continue;
- if (!IsEngineBuildable(eid, VEH_TRAIN, _local_company)) continue;
-
- /* Filter now! So num_engines and num_wagons is valid */
- if (!FilterSingleEngine(eid)) continue;
-
- *this->eng_list.Append() = eid;
-
- if (rvi->railveh_type != RAILVEH_WAGON) {
- num_engines++;
- } else {
- num_wagons++;
- }
-
- if (eid == this->sel_engine) sel_id = eid;
- }
-
- this->sel_engine = sel_id;
-
- /* make engines first, and then wagons, sorted by selected sort_criteria */
- _internal_sort_order = false;
- EngList_Sort(&this->eng_list, TrainEnginesThenWagonsSorter);
-
- /* and then sort engines */
- _internal_sort_order = this->descending_sort_order;
- EngList_SortPartial(&this->eng_list, _sorter[0][this->sort_criteria], 0, num_engines);
-
- /* and finally sort wagons */
- EngList_SortPartial(&this->eng_list, _sorter[0][this->sort_criteria], num_engines, num_wagons);
- }
-
- /* Figure out what road vehicle EngineIDs to put in the list */
- void GenerateBuildRoadVehList()
- {
- EngineID sel_id = INVALID_ENGINE;
-
- this->eng_list.Clear();
-
- const Engine *e;
- FOR_ALL_ENGINES_OF_TYPE(e, VEH_ROAD) {
- EngineID eid = e->index;
- if (!IsEngineBuildable(eid, VEH_ROAD, _local_company)) continue;
- if (!HasBit(this->filter.roadtypes, HasBit(EngInfo(eid)->misc_flags, EF_ROAD_TRAM) ? ROADTYPE_TRAM : ROADTYPE_ROAD)) continue;
- *this->eng_list.Append() = eid;
-
- if (eid == this->sel_engine) sel_id = eid;
- }
- this->sel_engine = sel_id;
- }
-
- /* Figure out what ship EngineIDs to put in the list */
- void GenerateBuildShipList()
- {
- EngineID sel_id = INVALID_ENGINE;
- this->eng_list.Clear();
-
- const Engine *e;
- FOR_ALL_ENGINES_OF_TYPE(e, VEH_SHIP) {
- EngineID eid = e->index;
- if (!IsEngineBuildable(eid, VEH_SHIP, _local_company)) continue;
- *this->eng_list.Append() = eid;
-
- if (eid == this->sel_engine) sel_id = eid;
- }
- this->sel_engine = sel_id;
- }
-
- /* Figure out what aircraft EngineIDs to put in the list */
- void GenerateBuildAircraftList()
- {
- EngineID sel_id = INVALID_ENGINE;
-
- this->eng_list.Clear();
-
- const Station *st = this->listview_mode ? NULL : Station::GetByTile(this->window_number);
-
- /* Make list of all available planes.
- * Also check to see if the previously selected plane is still available,
- * and if not, reset selection to INVALID_ENGINE. This could be the case
- * when planes become obsolete and are removed */
- const Engine *e;
- FOR_ALL_ENGINES_OF_TYPE(e, VEH_AIRCRAFT) {
- EngineID eid = e->index;
- if (!IsEngineBuildable(eid, VEH_AIRCRAFT, _local_company)) continue;
- /* First VEH_END window_numbers are fake to allow a window open for all different types at once */
- if (!this->listview_mode && !CanVehicleUseStation(eid, st)) continue;
-
- *this->eng_list.Append() = eid;
- if (eid == this->sel_engine) sel_id = eid;
- }
-
- this->sel_engine = sel_id;
- }
-
- /* Generate the list of vehicles */
- void GenerateBuildList()
- {
- if (!this->eng_list.NeedRebuild()) return;
- switch (this->vehicle_type) {
- default: NOT_REACHED();
- case VEH_TRAIN:
- this->GenerateBuildTrainList();
- this->eng_list.Compact();
- this->eng_list.RebuildDone();
- return; // trains should not reach the last sorting
- case VEH_ROAD:
- this->GenerateBuildRoadVehList();
- break;
- case VEH_SHIP:
- this->GenerateBuildShipList();
- break;
- case VEH_AIRCRAFT:
- this->GenerateBuildAircraftList();
- break;
- }
-
- this->FilterEngineList();
-
- _internal_sort_order = this->descending_sort_order;
- EngList_Sort(&this->eng_list, _sorter[this->vehicle_type][this->sort_criteria]);
-
- this->eng_list.Compact();
- this->eng_list.RebuildDone();
- }
-
- void OnClick(Point pt, int widget, int click_count)
- {
- switch (widget) {
- case WID_BV_SORT_ASSENDING_DESCENDING:
- this->descending_sort_order ^= true;
- _last_sort_order[this->vehicle_type] = this->descending_sort_order;
- this->eng_list.ForceRebuild();
- this->SetDirty();
- break;
-
- case WID_BV_LIST: {
- uint i = this->vscroll->GetScrolledRowFromWidget(pt.y, this, WID_BV_LIST);
- size_t num_items = this->eng_list.Length();
- this->sel_engine = (i < num_items) ? this->eng_list[i] : INVALID_ENGINE;
- this->SetDirty();
- if (click_count > 1 && !this->listview_mode) this->OnClick(pt, WID_BV_BUILD, 1);
- break;
- }
-
- case WID_BV_SORT_DROPDOWN: { // Select sorting criteria dropdown menu
- uint32 hidden_mask = 0;
- /* Disable sorting by power or tractive effort when the original acceleration model for road vehicles is being used. */
- if (this->vehicle_type == VEH_ROAD &&
- _settings_game.vehicle.roadveh_acceleration_model == AM_ORIGINAL) {
- SetBit(hidden_mask, 3); // power
- SetBit(hidden_mask, 4); // tractive effort
- SetBit(hidden_mask, 8); // power by running costs
- }
- /* Disable sorting by tractive effort when the original acceleration model for trains is being used. */
- if (this->vehicle_type == VEH_TRAIN &&
- _settings_game.vehicle.train_acceleration_model == AM_ORIGINAL) {
- SetBit(hidden_mask, 4); // tractive effort
- }
- ShowDropDownMenu(this, _sort_listing[this->vehicle_type], this->sort_criteria, WID_BV_SORT_DROPDOWN, 0, hidden_mask);
- break;
- }
-
- case WID_BV_CARGO_FILTER_DROPDOWN: // Select cargo filtering criteria dropdown menu
- ShowDropDownMenu(this, this->cargo_filter_texts, this->cargo_filter_criteria, WID_BV_CARGO_FILTER_DROPDOWN, 0, 0);
- break;
-
- case WID_BV_BUILD: {
- EngineID sel_eng = this->sel_engine;
- if (sel_eng != INVALID_ENGINE) {
- CommandCallback *callback = (this->vehicle_type == VEH_TRAIN && RailVehInfo(sel_eng)->railveh_type == RAILVEH_WAGON) ? CcBuildWagon : CcBuildPrimaryVehicle;
- DoCommandP(this->window_number, sel_eng, 0, GetCmdBuildVeh(this->vehicle_type), callback);
- }
- break;
- }
-
- case WID_BV_RENAME: {
- EngineID sel_eng = this->sel_engine;
- if (sel_eng != INVALID_ENGINE) {
- this->rename_engine = sel_eng;
- SetDParam(0, sel_eng);
- ShowQueryString(STR_ENGINE_NAME, STR_QUERY_RENAME_TRAIN_TYPE_CAPTION + this->vehicle_type, MAX_LENGTH_ENGINE_NAME_CHARS, this, CS_ALPHANUMERAL, QSF_ENABLE_DEFAULT | QSF_LEN_IN_CHARS);
- }
- break;
- }
- }
- }
-
- /**
- * Some data on this window has become invalid.
- * @param data Information about the changed data.
- * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
- */
- virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
- {
- if (!gui_scope) return;
- /* When switching to original acceleration model for road vehicles, clear the selected sort criteria if it is not available now. */
- if (this->vehicle_type == VEH_ROAD &&
- _settings_game.vehicle.roadveh_acceleration_model == AM_ORIGINAL &&
- this->sort_criteria > 7) {
- this->sort_criteria = 0;
- _last_sort_criteria[VEH_ROAD] = 0;
- }
- this->eng_list.ForceRebuild();
- }
-
- virtual void SetStringParameters(int widget) const
- {
- switch (widget) {
- case WID_BV_CAPTION:
- if (this->vehicle_type == VEH_TRAIN && !this->listview_mode) {
- const RailtypeInfo *rti = GetRailTypeInfo(this->filter.railtype);
- SetDParam(0, rti->strings.build_caption);
- } else {
- SetDParam(0, (this->listview_mode ? STR_VEHICLE_LIST_AVAILABLE_TRAINS : STR_BUY_VEHICLE_TRAIN_ALL_CAPTION) + this->vehicle_type);
- }
- break;
-
- case WID_BV_SORT_DROPDOWN:
- SetDParam(0, _sort_listing[this->vehicle_type][this->sort_criteria]);
- break;
-
- case WID_BV_CARGO_FILTER_DROPDOWN:
- SetDParam(0, this->cargo_filter_texts[this->cargo_filter_criteria]);
- }
- }
-
- virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
- {
- switch (widget) {
- case WID_BV_LIST:
- resize->height = GetEngineListHeight(this->vehicle_type);
- size->height = 3 * resize->height;
- break;
-
- case WID_BV_PANEL:
- size->height = this->details_height;
- break;
-
- case WID_BV_SORT_ASSENDING_DESCENDING: {
- Dimension d = GetStringBoundingBox(this->GetWidget(widget)->widget_data);
- d.width += padding.width + WD_SORTBUTTON_ARROW_WIDTH * 2; // Doubled since the string is centred and it also looks better.
- d.height += padding.height;
- *size = maxdim(*size, d);
- break;
- }
- }
- }
-
- virtual void DrawWidget(const Rect &r, int widget) const
- {
- switch (widget) {
- case WID_BV_LIST:
- DrawEngineList(this->vehicle_type, r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP, &this->eng_list, this->vscroll->GetPosition(), min(this->vscroll->GetPosition() + this->vscroll->GetCapacity(), this->eng_list.Length()), this->sel_engine, false, DEFAULT_GROUP);
- break;
-
- case WID_BV_SORT_ASSENDING_DESCENDING:
- this->DrawSortButtonState(WID_BV_SORT_ASSENDING_DESCENDING, this->descending_sort_order ? SBS_DOWN : SBS_UP);
- break;
- }
- }
-
- virtual void OnPaint()
- {
- this->GenerateBuildList();
- this->vscroll->SetCount(this->eng_list.Length());
-
- this->DrawWidgets();
-
- if (!this->IsShaded()) {
- int needed_height = this->details_height;
- /* Draw details panels. */
- if (this->sel_engine != INVALID_ENGINE) {
- NWidgetBase *nwi = this->GetWidget(WID_BV_PANEL);
- int text_end = DrawVehiclePurchaseInfo(nwi->pos_x + WD_FRAMETEXT_LEFT, nwi->pos_x + nwi->current_x - WD_FRAMETEXT_RIGHT,
- nwi->pos_y + WD_FRAMERECT_TOP, this->sel_engine);
- needed_height = max(needed_height, text_end - (int)nwi->pos_y + WD_FRAMERECT_BOTTOM);
- }
- if (needed_height != this->details_height) { // Details window are not high enough, enlarge them.
- int resize = needed_height - this->details_height;
- this->details_height = needed_height;
- this->ReInit(0, resize);
- return;
- }
- }
- }
-
- virtual void OnQueryTextFinished(char *str)
- {
- if (str == NULL) return;
-
- DoCommandP(0, this->rename_engine, 0, CMD_RENAME_ENGINE | CMD_MSG(STR_ERROR_CAN_T_RENAME_TRAIN_TYPE + this->vehicle_type), NULL, str);
- }
-
- virtual void OnDropdownSelect(int widget, int index)
- {
- switch (widget) {
- case WID_BV_SORT_DROPDOWN:
- if (this->sort_criteria != index) {
- this->sort_criteria = index;
- _last_sort_criteria[this->vehicle_type] = this->sort_criteria;
- this->eng_list.ForceRebuild();
- }
- break;
-
- case WID_BV_CARGO_FILTER_DROPDOWN: // Select a cargo filter criteria
- if (this->cargo_filter_criteria != index) {
- this->cargo_filter_criteria = index;
- _last_filter_criteria[this->vehicle_type] = this->cargo_filter[this->cargo_filter_criteria];
- /* deactivate filter if criteria is 'Show All', activate it otherwise */
- this->eng_list.SetFilterState(this->cargo_filter[this->cargo_filter_criteria] != CF_ANY);
- this->eng_list.ForceRebuild();
- }
- break;
- }
- this->SetDirty();
- }
-
- virtual void OnResize()
- {
- this->vscroll->SetCapacityFromWidget(this, WID_BV_LIST);
- }
-};
-
-static WindowDesc _build_vehicle_desc(
- WDP_AUTO, "build_vehicle", 240, 268,
- WC_BUILD_VEHICLE, WC_NONE,
- WDF_CONSTRUCTION,
- _nested_build_vehicle_widgets, lengthof(_nested_build_vehicle_widgets)
-);
-
-void ShowBuildVehicleWindow(TileIndex tile, VehicleType type)
-{
- /* We want to be able to open both Available Train as Available Ships,
- * so if tile == INVALID_TILE (Available XXX Window), use 'type' as unique number.
- * As it always is a low value, it won't collide with any real tile
- * number. */
- uint num = (tile == INVALID_TILE) ? (int)type : tile;
-
- assert(IsCompanyBuildableVehicleType(type));
-
- DeleteWindowById(WC_BUILD_VEHICLE, num);
-
- new BuildVehicleWindow(&_build_vehicle_desc, tile, type);
-}
diff --git a/src/error_gui.cpp.orig b/src/error_gui.cpp.orig
deleted file mode 100644
index 5e8f52432d..0000000000
--- a/src/error_gui.cpp.orig
+++ /dev/null
@@ -1,432 +0,0 @@
-/* $Id$ */
-
-/*
- * This file is part of OpenTTD.
- * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
- * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see .
- */
-
-/** @file error_gui.cpp GUI related to errors. */
-
-#include "stdafx.h"
-#include "landscape.h"
-#include "newgrf_text.h"
-#include "error.h"
-#include "viewport_func.h"
-#include "gfx_func.h"
-#include "string_func.h"
-#include "company_base.h"
-#include "company_manager_face.h"
-#include "strings_func.h"
-#include "zoom_func.h"
-#include "window_func.h"
-#include "console_func.h"
-#include "window_gui.h"
-
-#include "widgets/error_widget.h"
-
-#include "table/strings.h"
-#include
-
-static const NWidgetPart _nested_errmsg_widgets[] = {
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_CLOSEBOX, COLOUR_RED),
- NWidget(WWT_CAPTION, COLOUR_RED, WID_EM_CAPTION), SetDataTip(STR_ERROR_MESSAGE_CAPTION, STR_NULL),
- EndContainer(),
- NWidget(WWT_PANEL, COLOUR_RED),
- NWidget(WWT_EMPTY, COLOUR_RED, WID_EM_MESSAGE), SetPadding(0, 2, 0, 2), SetMinimalSize(236, 32),
- EndContainer(),
-};
-
-static WindowDesc _errmsg_desc(
- WDP_MANUAL, "error", 0, 0,
- WC_ERRMSG, WC_NONE,
- 0,
- _nested_errmsg_widgets, lengthof(_nested_errmsg_widgets)
-);
-
-static const NWidgetPart _nested_errmsg_face_widgets[] = {
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_CLOSEBOX, COLOUR_RED),
- NWidget(WWT_CAPTION, COLOUR_RED, WID_EM_CAPTION), SetDataTip(STR_ERROR_MESSAGE_CAPTION_OTHER_COMPANY, STR_NULL),
- EndContainer(),
- NWidget(WWT_PANEL, COLOUR_RED),
- NWidget(NWID_HORIZONTAL), SetPIP(2, 1, 2),
- NWidget(WWT_EMPTY, COLOUR_RED, WID_EM_FACE), SetMinimalSize(92, 119), SetFill(0, 1), SetPadding(2, 0, 1, 0),
- NWidget(WWT_EMPTY, COLOUR_RED, WID_EM_MESSAGE), SetFill(0, 1), SetMinimalSize(238, 123),
- EndContainer(),
- EndContainer(),
-};
-
-static WindowDesc _errmsg_face_desc(
- WDP_MANUAL, "error_face", 0, 0,
- WC_ERRMSG, WC_NONE,
- 0,
- _nested_errmsg_face_widgets, lengthof(_nested_errmsg_face_widgets)
-);
-
-/**
- * Copy the given data into our instance.
- * @param data The data to copy.
- */
-ErrorMessageData::ErrorMessageData(const ErrorMessageData &data)
-{
- *this = data;
- for (size_t i = 0; i < lengthof(this->strings); i++) {
- if (this->strings[i] != NULL) {
- this->strings[i] = strdup(this->strings[i]);
- this->decode_params[i] = (size_t)this->strings[i];
- }
- }
-}
-
-/** Free all the strings. */
-ErrorMessageData::~ErrorMessageData()
-{
- for (size_t i = 0; i < lengthof(this->strings); i++) free(this->strings[i]);
-}
-
-/**
- * Display an error message in a window.
- * @param summary_msg General error message showed in first line. Must be valid.
- * @param detailed_msg Detailed error message showed in second line. Can be INVALID_STRING_ID.
- * @param duration The amount of time to show this error message.
- * @param x World X position (TileVirtX) of the error location. Set both x and y to 0 to just center the message when there is no related error tile.
- * @param y World Y position (TileVirtY) of the error location. Set both x and y to 0 to just center the message when there is no related error tile.
- * @param textref_stack_grffile NewGRF that provides the #TextRefStack for the error message.
- * @param textref_stack_size Number of uint32 values to put on the #TextRefStack for the error message; 0 if the #TextRefStack shall not be used.
- * @param textref_stack Values to put on the #TextRefStack.
- */
-ErrorMessageData::ErrorMessageData(StringID summary_msg, StringID detailed_msg, uint duration, int x, int y, const GRFFile *textref_stack_grffile, uint textref_stack_size, const uint32 *textref_stack) :
- duration(duration),
- textref_stack_grffile(textref_stack_grffile),
- textref_stack_size(textref_stack_size),
- summary_msg(summary_msg),
- detailed_msg(detailed_msg),
- face(INVALID_COMPANY)
-{
- this->position.x = x;
- this->position.y = y;
-
- memset(this->decode_params, 0, sizeof(this->decode_params));
- memset(this->strings, 0, sizeof(this->strings));
-
- if (textref_stack_size > 0) MemCpyT(this->textref_stack, textref_stack, textref_stack_size);
-
- assert(summary_msg != INVALID_STRING_ID);
-}
-
-/**
- * Copy error parameters from current DParams.
- */
-void ErrorMessageData::CopyOutDParams()
-{
- /* Reset parameters */
- for (size_t i = 0; i < lengthof(this->strings); i++) free(this->strings[i]);
- memset(this->decode_params, 0, sizeof(this->decode_params));
- memset(this->strings, 0, sizeof(this->strings));
-
- /* Get parameters using type information */
- if (this->textref_stack_size > 0) StartTextRefStackUsage(this->textref_stack_grffile, this->textref_stack_size, this->textref_stack);
- CopyOutDParam(this->decode_params, this->strings, this->detailed_msg == INVALID_STRING_ID ? this->summary_msg : this->detailed_msg, lengthof(this->decode_params));
- if (this->textref_stack_size > 0) StopTextRefStackUsage();
-
- if (this->detailed_msg == STR_ERROR_OWNED_BY) {
- CompanyID company = (CompanyID)GetDParamX(this->decode_params, 2);
- if (company < MAX_COMPANIES) face = company;
- }
-}
-
-/**
- * Set a error string parameter.
- * @param n Parameter index
- * @param v Parameter value
- */
-void ErrorMessageData::SetDParam(uint n, uint64 v)
-{
- this->decode_params[n] = v;
-}
-
-/**
- * Set a rawstring parameter.
- * @param n Parameter index
- * @param str Raw string
- */
-void ErrorMessageData::SetDParamStr(uint n, const char *str)
-{
- free(this->strings[n]);
- this->strings[n] = strdup(str);
-}
-
-/** Define a queue with errors. */
-typedef std::list ErrorList;
-/** The actual queue with errors. */
-ErrorList _error_list;
-/** Whether the window system is initialized or not. */
-bool _window_system_initialized = false;
-
-/** Window class for displaying an error message window. */
-struct ErrmsgWindow : public Window, ErrorMessageData {
-private:
- uint height_summary; ///< Height of the #summary_msg string in pixels in the #WID_EM_MESSAGE widget.
- uint height_detailed; ///< Height of the #detailed_msg string in pixels in the #WID_EM_MESSAGE widget.
-
-public:
- ErrmsgWindow(const ErrorMessageData &data) : Window(data.HasFace() ? &_errmsg_face_desc : &_errmsg_desc), ErrorMessageData(data)
- {
- this->InitNested();
- }
-
- virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
- {
- if (widget != WID_EM_MESSAGE) return;
-
- CopyInDParam(0, this->decode_params, lengthof(this->decode_params));
- if (this->textref_stack_size > 0) StartTextRefStackUsage(this->textref_stack_grffile, this->textref_stack_size, this->textref_stack);
-
- int text_width = max(0, (int)size->width - WD_FRAMETEXT_LEFT - WD_FRAMETEXT_RIGHT);
- this->height_summary = GetStringHeight(this->summary_msg, text_width);
- this->height_detailed = (this->detailed_msg == INVALID_STRING_ID) ? 0 : GetStringHeight(this->detailed_msg, text_width);
-
- if (this->textref_stack_size > 0) StopTextRefStackUsage();
-
- uint panel_height = WD_FRAMERECT_TOP + this->height_summary + WD_FRAMERECT_BOTTOM;
- if (this->detailed_msg != INVALID_STRING_ID) panel_height += this->height_detailed + WD_PAR_VSEP_WIDE;
-
- size->height = max(size->height, panel_height);
- }
-
- virtual Point OnInitialPosition(int16 sm_width, int16 sm_height, int window_number)
- {
- /* Position (0, 0) given, center the window. */
- if (this->position.x == 0 && this->position.y == 0) {
- Point pt = {(_screen.width - sm_width) >> 1, (_screen.height - sm_height) >> 1};
- return pt;
- }
-
- /* Find the free screen space between the main toolbar at the top, and the statusbar at the bottom.
- * Add a fixed distance 20 to make it less cluttered.
- */
- int scr_top = GetMainViewTop() + 20;
- int scr_bot = GetMainViewBottom() - 20;
-
- Point pt = RemapCoords2(this->position.x, this->position.y);
- const ViewPort *vp = FindWindowById(WC_MAIN_WINDOW, 0)->viewport;
- if (this->face == INVALID_COMPANY) {
- /* move x pos to opposite corner */
- pt.x = UnScaleByZoom(pt.x - vp->virtual_left, vp->zoom) + vp->left;
- pt.x = (pt.x < (_screen.width >> 1)) ? _screen.width - sm_width - 20 : 20; // Stay 20 pixels away from the edge of the screen.
-
- /* move y pos to opposite corner */
- pt.y = UnScaleByZoom(pt.y - vp->virtual_top, vp->zoom) + vp->top;
- pt.y = (pt.y < (_screen.height >> 1)) ? scr_bot - sm_height : scr_top;
- } else {
- pt.x = Clamp(UnScaleByZoom(pt.x - vp->virtual_left, vp->zoom) + vp->left - (sm_width / 2), 0, _screen.width - sm_width);
- pt.y = Clamp(UnScaleByZoom(pt.y - vp->virtual_top, vp->zoom) + vp->top - (sm_height / 2), scr_top, scr_bot - sm_height);
- }
- return pt;
- }
-
- /**
- * Some data on this window has become invalid.
- * @param data Information about the changed data.
- * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
- */
- virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
- {
- /* If company gets shut down, while displaying an error about it, remove the error message. */
- if (this->face != INVALID_COMPANY && !Company::IsValidID(this->face)) delete this;
- }
-
- virtual void SetStringParameters(int widget) const
- {
- if (widget == WID_EM_CAPTION) CopyInDParam(0, this->decode_params, lengthof(this->decode_params));
- }
-
- virtual void DrawWidget(const Rect &r, int widget) const
- {
- switch (widget) {
- case WID_EM_FACE: {
- const Company *c = Company::Get(this->face);
- DrawCompanyManagerFace(c->face, c->colour, r.left, r.top);
- break;
- }
-
- case WID_EM_MESSAGE:
- CopyInDParam(0, this->decode_params, lengthof(this->decode_params));
- if (this->textref_stack_size > 0) StartTextRefStackUsage(this->textref_stack_grffile, this->textref_stack_size, this->textref_stack);
-
- if (this->detailed_msg == INVALID_STRING_ID) {
- DrawStringMultiLine(r.left + WD_FRAMETEXT_LEFT, r.right - WD_FRAMETEXT_RIGHT, r.top + WD_FRAMERECT_TOP, r.bottom - WD_FRAMERECT_BOTTOM,
- this->summary_msg, TC_FROMSTRING, SA_CENTER);
- } else {
- int extra = (r.bottom - r.top + 1 - this->height_summary - this->height_detailed - WD_PAR_VSEP_WIDE) / 2;
-
- /* Note: NewGRF supplied error message often do not start with a colour code, so default to white. */
- int top = r.top + WD_FRAMERECT_TOP;
- int bottom = top + this->height_summary + extra;
- DrawStringMultiLine(r.left + WD_FRAMETEXT_LEFT, r.right - WD_FRAMETEXT_RIGHT, top, bottom, this->summary_msg, TC_WHITE, SA_CENTER);
-
- bottom = r.bottom - WD_FRAMERECT_BOTTOM;
- top = bottom - this->height_detailed - extra;
- DrawStringMultiLine(r.left + WD_FRAMETEXT_LEFT, r.right - WD_FRAMETEXT_RIGHT, top, bottom, this->detailed_msg, TC_WHITE, SA_CENTER);
- }
-
- if (this->textref_stack_size > 0) StopTextRefStackUsage();
- break;
-
- default:
- break;
- }
- }
-
- virtual void OnMouseLoop()
- {
- /* Disallow closing the window too easily, if timeout is disabled */
- if (_right_button_down && this->duration != 0) delete this;
- }
-
- virtual void OnHundredthTick()
- {
- /* Timeout enabled? */
- if (this->duration != 0) {
- this->duration--;
- if (this->duration == 0) delete this;
- }
- }
-
- ~ErrmsgWindow()
- {
- SetRedErrorSquare(INVALID_TILE);
- if (_window_system_initialized) ShowFirstError();
- }
-
- virtual EventState OnKeyPress(WChar key, uint16 keycode)
- {
- if (keycode != WKC_SPACE) return ES_NOT_HANDLED;
- delete this;
- return ES_HANDLED;
- }
-
- /**
- * Check whether the currently shown error message was critical or not.
- * @return True iff the message was critical.
- */
- bool IsCritical()
- {
- return this->duration == 0;
- }
-};
-
-/**
- * Clear all errors from the queue.
- */
-void ClearErrorMessages()
-{
- UnshowCriticalError();
- _error_list.clear();
-}
-
-/** Show the first error of the queue. */
-void ShowFirstError()
-{
- _window_system_initialized = true;
- if (!_error_list.empty()) {
- new ErrmsgWindow(_error_list.front());
- _error_list.pop_front();
- }
-}
-
-/**
- * Unshow the critical error. This has to happen when a critical
- * error is shown and we uninitialise the window system, i.e.
- * remove all the windows.
- */
-void UnshowCriticalError()
-{
- ErrmsgWindow *w = (ErrmsgWindow*)FindWindowById(WC_ERRMSG, 0);
- if (_window_system_initialized && w != NULL) {
- if (w->IsCritical()) _error_list.push_front(*w);
- _window_system_initialized = false;
- delete w;
- }
-}
-
-/**
- * Display an error message in a window.
- * @param summary_msg General error message showed in first line. Must be valid.
- * @param detailed_msg Detailed error message showed in second line. Can be INVALID_STRING_ID.
- * @param wl Message severity.
- * @param x World X position (TileVirtX) of the error location. Set both x and y to 0 to just center the message when there is no related error tile.
- * @param y World Y position (TileVirtY) of the error location. Set both x and y to 0 to just center the message when there is no related error tile.
- * @param textref_stack_grffile NewGRF providing the #TextRefStack for the error message.
- * @param textref_stack_size Number of uint32 values to put on the #TextRefStack for the error message; 0 if the #TextRefStack shall not be used.
- * @param textref_stack Values to put on the #TextRefStack.
- */
-void ShowErrorMessage(StringID summary_msg, StringID detailed_msg, WarningLevel wl, int x, int y, const GRFFile *textref_stack_grffile, uint textref_stack_size, const uint32 *textref_stack)
-{
- assert(textref_stack_size == 0 || (textref_stack_grffile != NULL && textref_stack != NULL));
- if (summary_msg == STR_NULL) summary_msg = STR_EMPTY;
-
- if (wl != WL_INFO) {
- /* Print message to console */
- char buf[DRAW_STRING_BUFFER];
-
- if (textref_stack_size > 0) StartTextRefStackUsage(textref_stack_grffile, textref_stack_size, textref_stack);
-
- char *b = GetString(buf, summary_msg, lastof(buf));
- if (detailed_msg != INVALID_STRING_ID) {
- b += seprintf(b, lastof(buf), " ");
- GetString(b, detailed_msg, lastof(buf));
- }
-
- if (textref_stack_size > 0) StopTextRefStackUsage();
-
- switch (wl) {
- case WL_WARNING: IConsolePrint(CC_WARNING, buf); break;
- default: IConsoleError(buf); break;
- }
- }
-
- bool no_timeout = wl == WL_CRITICAL;
-
- if (_settings_client.gui.errmsg_duration == 0 && !no_timeout) return;
-
- ErrorMessageData data(summary_msg, detailed_msg, no_timeout ? 0 : _settings_client.gui.errmsg_duration, x, y, textref_stack_grffile, textref_stack_size, textref_stack);
- data.CopyOutDParams();
-
- ErrmsgWindow *w = (ErrmsgWindow*)FindWindowById(WC_ERRMSG, 0);
- if (w != NULL && w->IsCritical()) {
- /* A critical error is currently shown. */
- if (wl == WL_CRITICAL) {
- /* Push another critical error in the queue of errors,
- * but do not put other errors in the queue. */
- _error_list.push_back(data);
- }
- } else {
- /* Nothing or a non-critical error was shown. */
- delete w;
- new ErrmsgWindow(data);
- }
-}
-
-/**
- * Schedule a list of errors.
- * Note: This does not try to display the error now. This is useful if the window system is not yet running.
- * @param data Error message datas; cleared afterwards
- */
-void ScheduleErrorMessage(ErrorList &datas)
-{
- _error_list.splice(_error_list.end(), datas);
-}
-
-/**
- * Schedule an error.
- * Note: This does not try to display the error now. This is useful if the window system is not yet running.
- * @param data Error message data; cleared afterwards
- */
-void ScheduleErrorMessage(const ErrorMessageData &data)
-{
- _error_list.push_back(data);
-}
diff --git a/src/gfx.cpp.orig b/src/gfx.cpp.orig
deleted file mode 100644
index 01f29b9fb9..0000000000
--- a/src/gfx.cpp.orig
+++ /dev/null
@@ -1,1697 +0,0 @@
-/* $Id$ */
-
-/*
- * This file is part of OpenTTD.
- * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
- * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see .
- */
-
-/** @file gfx.cpp Handling of drawing text and other gfx related stuff. */
-
-#include "stdafx.h"
-#include "gfx_layout.h"
-#include "progress.h"
-#include "zoom_func.h"
-#include "blitter/factory.hpp"
-#include "video/video_driver.hpp"
-#include "strings_func.h"
-#include "settings_type.h"
-#include "network/network.h"
-#include "network/network_func.h"
-#include "window_func.h"
-#include "newgrf_debug.h"
-
-#include "table/palettes.h"
-#include "table/sprites.h"
-#include "table/control_codes.h"
-
-byte _dirkeys; ///< 1 = left, 2 = up, 4 = right, 8 = down
-bool _fullscreen;
-CursorVars _cursor;
-bool _ctrl_pressed; ///< Is Ctrl pressed?
-bool _shift_pressed; ///< Is Shift pressed?
-byte _fast_forward;
-bool _left_button_down; ///< Is left mouse button pressed?
-bool _left_button_clicked; ///< Is left mouse button clicked?
-bool _right_button_down; ///< Is right mouse button pressed?
-bool _right_button_clicked; ///< Is right mouse button clicked?
-DrawPixelInfo _screen;
-bool _screen_disable_anim = false; ///< Disable palette animation (important for 32bpp-anim blitter during giant screenshot)
-bool _exit_game;
-GameMode _game_mode;
-SwitchMode _switch_mode; ///< The next mainloop command.
-PauseModeByte _pause_mode;
-Palette _cur_palette;
-
-static byte _stringwidth_table[FS_END][224]; ///< Cache containing width of often used characters. @see GetCharacterWidth()
-DrawPixelInfo *_cur_dpi;
-byte _colour_gradient[COLOUR_END][8];
-
-static void GfxMainBlitterViewport(const Sprite *sprite, int x, int y, BlitterMode mode, const SubSprite *sub = NULL, SpriteID sprite_id = SPR_CURSOR_MOUSE);
-static void GfxMainBlitter(const Sprite *sprite, int x, int y, BlitterMode mode, const SubSprite *sub = NULL, SpriteID sprite_id = SPR_CURSOR_MOUSE, ZoomLevel zoom = ZOOM_LVL_NORMAL);
-
-static ReusableBuffer _cursor_backup;
-
-/**
- * The rect for repaint.
- *
- * This rectangle defines the area which should be repaint by the video driver.
- *
- * @ingroup dirty
- */
-static Rect _invalid_rect;
-static const byte *_colour_remap_ptr;
-static byte _string_colourremap[3]; ///< Recoloursprite for stringdrawing. The grf loader ensures that #ST_FONT sprites only use colours 0 to 2.
-
-static const uint DIRTY_BLOCK_HEIGHT = 8;
-static const uint DIRTY_BLOCK_WIDTH = 64;
-
-static uint _dirty_bytes_per_line = 0;
-static byte *_dirty_blocks = NULL;
-extern uint _dirty_block_colour;
-
-void GfxScroll(int left, int top, int width, int height, int xo, int yo)
-{
- Blitter *blitter = BlitterFactory::GetCurrentBlitter();
-
- if (xo == 0 && yo == 0) return;
-
- if (_cursor.visible) UndrawMouseCursor();
-
-#ifdef ENABLE_NETWORK
- if (_networking) NetworkUndrawChatMessage();
-#endif /* ENABLE_NETWORK */
-
- blitter->ScrollBuffer(_screen.dst_ptr, left, top, width, height, xo, yo);
- /* This part of the screen is now dirty. */
- _video_driver->MakeDirty(left, top, width, height);
-}
-
-
-/**
- * Applies a certain FillRectMode-operation to a rectangle [left, right] x [top, bottom] on the screen.
- *
- * @pre dpi->zoom == ZOOM_LVL_NORMAL, right >= left, bottom >= top
- * @param left Minimum X (inclusive)
- * @param top Minimum Y (inclusive)
- * @param right Maximum X (inclusive)
- * @param bottom Maximum Y (inclusive)
- * @param colour A 8 bit palette index (FILLRECT_OPAQUE and FILLRECT_CHECKER) or a recolour spritenumber (FILLRECT_RECOLOUR)
- * @param mode
- * FILLRECT_OPAQUE: Fill the rectangle with the specified colour
- * FILLRECT_CHECKER: Like FILLRECT_OPAQUE, but only draw every second pixel (used to grey out things)
- * FILLRECT_RECOLOUR: Apply a recolour sprite to every pixel in the rectangle currently on screen
- */
-void GfxFillRect(int left, int top, int right, int bottom, int colour, FillRectMode mode)
-{
- Blitter *blitter = BlitterFactory::GetCurrentBlitter();
- const DrawPixelInfo *dpi = _cur_dpi;
- void *dst;
- const int otop = top;
- const int oleft = left;
-
- if (dpi->zoom != ZOOM_LVL_NORMAL) return;
- if (left > right || top > bottom) return;
- if (right < dpi->left || left >= dpi->left + dpi->width) return;
- if (bottom < dpi->top || top >= dpi->top + dpi->height) return;
-
- if ( (left -= dpi->left) < 0) left = 0;
- right = right - dpi->left + 1;
- if (right > dpi->width) right = dpi->width;
- right -= left;
- assert(right > 0);
-
- if ( (top -= dpi->top) < 0) top = 0;
- bottom = bottom - dpi->top + 1;
- if (bottom > dpi->height) bottom = dpi->height;
- bottom -= top;
- assert(bottom > 0);
-
- dst = blitter->MoveTo(dpi->dst_ptr, left, top);
-
- switch (mode) {
- default: // FILLRECT_OPAQUE
- blitter->DrawRect(dst, right, bottom, (uint8)colour);
- break;
-
- case FILLRECT_RECOLOUR:
- blitter->DrawColourMappingRect(dst, right, bottom, GB(colour, 0, PALETTE_WIDTH));
- break;
-
- case FILLRECT_CHECKER: {
- byte bo = (oleft - left + dpi->left + otop - top + dpi->top) & 1;
- do {
- for (int i = (bo ^= 1); i < right; i += 2) blitter->SetPixel(dst, i, 0, (uint8)colour);
- dst = blitter->MoveTo(dst, 0, 1);
- } while (--bottom > 0);
- break;
- }
- }
-}
-
-/**
- * Check line clipping by using a linear equation and draw the visible part of
- * the line given by x/y and x2/y2.
- * @param video Destination pointer to draw into.
- * @param x X coordinate of first point.
- * @param y Y coordinate of first point.
- * @param x2 X coordinate of second point.
- * @param y2 Y coordinate of second point.
- * @param screen_width With of the screen to check clipping against.
- * @param screen_height Height of the screen to check clipping against.
- * @param colour Colour of the line.
- * @param width Width of the line.
- * @param dash Length of dashes for dashed lines. 0 means solid line.
- */
-static inline void GfxDoDrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 colour, int width, int dash = 0)
-{
- Blitter *blitter = BlitterFactory::GetCurrentBlitter();
-
- assert(width > 0);
-
- if (y2 == y) {
- /* Special case: horizontal line. */
- blitter->DrawLine(video,
- Clamp(x, 0, screen_width), y,
- Clamp(x2, 0, screen_width), y2,
- screen_width, screen_height, colour, width, dash);
- return;
- }
- if (x2 == x) {
- /* Special case: vertical line. */
- blitter->DrawLine(video,
- x, Clamp(y, 0, screen_height),
- x2, Clamp(y2, 0, screen_height),
- screen_width, screen_height, colour, width, dash);
- return;
- }
-
- int grade_y = y2 - y;
- int grade_x = x2 - x;
-
- /* prevent integer overflows. */
- int margin = 1;
- while (INT_MAX / abs(grade_y) < max(abs(x), abs(screen_width - x))) {
- grade_y /= 2;
- grade_x /= 2;
- margin *= 2; // account for rounding errors
- }
-
- /* If the line is outside the screen on the same side at X positions 0
- * and screen_width, we don't need to draw anything. */
- int offset_0 = y - x * grade_y / grade_x;
- int offset_width = y + (screen_width - x) * grade_y / grade_x;
- if ((offset_0 > screen_height + width / 2 + margin && offset_width > screen_height + width / 2 + margin) ||
- (offset_0 < -width / 2 - margin && offset_width < -width / 2 - margin)) {
- return;
- }
-
- /* It is possible to use the line equation to further reduce the amount of
- * work the blitter has to do by shortening the effective line segment.
- * However, in order to get that right and prevent the flickering effects
- * of rounding errors so much additional code has to be run here that in
- * the general case the effect is not noticable. */
-
- blitter->DrawLine(video, x, y, x2, y2, screen_width, screen_height, colour, width, dash);
-}
-
-/**
- * Align parameters of a line to the given DPI and check simple clipping.
- * @param dpi Screen parameters to align with.
- * @param x X coordinate of first point.
- * @param y Y coordinate of first point.
- * @param x2 X coordinate of second point.
- * @param y2 Y coordinate of second point.
- * @param width Width of the line.
- * @return True if the line is likely to be visible, false if it's certainly
- * invisible.
- */
-static inline bool GfxPreprocessLine(DrawPixelInfo *dpi, int &x, int &y, int &x2, int &y2, int width)
-{
- x -= dpi->left;
- x2 -= dpi->left;
- y -= dpi->top;
- y2 -= dpi->top;
-
- /* Check simple clipping */
- if (x + width / 2 < 0 && x2 + width / 2 < 0 ) return false;
- if (y + width / 2 < 0 && y2 + width / 2 < 0 ) return false;
- if (x - width / 2 > dpi->width && x2 - width / 2 > dpi->width ) return false;
- if (y - width / 2 > dpi->height && y2 - width / 2 > dpi->height) return false;
- return true;
-}
-
-void GfxDrawLine(int x, int y, int x2, int y2, int colour, int width, int dash)
-{
- DrawPixelInfo *dpi = _cur_dpi;
- if (GfxPreprocessLine(dpi, x, y, x2, y2, width)) {
- GfxDoDrawLine(dpi->dst_ptr, x, y, x2, y2, dpi->width, dpi->height, colour, width, dash);
- }
-}
-
-void GfxDrawLineUnscaled(int x, int y, int x2, int y2, int colour)
-{
- DrawPixelInfo *dpi = _cur_dpi;
- if (GfxPreprocessLine(dpi, x, y, x2, y2, 1)) {
- GfxDoDrawLine(dpi->dst_ptr,
- UnScaleByZoom(x, dpi->zoom), UnScaleByZoom(y, dpi->zoom),
- UnScaleByZoom(x2, dpi->zoom), UnScaleByZoom(y2, dpi->zoom),
- UnScaleByZoom(dpi->width, dpi->zoom), UnScaleByZoom(dpi->height, dpi->zoom), colour, 1);
- }
-}
-
-/**
- * Draws the projection of a parallelepiped.
- * This can be used to draw boxes in world coordinates.
- *
- * @param x Screen X-coordinate of top front corner.
- * @param y Screen Y-coordinate of top front corner.
- * @param dx1 Screen X-length of first edge.
- * @param dy1 Screen Y-length of first edge.
- * @param dx2 Screen X-length of second edge.
- * @param dy2 Screen Y-length of second edge.
- * @param dx3 Screen X-length of third edge.
- * @param dy3 Screen Y-length of third edge.
- */
-void DrawBox(int x, int y, int dx1, int dy1, int dx2, int dy2, int dx3, int dy3)
-{
- /* ....
- * .. ....
- * .. ....
- * .. ^
- * <--__(dx1,dy1) /(dx2,dy2)
- * : --__ / :
- * : --__ / :
- * : *(x,y) :
- * : | :
- * : | ..
- * .... |(dx3,dy3)
- * .... | ..
- * ....V.
- */
-
- static const byte colour = PC_WHITE;
-
- GfxDrawLineUnscaled(x, y, x + dx1, y + dy1, colour);
- GfxDrawLineUnscaled(x, y, x + dx2, y + dy2, colour);
- GfxDrawLineUnscaled(x, y, x + dx3, y + dy3, colour);
-
- GfxDrawLineUnscaled(x + dx1, y + dy1, x + dx1 + dx2, y + dy1 + dy2, colour);
- GfxDrawLineUnscaled(x + dx1, y + dy1, x + dx1 + dx3, y + dy1 + dy3, colour);
- GfxDrawLineUnscaled(x + dx2, y + dy2, x + dx2 + dx1, y + dy2 + dy1, colour);
- GfxDrawLineUnscaled(x + dx2, y + dy2, x + dx2 + dx3, y + dy2 + dy3, colour);
- GfxDrawLineUnscaled(x + dx3, y + dy3, x + dx3 + dx1, y + dy3 + dy1, colour);
- GfxDrawLineUnscaled(x + dx3, y + dy3, x + dx3 + dx2, y + dy3 + dy2, colour);
-}
-
-/**
- * Set the colour remap to be for the given colour.
- * @param colour the new colour of the remap.
- */
-static void SetColourRemap(TextColour colour)
-{
- if (colour == TC_INVALID) return;
-
- /* Black strings have no shading ever; the shading is black, so it
- * would be invisible at best, but it actually makes it illegible. */
- bool no_shade = (colour & TC_NO_SHADE) != 0 || colour == TC_BLACK;
- bool raw_colour = (colour & TC_IS_PALETTE_COLOUR) != 0;
- colour &= ~(TC_NO_SHADE | TC_IS_PALETTE_COLOUR);
-
- _string_colourremap[1] = raw_colour ? (byte)colour : _string_colourmap[colour];
- _string_colourremap[2] = no_shade ? 0 : 1;
- _colour_remap_ptr = _string_colourremap;
-}
-
-/**
- * Drawing routine for drawing a laid out line of text.
- * @param line String to draw.
- * @param y The top most position to draw on.
- * @param left The left most position to draw on.
- * @param right The right most position to draw on.
- * @param align The alignment of the string when drawing left-to-right. In the
- * case a right-to-left language is chosen this is inverted so it
- * will be drawn in the right direction.
- * @param underline Whether to underline what has been drawn or not.
- * @param truncation Whether to perform string truncation or not.
- *
- * @return In case of left or center alignment the right most pixel we have drawn to.
- * In case of right alignment the left most pixel we have drawn to.
- */
-static int DrawLayoutLine(const ParagraphLayouter::Line *line, int y, int left, int right, StringAlignment align, bool underline, bool truncation)
-{
- if (line->CountRuns() == 0) return 0;
-
- int w = line->GetWidth();
- int h = line->GetLeading();
-
- /*
- * The following is needed for truncation.
- * Depending on the text direction, we either remove bits at the rear
- * or the front. For this we shift the entire area to draw so it fits
- * within the left/right bounds and the side we do not truncate it on.
- * Then we determine the truncation location, i.e. glyphs that fall
- * outside of the range min_x - max_x will not be drawn; they are thus
- * the truncated glyphs.
- *
- * At a later step we insert the dots.
- */
-
- int max_w = right - left + 1; // The maximum width.
-
- int offset_x = 0; // The offset we need for positioning the glyphs
- int min_x = left; // The minimum x position to draw normal glyphs on.
- int max_x = right; // The maximum x position to draw normal glyphs on.
-
- truncation &= max_w < w; // Whether we need to do truncation.
- int dot_width = 0; // Cache for the width of the dot.
- const Sprite *dot_sprite = NULL; // Cache for the sprite of the dot.
-
- if (truncation) {
- /*
- * Assumption may be made that all fonts of a run are of the same size.
- * In any case, we'll use these dots for the abbreviation, so even if
- * another size would be chosen it won't have truncated too little for
- * the truncation dots.
- */
- FontCache *fc = ((const Font*)line->GetVisualRun(0)->GetFont())->fc;
- GlyphID dot_glyph = fc->MapCharToGlyph('.');
- dot_width = fc->GetGlyphWidth(dot_glyph);
- dot_sprite = fc->GetGlyph(dot_glyph);
-
- if (_current_text_dir == TD_RTL) {
- min_x += 3 * dot_width;
- offset_x = w - 3 * dot_width - max_w;
- } else {
- max_x -= 3 * dot_width;
- }
-
- w = max_w;
- }
-
- /* In case we have a RTL language we swap the alignment. */
- if (!(align & SA_FORCE) && _current_text_dir == TD_RTL && (align & SA_HOR_MASK) != SA_HOR_CENTER) align ^= SA_RIGHT;
-
- /* right is the right most position to draw on. In this case we want to do
- * calculations with the width of the string. In comparison right can be
- * seen as lastof(todraw) and width as lengthof(todraw). They differ by 1.
- * So most +1/-1 additions are to move from lengthof to 'indices'.
- */
- switch (align & SA_HOR_MASK) {
- case SA_LEFT:
- /* right + 1 = left + w */
- right = left + w - 1;
- break;
-
- case SA_HOR_CENTER:
- left = RoundDivSU(right + 1 + left - w, 2);
- /* right + 1 = left + w */
- right = left + w - 1;
- break;
-
- case SA_RIGHT:
- left = right + 1 - w;
- break;
-
- default:
- NOT_REACHED();
- }
-
- for (int run_index = 0; run_index < line->CountRuns(); run_index++) {
- const ParagraphLayouter::VisualRun *run = line->GetVisualRun(run_index);
- const Font *f = (const Font*)run->GetFont();
-
- FontCache *fc = f->fc;
- TextColour colour = f->colour;
- SetColourRemap(colour);
-
- DrawPixelInfo *dpi = _cur_dpi;
- int dpi_left = dpi->left;
- int dpi_right = dpi->left + dpi->width - 1;
-
- bool draw_shadow = fc->GetDrawGlyphShadow() && colour != TC_BLACK;
-
- for (int i = 0; i < run->GetGlyphCount(); i++) {
- GlyphID glyph = run->GetGlyphs()[i];
-
- /* Not a valid glyph (empty) */
- if (glyph == 0xFFFF) continue;
-
- int begin_x = (int)run->GetPositions()[i * 2] + left - offset_x;
- int end_x = (int)run->GetPositions()[i * 2 + 2] + left - offset_x - 1;
- int top = (int)run->GetPositions()[i * 2 + 1] + y;
-
- /* Truncated away. */
- if (truncation && (begin_x < min_x || end_x > max_x)) continue;
-
- const Sprite *sprite = fc->GetGlyph(glyph);
- /* Check clipping (the "+ 1" is for the shadow). */
- if (begin_x + sprite->x_offs > dpi_right || begin_x + sprite->x_offs + sprite->width /* - 1 + 1 */ < dpi_left) continue;
-
- if (draw_shadow && (glyph & SPRITE_GLYPH) == 0) {
- SetColourRemap(TC_BLACK);
- GfxMainBlitter(sprite, begin_x + 1, top + 1, BM_COLOUR_REMAP);
- SetColourRemap(colour);
- }
- GfxMainBlitter(sprite, begin_x, top, BM_COLOUR_REMAP);
- }
- }
-
- if (truncation) {
- int x = (_current_text_dir == TD_RTL) ? left : (right - 3 * dot_width);
- for (int i = 0; i < 3; i++, x += dot_width) {
- GfxMainBlitter(dot_sprite, x, y, BM_COLOUR_REMAP);
- }
- }
-
- if (underline) {
- GfxFillRect(left, y + h, right, y + h, _string_colourremap[1]);
- }
-
- return (align & SA_HOR_MASK) == SA_RIGHT ? left : right;
-}
-
-/**
- * Draw string, possibly truncated to make it fit in its allocated space
- *
- * @param left The left most position to draw on.
- * @param right The right most position to draw on.
- * @param top The top most position to draw on.
- * @param str String to draw.
- * @param colour Colour used for drawing the string, see DoDrawString() for details
- * @param align The alignment of the string when drawing left-to-right. In the
- * case a right-to-left language is chosen this is inverted so it
- * will be drawn in the right direction.
- * @param underline Whether to underline what has been drawn or not.
- * @param fontsize The size of the initial characters.
- * @return In case of left or center alignment the right most pixel we have drawn to.
- * In case of right alignment the left most pixel we have drawn to.
- */
-int DrawString(int left, int right, int top, const char *str, TextColour colour, StringAlignment align, bool underline, FontSize fontsize)
-{
- /* The string may contain control chars to change the font, just use the biggest font for clipping. */
- int max_height = max(max(FONT_HEIGHT_SMALL, FONT_HEIGHT_NORMAL), max(FONT_HEIGHT_LARGE, FONT_HEIGHT_MONO));
-
- /* Funny glyphs may extent outside the usual bounds, so relax the clipping somewhat. */
- int extra = max_height / 2;
-
- if (_cur_dpi->top + _cur_dpi->height + extra < top || _cur_dpi->top > top + max_height + extra ||
- _cur_dpi->left + _cur_dpi->width + extra < left || _cur_dpi->left > right + extra) {
- return 0;
- }
-
- Layouter layout(str, INT32_MAX, colour, fontsize);
- if (layout.Length() == 0) return 0;
-
- return DrawLayoutLine(*layout.Begin(), top, left, right, align, underline, true);
-}
-
-/**
- * Draw string, possibly truncated to make it fit in its allocated space
- *
- * @param left The left most position to draw on.
- * @param right The right most position to draw on.
- * @param top The top most position to draw on.
- * @param str String to draw.
- * @param colour Colour used for drawing the string, see DoDrawString() for details
- * @param align The alignment of the string when drawing left-to-right. In the
- * case a right-to-left language is chosen this is inverted so it
- * will be drawn in the right direction.
- * @param underline Whether to underline what has been drawn or not.
- * @param fontsize The size of the initial characters.
- * @return In case of left or center alignment the right most pixel we have drawn to.
- * In case of right alignment the left most pixel we have drawn to.
- */
-int DrawString(int left, int right, int top, StringID str, TextColour colour, StringAlignment align, bool underline, FontSize fontsize)
-{
- char buffer[DRAW_STRING_BUFFER];
- GetString(buffer, str, lastof(buffer));
- return DrawString(left, right, top, buffer, colour, align, underline, fontsize);
-}
-
-/**
- * Calculates height of string (in pixels). The string is changed to a multiline string if needed.
- * @param str string to check
- * @param maxw maximum string width
- * @return height of pixels of string when it is drawn
- */
-int GetStringHeight(const char *str, int maxw, FontSize fontsize)
-{
- Layouter layout(str, maxw, TC_FROMSTRING, fontsize);
- return layout.GetBounds().height;
-}
-
-/**
- * Calculates height of string (in pixels). The string is changed to a multiline string if needed.
- * @param str string to check
- * @param maxw maximum string width
- * @return height of pixels of string when it is drawn
- */
-int GetStringHeight(StringID str, int maxw)
-{
- char buffer[DRAW_STRING_BUFFER];
- GetString(buffer, str, lastof(buffer));
- return GetStringHeight(buffer, maxw);
-}
-
-/**
- * Calculates number of lines of string. The string is changed to a multiline string if needed.
- * @param str string to check
- * @param maxw maximum string width
- * @return number of lines of string when it is drawn
- */
-int GetStringLineCount(StringID str, int maxw)
-{
- char buffer[DRAW_STRING_BUFFER];
- GetString(buffer, str, lastof(buffer));
-
- Layouter layout(buffer, maxw);
- return layout.Length();
-}
-
-/**
- * Calculate string bounding box for multi-line strings.
- * @param str String to check.
- * @param suggestion Suggested bounding box.
- * @return Bounding box for the multi-line string, may be bigger than \a suggestion.
- */
-Dimension GetStringMultiLineBoundingBox(StringID str, const Dimension &suggestion)
-{
- Dimension box = {suggestion.width, GetStringHeight(str, suggestion.width)};
- return box;
-}
-
-/**
- * Calculate string bounding box for multi-line strings.
- * @param str String to check.
- * @param suggestion Suggested bounding box.
- * @return Bounding box for the multi-line string, may be bigger than \a suggestion.
- */
-Dimension GetStringMultiLineBoundingBox(const char *str, const Dimension &suggestion)
-{
- Dimension box = {suggestion.width, GetStringHeight(str, suggestion.width)};
- return box;
-}
-
-/**
- * Draw string, possibly over multiple lines.
- *
- * @param left The left most position to draw on.
- * @param right The right most position to draw on.
- * @param top The top most position to draw on.
- * @param bottom The bottom most position to draw on.
- * @param str String to draw.
- * @param colour Colour used for drawing the string, see DoDrawString() for details
- * @param align The horizontal and vertical alignment of the string.
- * @param underline Whether to underline all strings
- * @param fontsize The size of the initial characters.
- *
- * @return If \a align is #SA_BOTTOM, the top to where we have written, else the bottom to where we have written.
- */
-int DrawStringMultiLine(int left, int right, int top, int bottom, const char *str, TextColour colour, StringAlignment align, bool underline, FontSize fontsize)
-{
- int maxw = right - left + 1;
- int maxh = bottom - top + 1;
-
- /* It makes no sense to even try if it can't be drawn anyway, or
- * do we really want to support fonts of 0 or less pixels high? */
- if (maxh <= 0) return top;
-
- Layouter layout(str, maxw, colour, fontsize);
- int total_height = layout.GetBounds().height;
- int y;
- switch (align & SA_VERT_MASK) {
- case SA_TOP:
- y = top;
- break;
-
- case SA_VERT_CENTER:
- y = RoundDivSU(bottom + top - total_height, 2);
- break;
-
- case SA_BOTTOM:
- y = bottom - total_height;
- break;
-
- default: NOT_REACHED();
- }
-
- int last_line = top;
- int first_line = bottom;
-
- for (const ParagraphLayouter::Line **iter = layout.Begin(); iter != layout.End(); iter++) {
- const ParagraphLayouter::Line *line = *iter;
-
- int line_height = line->GetLeading();
- if (y >= top && y < bottom) {
- last_line = y + line_height;
- if (first_line > y) first_line = y;
-
- DrawLayoutLine(line, y, left, right, align, underline, false);
- }
- y += line_height;
- }
-
- return ((align & SA_VERT_MASK) == SA_BOTTOM) ? first_line : last_line;
-}
-
-/**
- * Draw string, possibly over multiple lines.
- *
- * @param left The left most position to draw on.
- * @param right The right most position to draw on.
- * @param top The top most position to draw on.
- * @param bottom The bottom most position to draw on.
- * @param str String to draw.
- * @param colour Colour used for drawing the string, see DoDrawString() for details
- * @param align The horizontal and vertical alignment of the string.
- * @param underline Whether to underline all strings
- * @param fontsize The size of the initial characters.
- *
- * @return If \a align is #SA_BOTTOM, the top to where we have written, else the bottom to where we have written.
- */
-int DrawStringMultiLine(int left, int right, int top, int bottom, StringID str, TextColour colour, StringAlignment align, bool underline, FontSize fontsize)
-{
- char buffer[DRAW_STRING_BUFFER];
- GetString(buffer, str, lastof(buffer));
- return DrawStringMultiLine(left, right, top, bottom, buffer, colour, align, underline, fontsize);
-}
-
-/**
- * Return the string dimension in pixels. The height and width are returned
- * in a single Dimension value. TINYFONT, BIGFONT modifiers are only
- * supported as the first character of the string. The returned dimensions
- * are therefore a rough estimation correct for all the current strings
- * but not every possible combination
- * @param str string to calculate pixel-width
- * @param start_fontsize Fontsize to start the text with
- * @return string width and height in pixels
- */
-Dimension GetStringBoundingBox(const char *str, FontSize start_fontsize)
-{
- Layouter layout(str, INT32_MAX, TC_FROMSTRING, start_fontsize);
- return layout.GetBounds();
-}
-
-/**
- * Get bounding box of a string. Uses parameters set by #DParam if needed.
- * Has the same restrictions as #GetStringBoundingBox(const char *str).
- * @param strid String to examine.
- * @return Width and height of the bounding box for the string in pixels.
- */
-Dimension GetStringBoundingBox(StringID strid)
-{
- char buffer[DRAW_STRING_BUFFER];
-
- GetString(buffer, strid, lastof(buffer));
- return GetStringBoundingBox(buffer);
-}
-
-/**
- * Get the leading corner of a character in a single-line string relative
- * to the start of the string.
- * @param str String containing the character.
- * @param ch Pointer to the character in the string.
- * @param start_fontsize Font size to start the text with.
- * @return Upper left corner of the glyph associated with the character.
- */
-Point GetCharPosInString(const char *str, const char *ch, FontSize start_fontsize)
-{
- Layouter layout(str, INT32_MAX, TC_FROMSTRING, start_fontsize);
- return layout.GetCharPosition(ch);
-}
-
-/**
- * Get the character from a string that is drawn at a specific position.
- * @param str String to test.
- * @param x Position relative to the start of the string.
- * @param start_fontsize Font size to start the text with.
- * @return Pointer to the character at the position or NULL if there is no character at the position.
- */
-const char *GetCharAtPosition(const char *str, int x, FontSize start_fontsize)
-{
- if (x < 0) return NULL;
-
- Layouter layout(str, INT32_MAX, TC_FROMSTRING, start_fontsize);
- return layout.GetCharAtPosition(x);
-}
-
-/**
- * Draw single character horizontally centered around (x,y)
- * @param c Character (glyph) to draw
- * @param x X position to draw character
- * @param y Y position to draw character
- * @param colour Colour to use, see DoDrawString() for details
- */
-void DrawCharCentered(WChar c, int x, int y, TextColour colour)
-{
- SetColourRemap(colour);
- GfxMainBlitter(GetGlyph(FS_NORMAL, c), x - GetCharacterWidth(FS_NORMAL, c) / 2, y, BM_COLOUR_REMAP);
-}
-
-/**
- * Get the size of a sprite.
- * @param sprid Sprite to examine.
- * @param [out] offset Optionally returns the sprite position offset.
- * @return Sprite size in pixels.
- * @note The size assumes (0, 0) as top-left coordinate and ignores any part of the sprite drawn at the left or above that position.
- */
-Dimension GetSpriteSize(SpriteID sprid, Point *offset, ZoomLevel zoom)
-{
- const Sprite *sprite = GetSprite(sprid, ST_NORMAL);
-
- if (offset != NULL) {
- offset->x = UnScaleByZoom(sprite->x_offs, zoom);
- offset->y = UnScaleByZoom(sprite->y_offs, zoom);
- }
-
- Dimension d;
- d.width = max(0, UnScaleByZoom(sprite->x_offs + sprite->width, zoom));
- d.height = max(0, UnScaleByZoom(sprite->y_offs + sprite->height, zoom));
- return d;
-}
-
-/**
- * Draw a sprite in a viewport.
- * @param img Image number to draw
- * @param pal Palette to use.
- * @param x Left coordinate of image in viewport, scaled by zoom
- * @param y Top coordinate of image in viewport, scaled by zoom
- * @param sub If available, draw only specified part of the sprite
- */
-void DrawSpriteViewport(SpriteID img, PaletteID pal, int x, int y, const SubSprite *sub)
-{
- SpriteID real_sprite = GB(img, 0, SPRITE_WIDTH);
- if (HasBit(img, PALETTE_MODIFIER_TRANSPARENT)) {
- _colour_remap_ptr = GetNonSprite(GB(pal, 0, PALETTE_WIDTH), ST_RECOLOUR) + 1;
- GfxMainBlitterViewport(GetSprite(real_sprite, ST_NORMAL), x, y, BM_TRANSPARENT, sub, real_sprite);
- } else if (pal != PAL_NONE) {
- _colour_remap_ptr = GetNonSprite(GB(pal, 0, PALETTE_WIDTH), ST_RECOLOUR) + 1;
- GfxMainBlitterViewport(GetSprite(real_sprite, ST_NORMAL), x, y, BM_COLOUR_REMAP, sub, real_sprite);
- } else {
- GfxMainBlitterViewport(GetSprite(real_sprite, ST_NORMAL), x, y, BM_NORMAL, sub, real_sprite);
- }
-}
-
-/**
- * Draw a sprite, not in a viewport
- * @param img Image number to draw
- * @param pal Palette to use.
- * @param x Left coordinate of image in pixels
- * @param y Top coordinate of image in pixels
- * @param sub If available, draw only specified part of the sprite
- * @param zoom Zoom level of sprite
- */
-void DrawSprite(SpriteID img, PaletteID pal, int x, int y, const SubSprite *sub, ZoomLevel zoom)
-{
- SpriteID real_sprite = GB(img, 0, SPRITE_WIDTH);
- if (HasBit(img, PALETTE_MODIFIER_TRANSPARENT)) {
- _colour_remap_ptr = GetNonSprite(GB(pal, 0, PALETTE_WIDTH), ST_RECOLOUR) + 1;
- GfxMainBlitter(GetSprite(real_sprite, ST_NORMAL), x, y, BM_TRANSPARENT, sub, real_sprite, zoom);
- } else if (pal != PAL_NONE) {
- _colour_remap_ptr = GetNonSprite(GB(pal, 0, PALETTE_WIDTH), ST_RECOLOUR) + 1;
- GfxMainBlitter(GetSprite(real_sprite, ST_NORMAL), x, y, BM_COLOUR_REMAP, sub, real_sprite, zoom);
- } else {
- GfxMainBlitter(GetSprite(real_sprite, ST_NORMAL), x, y, BM_NORMAL, sub, real_sprite, zoom);
- }
-}
-
-/**
- * The code for setting up the blitter mode and sprite information before finally drawing the sprite.
- * @param sprite The sprite to draw.
- * @param x The X location to draw.
- * @param y The Y location to draw.
- * @param mode The settings for the blitter to pass.
- * @param sub Whether to only draw a sub set of the sprite.
- * @param zoom The zoom level at which to draw the sprites.
- * @tparam ZOOM_BASE The factor required to get the sub sprite information into the right size.
- * @tparam SCALED_XY Whether the X and Y are scaled or unscaled.
- */
-template
-static void GfxBlitter(const Sprite * const sprite, int x, int y, BlitterMode mode, const SubSprite * const sub, SpriteID sprite_id, ZoomLevel zoom)
-{
- const DrawPixelInfo *dpi = _cur_dpi;
- Blitter::BlitterParams bp;
-
- if (SCALED_XY) {
- /* Scale it */
- x = ScaleByZoom(x, zoom);
- y = ScaleByZoom(y, zoom);
- }
-
- /* Move to the correct offset */
- x += sprite->x_offs;
- y += sprite->y_offs;
-
- if (sub == NULL) {
- /* No clipping. */
- bp.skip_left = 0;
- bp.skip_top = 0;
- bp.width = UnScaleByZoom(sprite->width, zoom);
- bp.height = UnScaleByZoom(sprite->height, zoom);
- } else {
- /* Amount of pixels to clip from the source sprite */
- int clip_left = max(0, -sprite->x_offs + sub->left * ZOOM_BASE );
- int clip_top = max(0, -sprite->y_offs + sub->top * ZOOM_BASE );
- int clip_right = max(0, sprite->width - (-sprite->x_offs + (sub->right + 1) * ZOOM_BASE));
- int clip_bottom = max(0, sprite->height - (-sprite->y_offs + (sub->bottom + 1) * ZOOM_BASE));
-
- if (clip_left + clip_right >= sprite->width) return;
- if (clip_top + clip_bottom >= sprite->height) return;
-
- bp.skip_left = UnScaleByZoomLower(clip_left, zoom);
- bp.skip_top = UnScaleByZoomLower(clip_top, zoom);
- bp.width = UnScaleByZoom(sprite->width - clip_left - clip_right, zoom);
- bp.height = UnScaleByZoom(sprite->height - clip_top - clip_bottom, zoom);
-
- x += ScaleByZoom(bp.skip_left, zoom);
- y += ScaleByZoom(bp.skip_top, zoom);
- }
-
- /* Copy the main data directly from the sprite */
- bp.sprite = sprite->data;
- bp.sprite_width = sprite->width;
- bp.sprite_height = sprite->height;
- bp.top = 0;
- bp.left = 0;
-
- bp.dst = dpi->dst_ptr;
- bp.pitch = dpi->pitch;
- bp.remap = _colour_remap_ptr;
-
- assert(sprite->width > 0);
- assert(sprite->height > 0);
-
- if (bp.width <= 0) return;
- if (bp.height <= 0) return;
-
- y -= SCALED_XY ? ScaleByZoom(dpi->top, zoom) : dpi->top;
- int y_unscaled = UnScaleByZoom(y, zoom);
- /* Check for top overflow */
- if (y < 0) {
- bp.height -= -y_unscaled;
- if (bp.height <= 0) return;
- bp.skip_top += -y_unscaled;
- y = 0;
- } else {
- bp.top = y_unscaled;
- }
-
- /* Check for bottom overflow */
- y += SCALED_XY ? ScaleByZoom(bp.height - dpi->height, zoom) : ScaleByZoom(bp.height, zoom) - dpi->height;
- if (y > 0) {
- bp.height -= UnScaleByZoom(y, zoom);
- if (bp.height <= 0) return;
- }
-
- x -= SCALED_XY ? ScaleByZoom(dpi->left, zoom) : dpi->left;
- int x_unscaled = UnScaleByZoom(x, zoom);
- /* Check for left overflow */
- if (x < 0) {
- bp.width -= -x_unscaled;
- if (bp.width <= 0) return;
- bp.skip_left += -x_unscaled;
- x = 0;
- } else {
- bp.left = x_unscaled;
- }
-
- /* Check for right overflow */
- x += SCALED_XY ? ScaleByZoom(bp.width - dpi->width, zoom) : ScaleByZoom(bp.width, zoom) - dpi->width;
- if (x > 0) {
- bp.width -= UnScaleByZoom(x, zoom);
- if (bp.width <= 0) return;
- }
-
- assert(bp.skip_left + bp.width <= UnScaleByZoom(sprite->width, zoom));
- assert(bp.skip_top + bp.height <= UnScaleByZoom(sprite->height, zoom));
-
- /* We do not want to catch the mouse. However we also use that spritenumber for unknown (text) sprites. */
- if (_newgrf_debug_sprite_picker.mode == SPM_REDRAW && sprite_id != SPR_CURSOR_MOUSE) {
- Blitter *blitter = BlitterFactory::GetCurrentBlitter();
- void *topleft = blitter->MoveTo(bp.dst, bp.left, bp.top);
- void *bottomright = blitter->MoveTo(topleft, bp.width - 1, bp.height - 1);
-
- void *clicked = _newgrf_debug_sprite_picker.clicked_pixel;
-
- if (topleft <= clicked && clicked <= bottomright) {
- uint offset = (((size_t)clicked - (size_t)topleft) / (blitter->GetScreenDepth() / 8)) % bp.pitch;
- if (offset < (uint)bp.width) {
- _newgrf_debug_sprite_picker.sprites.Include(sprite_id);
- }
- }
- }
-
- BlitterFactory::GetCurrentBlitter()->Draw(&bp, mode, zoom);
-}
-
-static void GfxMainBlitterViewport(const Sprite *sprite, int x, int y, BlitterMode mode, const SubSprite *sub, SpriteID sprite_id)
-{
- GfxBlitter(sprite, x, y, mode, sub, sprite_id, _cur_dpi->zoom);
-}
-
-static void GfxMainBlitter(const Sprite *sprite, int x, int y, BlitterMode mode, const SubSprite *sub, SpriteID sprite_id, ZoomLevel zoom)
-{
- GfxBlitter<1, true>(sprite, x, y, mode, sub, sprite_id, zoom);
-}
-
-void DoPaletteAnimations();
-
-void GfxInitPalettes()
-{
- memcpy(&_cur_palette, &_palette, sizeof(_cur_palette));
- DoPaletteAnimations();
-}
-
-#define EXTR(p, q) (((uint16)(palette_animation_counter * (p)) * (q)) >> 16)
-#define EXTR2(p, q) (((uint16)(~palette_animation_counter * (p)) * (q)) >> 16)
-
-void DoPaletteAnimations()
-{
- /* Animation counter for the palette animation. */
- static int palette_animation_counter = 0;
- palette_animation_counter += 8;
-
- Blitter *blitter = BlitterFactory::GetCurrentBlitter();
- const Colour *s;
- const ExtraPaletteValues *ev = &_extra_palette_values;
- Colour old_val[PALETTE_ANIM_SIZE];
- const uint old_tc = palette_animation_counter;
- uint i;
- uint j;
-
- if (blitter != NULL && blitter->UsePaletteAnimation() == Blitter::PALETTE_ANIMATION_NONE) {
- palette_animation_counter = 0;
- }
-
- Colour *palette_pos = &_cur_palette.palette[PALETTE_ANIM_START]; // Points to where animations are taking place on the palette
- /* Makes a copy of the current animation palette in old_val,
- * so the work on the current palette could be compared, see if there has been any changes */
- memcpy(old_val, palette_pos, sizeof(old_val));
-
- /* Fizzy Drink bubbles animation */
- s = ev->fizzy_drink;
- j = EXTR2(512, EPV_CYCLES_FIZZY_DRINK);
- for (i = 0; i != EPV_CYCLES_FIZZY_DRINK; i++) {
- *palette_pos++ = s[j];
- j++;
- if (j == EPV_CYCLES_FIZZY_DRINK) j = 0;
- }
-
- /* Oil refinery fire animation */
- s = ev->oil_refinery;
- j = EXTR2(512, EPV_CYCLES_OIL_REFINERY);
- for (i = 0; i != EPV_CYCLES_OIL_REFINERY; i++) {
- *palette_pos++ = s[j];
- j++;
- if (j == EPV_CYCLES_OIL_REFINERY) j = 0;
- }
-
- /* Radio tower blinking */
- {
- byte i = (palette_animation_counter >> 1) & 0x7F;
- byte v;
-
- if (i < 0x3f) {
- v = 255;
- } else if (i < 0x4A || i >= 0x75) {
- v = 128;
- } else {
- v = 20;
- }
- palette_pos->r = v;
- palette_pos->g = 0;
- palette_pos->b = 0;
- palette_pos++;
-
- i ^= 0x40;
- if (i < 0x3f) {
- v = 255;
- } else if (i < 0x4A || i >= 0x75) {
- v = 128;
- } else {
- v = 20;
- }
- palette_pos->r = v;
- palette_pos->g = 0;
- palette_pos->b = 0;
- palette_pos++;
- }
-
- /* Handle lighthouse and stadium animation */
- s = ev->lighthouse;
- j = EXTR(256, EPV_CYCLES_LIGHTHOUSE);
- for (i = 0; i != EPV_CYCLES_LIGHTHOUSE; i++) {
- *palette_pos++ = s[j];
- j++;
- if (j == EPV_CYCLES_LIGHTHOUSE) j = 0;
- }
-
- /* Dark blue water */
- s = (_settings_game.game_creation.landscape == LT_TOYLAND) ? ev->dark_water_toyland : ev->dark_water;
- j = EXTR(320, EPV_CYCLES_DARK_WATER);
- for (i = 0; i != EPV_CYCLES_DARK_WATER; i++) {
- *palette_pos++ = s[j];
- j++;
- if (j == EPV_CYCLES_DARK_WATER) j = 0;
- }
-
- /* Glittery water */
- s = (_settings_game.game_creation.landscape == LT_TOYLAND) ? ev->glitter_water_toyland : ev->glitter_water;
- j = EXTR(128, EPV_CYCLES_GLITTER_WATER);
- for (i = 0; i != EPV_CYCLES_GLITTER_WATER / 3; i++) {
- *palette_pos++ = s[j];
- j += 3;
- if (j >= EPV_CYCLES_GLITTER_WATER) j -= EPV_CYCLES_GLITTER_WATER;
- }
-
- if (blitter != NULL && blitter->UsePaletteAnimation() == Blitter::PALETTE_ANIMATION_NONE) {
- palette_animation_counter = old_tc;
- } else {
- if (memcmp(old_val, &_cur_palette.palette[PALETTE_ANIM_START], sizeof(old_val)) != 0 && _cur_palette.count_dirty == 0) {
- /* Did we changed anything on the palette? Seems so. Mark it as dirty */
- _cur_palette.first_dirty = PALETTE_ANIM_START;
- _cur_palette.count_dirty = PALETTE_ANIM_SIZE;
- }
- }
-}
-
-/**
- * Determine a contrasty text colour for a coloured background.
- * @param background Background colour.
- * @return TC_BLACK or TC_WHITE depending on what gives a better contrast.
- */
-TextColour GetContrastColour(uint8 background)
-{
- Colour c = _cur_palette.palette[background];
- /* Compute brightness according to http://www.w3.org/TR/AERT#color-contrast.
- * The following formula computes 1000 * brightness^2, with brightness being in range 0 to 255. */
- uint sq1000_brightness = c.r * c.r * 299 + c.g * c.g * 587 + c.b * c.b * 114;
- /* Compare with threshold brightness 128 (50%) */
- return sq1000_brightness < 128 * 128 * 1000 ? TC_WHITE : TC_BLACK;
-}
-
-/**
- * Initialize _stringwidth_table cache
- * @param monospace Whether to load the monospace cache or the normal fonts.
- */
-void LoadStringWidthTable(bool monospace)
-{
- for (FontSize fs = monospace ? FS_MONO : FS_BEGIN; fs < (monospace ? FS_END : FS_MONO); fs++) {
- for (uint i = 0; i != 224; i++) {
- _stringwidth_table[fs][i] = GetGlyphWidth(fs, i + 32);
- }
- }
-
- ReInitAllWindows();
-}
-
-/**
- * Return width of character glyph.
- * @param size Font of the character
- * @param key Character code glyph
- * @return Width of the character glyph
- */
-byte GetCharacterWidth(FontSize size, WChar key)
-{
- /* Use _stringwidth_table cache if possible */
- if (key >= 32 && key < 256) return _stringwidth_table[size][key - 32];
-
- return GetGlyphWidth(size, key);
-}
-
-/**
- * Return the maximum width of single digit.
- * @param size Font of the digit
- * @return Width of the digit.
- */
-byte GetDigitWidth(FontSize size)
-{
- byte width = 0;
- for (char c = '0'; c <= '9'; c++) {
- width = max(GetCharacterWidth(size, c), width);
- }
- return width;
-}
-
-/**
- * Determine the broadest digits for guessing the maximum width of a n-digit number.
- * @param [out] front Broadest digit, which is not 0. (Use this digit as first digit for numbers with more than one digit.)
- * @param [out] next Broadest digit, including 0. (Use this digit for all digits, except the first one; or for numbers with only one digit.)
- * @param size Font of the digit
- */
-void GetBroadestDigit(uint *front, uint *next, FontSize size)
-{
- int width = -1;
- for (char c = '9'; c >= '0'; c--) {
- int w = GetCharacterWidth(size, c);
- if (w > width) {
- width = w;
- *next = c - '0';
- if (c != '0') *front = c - '0';
- }
- }
-}
-
-void ScreenSizeChanged()
-{
- _dirty_bytes_per_line = CeilDiv(_screen.width, DIRTY_BLOCK_WIDTH);
- _dirty_blocks = ReallocT(_dirty_blocks, _dirty_bytes_per_line * CeilDiv(_screen.height, DIRTY_BLOCK_HEIGHT));
-
- /* check the dirty rect */
- if (_invalid_rect.right >= _screen.width) _invalid_rect.right = _screen.width;
- if (_invalid_rect.bottom >= _screen.height) _invalid_rect.bottom = _screen.height;
-
- /* screen size changed and the old bitmap is invalid now, so we don't want to undraw it */
- _cursor.visible = false;
-
- CheckWindowMinSizings();
-}
-
-void UndrawMouseCursor()
-{
- /* Don't undraw the mouse cursor if the screen is not ready */
- if (_screen.dst_ptr == NULL) return;
-
- if (_cursor.visible) {
- Blitter *blitter = BlitterFactory::GetCurrentBlitter();
- _cursor.visible = false;
- blitter->CopyFromBuffer(blitter->MoveTo(_screen.dst_ptr, _cursor.draw_pos.x, _cursor.draw_pos.y), _cursor_backup.GetBuffer(), _cursor.draw_size.x, _cursor.draw_size.y);
- _video_driver->MakeDirty(_cursor.draw_pos.x, _cursor.draw_pos.y, _cursor.draw_size.x, _cursor.draw_size.y);
- }
-}
-
-void DrawMouseCursor()
-{
-#if defined(WINCE)
- /* Don't ever draw the mouse for WinCE, as we work with a stylus */
- return;
-#endif
-
- /* Don't draw the mouse cursor if the screen is not ready */
- if (_screen.dst_ptr == NULL) return;
-
- Blitter *blitter = BlitterFactory::GetCurrentBlitter();
- int x;
- int y;
- int w;
- int h;
-
- /* Redraw mouse cursor but only when it's inside the window */
- if (!_cursor.in_window) return;
-
- /* Don't draw the mouse cursor if it's already drawn */
- if (_cursor.visible) {
- if (!_cursor.dirty) return;
- UndrawMouseCursor();
- }
-
- w = _cursor.size.x;
- x = _cursor.pos.x + _cursor.offs.x + _cursor.short_vehicle_offset;
- if (x < 0) {
- w += x;
- x = 0;
- }
- if (w > _screen.width - x) w = _screen.width - x;
- if (w <= 0) return;
- _cursor.draw_pos.x = x;
- _cursor.draw_size.x = w;
-
- h = _cursor.size.y;
- y = _cursor.pos.y + _cursor.offs.y;
- if (y < 0) {
- h += y;
- y = 0;
- }
- if (h > _screen.height - y) h = _screen.height - y;
- if (h <= 0) return;
- _cursor.draw_pos.y = y;
- _cursor.draw_size.y = h;
-
- uint8 *buffer = _cursor_backup.Allocate(blitter->BufferSize(w, h));
-
- /* Make backup of stuff below cursor */
- blitter->CopyToBuffer(blitter->MoveTo(_screen.dst_ptr, _cursor.draw_pos.x, _cursor.draw_pos.y), buffer, _cursor.draw_size.x, _cursor.draw_size.y);
-
- /* Draw cursor on screen */
- _cur_dpi = &_screen;
- DrawSprite(_cursor.sprite, _cursor.pal, _cursor.pos.x + _cursor.short_vehicle_offset, _cursor.pos.y);
-
- _video_driver->MakeDirty(_cursor.draw_pos.x, _cursor.draw_pos.y, _cursor.draw_size.x, _cursor.draw_size.y);
-
- _cursor.visible = true;
- _cursor.dirty = false;
-}
-
-void RedrawScreenRect(int left, int top, int right, int bottom)
-{
- assert(right <= _screen.width && bottom <= _screen.height);
- if (_cursor.visible) {
- if (right > _cursor.draw_pos.x &&
- left < _cursor.draw_pos.x + _cursor.draw_size.x &&
- bottom > _cursor.draw_pos.y &&
- top < _cursor.draw_pos.y + _cursor.draw_size.y) {
- UndrawMouseCursor();
- }
- }
-
-#ifdef ENABLE_NETWORK
- if (_networking) NetworkUndrawChatMessage();
-#endif /* ENABLE_NETWORK */
-
- DrawOverlappedWindowForAll(left, top, right, bottom);
-
- _video_driver->MakeDirty(left, top, right - left, bottom - top);
-}
-
-/**
- * Repaints the rectangle blocks which are marked as 'dirty'.
- *
- * @see SetDirtyBlocks
- */
-void DrawDirtyBlocks()
-{
- byte *b = _dirty_blocks;
- const int w = Align(_screen.width, DIRTY_BLOCK_WIDTH);
- const int h = Align(_screen.height, DIRTY_BLOCK_HEIGHT);
- int x;
- int y;
-
- if (HasModalProgress()) {
- /* We are generating the world, so release our rights to the map and
- * painting while we are waiting a bit. */
- _modal_progress_paint_mutex->EndCritical();
- _modal_progress_work_mutex->EndCritical();
-
- /* Wait a while and update _realtime_tick so we are given the rights */
- if (!IsFirstModalProgressLoop()) CSleep(MODAL_PROGRESS_REDRAW_TIMEOUT);
- _realtime_tick += MODAL_PROGRESS_REDRAW_TIMEOUT;
- _modal_progress_paint_mutex->BeginCritical();
- _modal_progress_work_mutex->BeginCritical();
-
- /* When we ended with the modal progress, do not draw the blocks.
- * Simply let the next run do so, otherwise we would be loading
- * the new state (and possibly change the blitter) when we hold
- * the drawing lock, which we must not do. */
- if (_switch_mode != SM_NONE && !HasModalProgress()) return;
- }
-
- y = 0;
- do {
- x = 0;
- do {
- if (*b != 0) {
- int left;
- int top;
- int right = x + DIRTY_BLOCK_WIDTH;
- int bottom = y;
- byte *p = b;
- int h2;
-
- /* First try coalescing downwards */
- do {
- *p = 0;
- p += _dirty_bytes_per_line;
- bottom += DIRTY_BLOCK_HEIGHT;
- } while (bottom != h && *p != 0);
-
- /* Try coalescing to the right too. */
- h2 = (bottom - y) / DIRTY_BLOCK_HEIGHT;
- assert(h2 > 0);
- p = b;
-
- while (right != w) {
- byte *p2 = ++p;
- int h = h2;
- /* Check if a full line of dirty flags is set. */
- do {
- if (!*p2) goto no_more_coalesc;
- p2 += _dirty_bytes_per_line;
- } while (--h != 0);
-
- /* Wohoo, can combine it one step to the right!
- * Do that, and clear the bits. */
- right += DIRTY_BLOCK_WIDTH;
-
- h = h2;
- p2 = p;
- do {
- *p2 = 0;
- p2 += _dirty_bytes_per_line;
- } while (--h != 0);
- }
- no_more_coalesc:
-
- left = x;
- top = y;
-
- if (left < _invalid_rect.left ) left = _invalid_rect.left;
- if (top < _invalid_rect.top ) top = _invalid_rect.top;
- if (right > _invalid_rect.right ) right = _invalid_rect.right;
- if (bottom > _invalid_rect.bottom) bottom = _invalid_rect.bottom;
-
- if (left < right && top < bottom) {
- RedrawScreenRect(left, top, right, bottom);
- }
-
- }
- } while (b++, (x += DIRTY_BLOCK_WIDTH) != w);
- } while (b += -(int)(w / DIRTY_BLOCK_WIDTH) + _dirty_bytes_per_line, (y += DIRTY_BLOCK_HEIGHT) != h);
-
- ++_dirty_block_colour;
- _invalid_rect.left = w;
- _invalid_rect.top = h;
- _invalid_rect.right = 0;
- _invalid_rect.bottom = 0;
-}
-
-/**
- * This function extends the internal _invalid_rect rectangle as it
- * now contains the rectangle defined by the given parameters. Note
- * the point (0,0) is top left.
- *
- * @param left The left edge of the rectangle
- * @param top The top edge of the rectangle
- * @param right The right edge of the rectangle
- * @param bottom The bottom edge of the rectangle
- * @see DrawDirtyBlocks
- *
- * @todo The name of the function should be called like @c AddDirtyBlock as
- * it neither set a dirty rect nor add several dirty rects although
- * the function name is in plural. (Progman)
- */
-void SetDirtyBlocks(int left, int top, int right, int bottom)
-{
- byte *b;
- int width;
- int height;
-
- if (left < 0) left = 0;
- if (top < 0) top = 0;
- if (right > _screen.width) right = _screen.width;
- if (bottom > _screen.height) bottom = _screen.height;
-
- if (left >= right || top >= bottom) return;
-
- if (left < _invalid_rect.left ) _invalid_rect.left = left;
- if (top < _invalid_rect.top ) _invalid_rect.top = top;
- if (right > _invalid_rect.right ) _invalid_rect.right = right;
- if (bottom > _invalid_rect.bottom) _invalid_rect.bottom = bottom;
-
- left /= DIRTY_BLOCK_WIDTH;
- top /= DIRTY_BLOCK_HEIGHT;
-
- b = _dirty_blocks + top * _dirty_bytes_per_line + left;
-
- width = ((right - 1) / DIRTY_BLOCK_WIDTH) - left + 1;
- height = ((bottom - 1) / DIRTY_BLOCK_HEIGHT) - top + 1;
-
- assert(width > 0 && height > 0);
-
- do {
- int i = width;
-
- do b[--i] = 0xFF; while (i != 0);
-
- b += _dirty_bytes_per_line;
- } while (--height != 0);
-}
-
-/**
- * This function mark the whole screen as dirty. This results in repainting
- * the whole screen. Use this with care as this function will break the
- * idea about marking only parts of the screen as 'dirty'.
- * @ingroup dirty
- */
-void MarkWholeScreenDirty()
-{
- SetDirtyBlocks(0, 0, _screen.width, _screen.height);
-}
-
-/**
- * Set up a clipping area for only drawing into a certain area. To do this,
- * Fill a DrawPixelInfo object with the supplied relative rectangle, backup
- * the original (calling) _cur_dpi and assign the just returned DrawPixelInfo
- * _cur_dpi. When you are done, give restore _cur_dpi's original value
- * @param *n the DrawPixelInfo that will be the clipping rectangle box allowed
- * for drawing
- * @param left,top,width,height the relative coordinates of the clipping
- * rectangle relative to the current _cur_dpi. This will most likely be the
- * offset from the calling window coordinates
- * @return return false if the requested rectangle is not possible with the
- * current dpi pointer. Only continue of the return value is true, or you'll
- * get some nasty results
- */
-bool FillDrawPixelInfo(DrawPixelInfo *n, int left, int top, int width, int height)
-{
- Blitter *blitter = BlitterFactory::GetCurrentBlitter();
- const DrawPixelInfo *o = _cur_dpi;
-
- n->zoom = ZOOM_LVL_NORMAL;
-
- assert(width > 0);
- assert(height > 0);
-
- if ((left -= o->left) < 0) {
- width += left;
- if (width <= 0) return false;
- n->left = -left;
- left = 0;
- } else {
- n->left = 0;
- }
-
- if (width > o->width - left) {
- width = o->width - left;
- if (width <= 0) return false;
- }
- n->width = width;
-
- if ((top -= o->top) < 0) {
- height += top;
- if (height <= 0) return false;
- n->top = -top;
- top = 0;
- } else {
- n->top = 0;
- }
-
- n->dst_ptr = blitter->MoveTo(o->dst_ptr, left, top);
- n->pitch = o->pitch;
-
- if (height > o->height - top) {
- height = o->height - top;
- if (height <= 0) return false;
- }
- n->height = height;
-
- return true;
-}
-
-/**
- * Update cursor dimension.
- * Called when changing cursor sprite resp. reloading grfs.
- */
-void UpdateCursorSize()
-{
- CursorVars *cv = &_cursor;
- const Sprite *p = GetSprite(GB(cv->sprite, 0, SPRITE_WIDTH), ST_NORMAL);
-
- cv->size.y = UnScaleByZoom(p->height, ZOOM_LVL_GUI);
- cv->size.x = UnScaleByZoom(p->width, ZOOM_LVL_GUI);
- cv->offs.x = UnScaleByZoom(p->x_offs, ZOOM_LVL_GUI);
- cv->offs.y = UnScaleByZoom(p->y_offs, ZOOM_LVL_GUI);
-
- cv->dirty = true;
-}
-
-/**
- * Switch cursor to different sprite.
- * @param cursor Sprite to draw for the cursor.
- * @param pal Palette to use for recolouring.
- */
-static void SetCursorSprite(CursorID cursor, PaletteID pal)
-{
- CursorVars *cv = &_cursor;
- if (cv->sprite == cursor) return;
-
- cv->sprite = cursor;
- cv->pal = pal;
- UpdateCursorSize();
-
- cv->short_vehicle_offset = 0;
-}
-
-static void SwitchAnimatedCursor()
-{
- const AnimCursor *cur = _cursor.animate_cur;
-
- if (cur == NULL || cur->sprite == AnimCursor::LAST) cur = _cursor.animate_list;
-
- SetCursorSprite(cur->sprite, _cursor.pal);
-
- _cursor.animate_timeout = cur->display_time;
- _cursor.animate_cur = cur + 1;
-}
-
-void CursorTick()
-{
- if (_cursor.animate_timeout != 0 && --_cursor.animate_timeout == 0) {
- SwitchAnimatedCursor();
- }
-}
-
-/**
- * Assign a single non-animated sprite to the cursor.
- * @param sprite Sprite to draw for the cursor.
- * @param pal Palette to use for recolouring.
- * @see SetAnimatedMouseCursor
- */
-void SetMouseCursor(CursorID sprite, PaletteID pal)
-{
- /* Turn off animation */
- _cursor.animate_timeout = 0;
- /* Set cursor */
- SetCursorSprite(sprite, pal);
-}
-
-/**
- * Assign an animation to the cursor.
- * @param table Array of animation states.
- * @see SetMouseCursor
- */
-void SetAnimatedMouseCursor(const AnimCursor *table)
-{
- _cursor.animate_list = table;
- _cursor.animate_cur = NULL;
- _cursor.pal = PAL_NONE;
- SwitchAnimatedCursor();
-}
-
-bool ChangeResInGame(int width, int height)
-{
- return (_screen.width == width && _screen.height == height) || _video_driver->ChangeResolution(width, height);
-}
-
-bool ToggleFullScreen(bool fs)
-{
- bool result = _video_driver->ToggleFullscreen(fs);
- if (_fullscreen != fs && _num_resolutions == 0) {
- DEBUG(driver, 0, "Could not find a suitable fullscreen resolution");
- }
- return result;
-}
-
-static int CDECL compare_res(const Dimension *pa, const Dimension *pb)
-{
- int x = pa->width - pb->width;
- if (x != 0) return x;
- return pa->height - pb->height;
-}
-
-void SortResolutions(int count)
-{
- QSortT(_resolutions, count, &compare_res);
-}
-
-
-/**
- * Returns the initial value for a margin, after telling where are the left and right margins and where we want to draw/write (begining/end of line)
- * @param left is the left margin of the horizontal space we want to draw to
- * @param right: right margin
- * @param to_end_line: 0 if working at the begining of the line, 1 if working at the end
- * @return the margin we asked
- */
-int InitTempMargin(int left, int right, bool to_end_line)
-{
- return to_end_line ^ (_current_text_dir == TD_RTL) ? right :left;
-}
-
-/**
- * Consumes a space in an horizontal margin
- * @param space: amount of space used
- * @param here: the margin where to add the space
- * @param to_end_line: 0 if working at the begining of the line, 1 if working at the end
- */
-void AddSpace(int space, int &here, bool to_end_line)
-{
- here += to_end_line ^ (_current_text_dir == TD_RTL) ? -space : space;
-}
-
-/**
- * After drawing something, update a margin
- * @param end is where we ended drawing (usually the return value of a DrawString function)
- * @param margin is the margin we want to update
- * @param to_end_line: 0 if working at the begining of the line, 1 if working at the end
- */
-void UpdateMarginEnd(int end, int &margin, bool to_end_line)
-{
- margin = to_end_line ^ (_current_text_dir == TD_RTL) ? min(end, margin) : max(end, margin);
-}
-
-/**
- * After drawing something, horizontal margins are updated
- * @param end: last position drawn
- * @param left is the left margin of the horizontal space drawn
- * @param right: right margin
- * @param to_end_line: 0 if working at the begining of the line, 1 if working at the end
- */
-void UpdateMarginsEnd(int end, int &left, int &right, bool to_end_line)
-{
- if (to_end_line ^ (_current_text_dir == TD_RTL)) {
- right = end;
- } else {
- left = end;
- }
-}
-
-/**
- * After drawing something of a certain width, update margins
- * @param width: used space
- * @param initial left margin
- * @param initial right margin
- * @param to_end_line: 0 if working at the begining of the line, 1 if working at the end
- */
-void UpdateMarginsWidth(int width, int &left, int &right, bool to_end_line)
-{
- if (to_end_line ^ (_current_text_dir == TD_RTL)) {
- right -= width;
- } else {
- left += width;
- }
-}
-
-/**
- * Draws a string in a delimited space; temporal margin gets updated
- * @param left is the left margin of the horizontal space we want to draw to
- * @param right: right margin of the horizontal space we want to draw to
- * @param top: vertical position
- * @param margin keeps the most extreme limit used of the line (this should be previously initialized with InitTempLimit)
- * @param string to draw
- * @param colour for the string
- * @param alignment of the string (only left or right alignment)
- * @param underline
- */
-void DrawString2(int left, int right, int top, int &margin, StringID str, TextColour colour, StringAlignment align, bool underline)
-{
- int end = DrawString(left, right, top, str, colour, align, underline);
- UpdateMarginEnd(end, margin, align == SA_RIGHT);
-}
-
-/**
- * Draws a sprite in a delimited space; temporal margin gets updated
- * @param width of the sprite
- * @param left is the left margin of the horizontal space we want to draw to
- * @param right: right margin of the horizontal space
- * @param top: vertical position
- * @param margin keeps the most extreme limit used of the line (this should be previously initialized with InitTempLimit)
- * @param sprite
- * @param palette
- * @param to_end_line: 0 if working at the begining of the line, 1 if working at the end
- */
-void DrawSprite2(int width, int left, int right, int top, int &margin, SpriteID img, PaletteID pal, bool to_end_line, SubSprite *sub)
-{
- DrawSprite(img, pal, to_end_line ^ (_current_text_dir == TD_RTL) ? right - width : left, top, sub);
- margin = to_end_line ^ (_current_text_dir == TD_RTL) ? min(right - width, margin): max(margin, left + width);
-}
diff --git a/src/gfx_func.h.orig b/src/gfx_func.h.orig
deleted file mode 100644
index 33b13c1fd8..0000000000
--- a/src/gfx_func.h.orig
+++ /dev/null
@@ -1,226 +0,0 @@
-/* $Id$ */
-
-/*
- * This file is part of OpenTTD.
- * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
- * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see .
- */
-
-/** @file gfx_func.h Functions related to the gfx engine. */
-
-/**
- * @defgroup dirty Dirty
- *
- * Handles the repaint of some part of the screen.
- *
- * Some places in the code are called functions which makes something "dirty".
- * This has nothing to do with making a Tile or Window darker or less visible.
- * This term comes from memory caching and is used to define an object must
- * be repaint. If some data of an object (like a Tile, Window, Vehicle, whatever)
- * are changed which are so extensive the object must be repaint its marked
- * as "dirty". The video driver repaint this object instead of the whole screen
- * (this is btw. also possible if needed). This is used to avoid a
- * flickering of the screen by the video driver constantly repainting it.
- *
- * This whole mechanism is controlled by an rectangle defined in #_invalid_rect. This
- * rectangle defines the area on the screen which must be repaint. If a new object
- * needs to be repainted this rectangle is extended to 'catch' the object on the
- * screen. At some point (which is normally uninteresting for patch writers) this
- * rectangle is send to the video drivers method
- * VideoDriver::MakeDirty and it is truncated back to an empty rectangle. At some
- * later point (which is uninteresting, too) the video driver
- * repaints all these saved rectangle instead of the whole screen and drop the
- * rectangle informations. Then a new round begins by marking objects "dirty".
- *
- * @see VideoDriver::MakeDirty
- * @see _invalid_rect
- * @see _screen
- */
-
-
-#ifndef GFX_FUNC_H
-#define GFX_FUNC_H
-
-#include "gfx_type.h"
-#include "strings_type.h"
-#include "string_type.h"
-
-void GameLoop();
-
-void CreateConsole();
-
-extern byte _dirkeys; ///< 1 = left, 2 = up, 4 = right, 8 = down
-extern bool _fullscreen;
-extern CursorVars _cursor;
-extern bool _ctrl_pressed; ///< Is Ctrl pressed?
-extern bool _shift_pressed; ///< Is Shift pressed?
-extern byte _fast_forward;
-
-extern bool _left_button_down;
-extern bool _left_button_clicked;
-extern bool _right_button_down;
-extern bool _right_button_clicked;
-
-extern DrawPixelInfo _screen;
-extern bool _screen_disable_anim; ///< Disable palette animation (important for 32bpp-anim blitter during giant screenshot)
-
-extern int _num_resolutions;
-extern Dimension _resolutions[32];
-extern Dimension _cur_resolution;
-extern Palette _cur_palette; ///< Current palette
-
-void HandleKeypress(uint keycode, WChar key);
-void HandleTextInput(const char *str, bool marked = false, const char *caret = NULL, const char *insert_location = NULL, const char *replacement_end = NULL);
-void HandleCtrlChanged();
-void HandleMouseEvents();
-void CSleep(int milliseconds);
-void UpdateWindows();
-
-void DrawMouseCursor();
-void ScreenSizeChanged();
-void GameSizeChanged();
-void UndrawMouseCursor();
-
-/** Size of the buffer used for drawing strings. */
-static const int DRAW_STRING_BUFFER = 2048;
-
-void RedrawScreenRect(int left, int top, int right, int bottom);
-void GfxScroll(int left, int top, int width, int height, int xo, int yo);
-
-Dimension GetSpriteSize(SpriteID sprid, Point *offset = NULL, ZoomLevel zoom = ZOOM_LVL_GUI);
-void DrawSpriteViewport(SpriteID img, PaletteID pal, int x, int y, const SubSprite *sub = NULL);
-void DrawSprite(SpriteID img, PaletteID pal, int x, int y, const SubSprite *sub = NULL, ZoomLevel zoom = ZOOM_LVL_GUI);
-
-/** How to align the to-be drawn text. */
-enum StringAlignment {
- SA_LEFT = 0 << 0, ///< Left align the text.
- SA_HOR_CENTER = 1 << 0, ///< Horizontally center the text.
- SA_RIGHT = 2 << 0, ///< Right align the text (must be a single bit).
- SA_HOR_MASK = 3 << 0, ///< Mask for horizontal alignment.
-
- SA_TOP = 0 << 2, ///< Top align the text.
- SA_VERT_CENTER = 1 << 2, ///< Vertically center the text.
- SA_BOTTOM = 2 << 2, ///< Bottom align the text.
- SA_VERT_MASK = 3 << 2, ///< Mask for vertical alignment.
-
- SA_CENTER = SA_HOR_CENTER | SA_VERT_CENTER, ///< Center both horizontally and vertically.
-
- SA_FORCE = 1 << 4, ///< Force the alignment, i.e. don't swap for RTL languages.
-};
-DECLARE_ENUM_AS_BIT_SET(StringAlignment)
-
-int DrawString(int left, int right, int top, const char *str, TextColour colour = TC_FROMSTRING, StringAlignment align = SA_LEFT, bool underline = false, FontSize fontsize = FS_NORMAL);
-int DrawString(int left, int right, int top, StringID str, TextColour colour = TC_FROMSTRING, StringAlignment align = SA_LEFT, bool underline = false, FontSize fontsize = FS_NORMAL);
-int DrawStringMultiLine(int left, int right, int top, int bottom, const char *str, TextColour colour = TC_FROMSTRING, StringAlignment align = (SA_TOP | SA_LEFT), bool underline = false, FontSize fontsize = FS_NORMAL);
-int DrawStringMultiLine(int left, int right, int top, int bottom, StringID str, TextColour colour = TC_FROMSTRING, StringAlignment align = (SA_TOP | SA_LEFT), bool underline = false, FontSize fontsize = FS_NORMAL);
-
-void DrawCharCentered(uint32 c, int x, int y, TextColour colour);
-
-void GfxFillRect(int left, int top, int right, int bottom, int colour, FillRectMode mode = FILLRECT_OPAQUE);
-void GfxDrawLine(int left, int top, int right, int bottom, int colour, int width = 1, int dash = 0);
-void DrawBox(int x, int y, int dx1, int dy1, int dx2, int dy2, int dx3, int dy3);
-
-Dimension GetStringBoundingBox(const char *str, FontSize start_fontsize = FS_NORMAL);
-Dimension GetStringBoundingBox(StringID strid);
-int GetStringHeight(const char *str, int maxw, FontSize fontsize = FS_NORMAL);
-int GetStringHeight(StringID str, int maxw);
-int GetStringLineCount(StringID str, int maxw);
-Dimension GetStringMultiLineBoundingBox(StringID str, const Dimension &suggestion);
-Dimension GetStringMultiLineBoundingBox(const char *str, const Dimension &suggestion);
-void LoadStringWidthTable(bool monospace = false);
-Point GetCharPosInString(const char *str, const char *ch, FontSize start_fontsize = FS_NORMAL);
-const char *GetCharAtPosition(const char *str, int x, FontSize start_fontsize = FS_NORMAL);
-
-void DrawDirtyBlocks();
-void SetDirtyBlocks(int left, int top, int right, int bottom);
-void MarkWholeScreenDirty();
-
-void GfxInitPalettes();
-void CheckBlitter();
-
-bool FillDrawPixelInfo(DrawPixelInfo *n, int left, int top, int width, int height);
-
-/* window.cpp */
-void DrawOverlappedWindowForAll(int left, int top, int right, int bottom);
-
-void SetMouseCursor(CursorID cursor, PaletteID pal);
-void SetAnimatedMouseCursor(const AnimCursor *table);
-void CursorTick();
-void UpdateCursorSize();
-bool ChangeResInGame(int w, int h);
-void SortResolutions(int count);
-bool ToggleFullScreen(bool fs);
-
-/* gfx.cpp */
-byte GetCharacterWidth(FontSize size, uint32 key);
-byte GetDigitWidth(FontSize size = FS_NORMAL);
-void GetBroadestDigit(uint *front, uint *next, FontSize size = FS_NORMAL);
-
-int GetCharacterHeight(FontSize size);
-
-/** Height of characters in the small (#FS_SMALL) font. */
-#define FONT_HEIGHT_SMALL (GetCharacterHeight(FS_SMALL))
-
-/** Height of characters in the normal (#FS_NORMAL) font. */
-#define FONT_HEIGHT_NORMAL (GetCharacterHeight(FS_NORMAL))
-
-/** Height of characters in the large (#FS_LARGE) font. */
-#define FONT_HEIGHT_LARGE (GetCharacterHeight(FS_LARGE))
-
-/** Height of characters in the large (#FS_MONO) font. */
-#define FONT_HEIGHT_MONO (GetCharacterHeight(FS_MONO))
-
-int InitTempMargin(int left, int right, bool to_end_line);
-void AddSpace(int space, int &here, bool to_end_line);
-
-void UpdateMarginEnd(int end, int &margin, bool to_end_line);
-void UpdateMarginWidth(int adding, int &margin, bool to_end_line);
-void UpdateMarginsEnd(int end, int &left, int &right, bool to_end_line);
-void UpdateMarginsWidth(int width, int &left, int &right, bool to_end_line);
-
-void DrawString2(int left, int right, int top, int &margin, StringID str, TextColour colour = TC_FROMSTRING, StringAlignment align = SA_LEFT, bool underline = false);
-void DrawSprite2(int width, int left, int right, int top, int &margin, SpriteID img, PaletteID pal, bool to_end_line = false, SubSprite *sub = NULL);
-
-extern DrawPixelInfo *_cur_dpi;
-
-TextColour GetContrastColour(uint8 background);
-
-/**
- * All 16 colour gradients
- * 8 colours per gradient from darkest (0) to lightest (7)
- */
-extern byte _colour_gradient[COLOUR_END][8];
-
-extern bool _palette_remap_grf[];
-
-/**
- * Return the colour for a particular greyscale level.
- * @param level Intensity, 0 = black, 15 = white
- * @return colour
- */
-#define GREY_SCALE(level) (level)
-
-static const uint8 PC_BLACK = GREY_SCALE(1); ///< Black palette colour.
-static const uint8 PC_DARK_GREY = GREY_SCALE(6); ///< Dark grey palette colour.
-static const uint8 PC_GREY = GREY_SCALE(10); ///< Grey palette colour.
-static const uint8 PC_WHITE = GREY_SCALE(15); ///< White palette colour.
-
-static const uint8 PC_VERY_DARK_RED = 0xB2; ///< Almost-black red palette colour.
-static const uint8 PC_DARK_RED = 0xB4; ///< Dark red palette colour.
-static const uint8 PC_RED = 0xB8; ///< Red palette colour.
-
-static const uint8 PC_VERY_DARK_BROWN = 0x56; ///< Almost-black brown palette colour.
-
-static const uint8 PC_ORANGE = 0xC2; ///< Orange palette colour.
-
-static const uint8 PC_YELLOW = 0xBF; ///< Yellow palette colour.
-static const uint8 PC_LIGHT_YELLOW = 0x44; ///< Light yellow palette colour.
-static const uint8 PC_VERY_LIGHT_YELLOW = 0x45; ///< Almost-white yellow palette colour.
-
-static const uint8 PC_GREEN = 0xD0; ///< Green palette colour.
-
-static const uint8 PC_DARK_BLUE = 0x9D; ///< Dark blue palette colour.
-static const uint8 PC_LIGHT_BLUE = 0x98; ///< Light blue palette colour.
-
-#endif /* GFX_FUNC_H */
diff --git a/src/group_gui.cpp.orig b/src/group_gui.cpp.orig
deleted file mode 100644
index 93349a3f5d..0000000000
--- a/src/group_gui.cpp.orig
+++ /dev/null
@@ -1,891 +0,0 @@
-/* $Id$ */
-
-/*
- * This file is part of OpenTTD.
- * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
- * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see .
- */
-
-/** @file group_gui.cpp GUI for the group window. */
-
-#include "stdafx.h"
-#include "textbuf_gui.h"
-#include "command_func.h"
-#include "vehicle_gui.h"
-#include "vehicle_base.h"
-#include "string_func.h"
-#include "strings_func.h"
-#include "window_func.h"
-#include "vehicle_func.h"
-#include "autoreplace_gui.h"
-#include "company_func.h"
-#include "widgets/dropdown_func.h"
-#include "tilehighlight_func.h"
-#include "vehicle_gui_base.h"
-#include "core/geometry_func.hpp"
-#include "company_base.h"
-
-#include "widgets/group_widget.h"
-
-#include "table/sprites.h"
-
-typedef GUIList GUIGroupList;
-
-static const NWidgetPart _nested_group_widgets[] = {
- NWidget(NWID_HORIZONTAL), // Window header
- NWidget(WWT_CLOSEBOX, COLOUR_GREY),
- NWidget(WWT_CAPTION, COLOUR_GREY, WID_GL_CAPTION),
- NWidget(WWT_SHADEBOX, COLOUR_GREY),
- NWidget(WWT_DEFSIZEBOX, COLOUR_GREY),
- NWidget(WWT_STICKYBOX, COLOUR_GREY),
- EndContainer(),
- NWidget(NWID_HORIZONTAL),
- /* left part */
- NWidget(NWID_VERTICAL),
- NWidget(WWT_PANEL, COLOUR_GREY), SetMinimalTextLines(1, WD_DROPDOWNTEXT_TOP + WD_DROPDOWNTEXT_BOTTOM), SetFill(1, 0), EndContainer(),
- NWidget(WWT_PANEL, COLOUR_GREY, WID_GL_ALL_VEHICLES), SetFill(1, 0), EndContainer(),
- NWidget(WWT_PANEL, COLOUR_GREY, WID_GL_DEFAULT_VEHICLES), SetFill(1, 0), EndContainer(),
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_MATRIX, COLOUR_GREY, WID_GL_LIST_GROUP), SetMatrixDataTip(1, 0, STR_GROUPS_CLICK_ON_GROUP_FOR_TOOLTIP),
- SetFill(1, 0), SetResize(0, 1), SetScrollbar(WID_GL_LIST_GROUP_SCROLLBAR),
- NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_GL_LIST_GROUP_SCROLLBAR),
- EndContainer(),
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_GL_CREATE_GROUP), SetFill(0, 1),
- SetDataTip(SPR_GROUP_CREATE_TRAIN, STR_GROUP_CREATE_TOOLTIP),
- NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_GL_DELETE_GROUP), SetFill(0, 1),
- SetDataTip(SPR_GROUP_DELETE_TRAIN, STR_GROUP_DELETE_TOOLTIP),
- NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_GL_RENAME_GROUP), SetFill(0, 1),
- SetDataTip(SPR_GROUP_RENAME_TRAIN, STR_GROUP_RENAME_TOOLTIP),
- NWidget(WWT_PANEL, COLOUR_GREY), SetFill(1, 1), EndContainer(),
- NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_GL_REPLACE_PROTECTION), SetFill(0, 1),
- SetDataTip(SPR_GROUP_REPLACE_OFF_TRAIN, STR_GROUP_REPLACE_PROTECTION_TOOLTIP),
- EndContainer(),
- EndContainer(),
- /* right part */
- NWidget(NWID_VERTICAL),
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_GL_SORT_BY_ORDER), SetMinimalSize(81, 12), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER),
- NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_GL_SORT_BY_DROPDOWN), SetMinimalSize(167, 12), SetDataTip(0x0, STR_TOOLTIP_SORT_CRITERIA),
- NWidget(WWT_PANEL, COLOUR_GREY), SetMinimalSize(12, 12), SetResize(1, 0), EndContainer(),
- EndContainer(),
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_MATRIX, COLOUR_GREY, WID_GL_LIST_VEHICLE), SetMinimalSize(248, 0), SetMatrixDataTip(1, 0, STR_NULL), SetResize(1, 1), SetFill(1, 0), SetScrollbar(WID_GL_LIST_VEHICLE_SCROLLBAR),
- NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_GL_LIST_VEHICLE_SCROLLBAR),
- EndContainer(),
- NWidget(WWT_PANEL, COLOUR_GREY), SetMinimalSize(1, 0), SetFill(1, 1), SetResize(1, 0), EndContainer(),
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_GL_AVAILABLE_VEHICLES), SetMinimalSize(106, 12), SetFill(0, 1),
- SetDataTip(STR_BLACK_STRING, STR_VEHICLE_LIST_AVAILABLE_ENGINES_TOOLTIP),
- NWidget(WWT_PANEL, COLOUR_GREY), SetMinimalSize(0, 12), SetFill(1, 1), SetResize(1, 0), EndContainer(),
- NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_GL_MANAGE_VEHICLES_DROPDOWN), SetMinimalSize(118, 12), SetFill(0, 1),
- SetDataTip(STR_VEHICLE_LIST_MANAGE_LIST, STR_VEHICLE_LIST_MANAGE_LIST_TOOLTIP),
- NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_GL_STOP_ALL), SetMinimalSize(12, 12), SetFill(0, 1),
- SetDataTip(SPR_FLAG_VEH_STOPPED, STR_VEHICLE_LIST_MASS_STOP_LIST_TOOLTIP),
- NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_GL_START_ALL), SetMinimalSize(12, 12), SetFill(0, 1),
- SetDataTip(SPR_FLAG_VEH_RUNNING, STR_VEHICLE_LIST_MASS_START_LIST_TOOLTIP),
- NWidget(WWT_RESIZEBOX, COLOUR_GREY),
- EndContainer(),
- EndContainer(),
- EndContainer(),
-};
-
-class VehicleGroupWindow : public BaseVehicleListWindow {
-private:
- /* Columns in the group list */
- enum ListColumns {
- VGC_NAME, ///< Group name.
- VGC_PROTECT, ///< Autoreplace protect icon.
- VGC_AUTOREPLACE, ///< Autoreplace active icon.
- VGC_PROFIT, ///< Profit icon.
- VGC_NUMBER, ///< Number of vehicles in the group.
-
- VGC_END
- };
-
- VehicleID vehicle_sel; ///< Selected vehicle
- GroupID group_rename; ///< Group being renamed, INVALID_GROUP if none
- GroupID group_over; ///< Group over which a vehicle is dragged, INVALID_GROUP if none
- GUIGroupList groups; ///< List of groups
- uint tiny_step_height; ///< Step height for the group list
- Scrollbar *group_sb;
-
- Dimension column_size[VGC_END]; ///< Size of the columns in the group list.
-
- /**
- * (Re)Build the group list.
- *
- * @param owner The owner of the window
- */
- void BuildGroupList(Owner owner)
- {
- if (!this->groups.NeedRebuild()) return;
-
- this->groups.Clear();
-
- const Group *g;
- FOR_ALL_GROUPS(g) {
- if (g->owner == owner && g->vehicle_type == this->vli.vtype) {
- *this->groups.Append() = g;
- }
- }
-
- this->groups.Compact();
- this->groups.RebuildDone();
- }
-
- /** Sort the groups by their name */
- static int CDECL GroupNameSorter(const Group * const *a, const Group * const *b)
- {
- static const Group *last_group[2] = { NULL, NULL };
- static char last_name[2][64] = { "", "" };
-
- if (*a != last_group[0]) {
- last_group[0] = *a;
- SetDParam(0, (*a)->index);
- GetString(last_name[0], STR_GROUP_NAME, lastof(last_name[0]));
- }
-
- if (*b != last_group[1]) {
- last_group[1] = *b;
- SetDParam(0, (*b)->index);
- GetString(last_name[1], STR_GROUP_NAME, lastof(last_name[1]));
- }
-
- int r = strnatcmp(last_name[0], last_name[1]); // Sort by name (natural sorting).
- if (r == 0) return (*a)->index - (*b)->index;
- return r;
- }
-
- /**
- * Compute tiny_step_height and column_size
- * @return Total width required for the group list.
- */
- uint ComputeGroupInfoSize()
- {
- this->column_size[VGC_NAME] = maxdim(GetStringBoundingBox(STR_GROUP_DEFAULT_TRAINS + this->vli.vtype), GetStringBoundingBox(STR_GROUP_ALL_TRAINS + this->vli.vtype));
-/* We consider the max average length of characters to be the one of "a" */
- this->column_size[VGC_NAME].width = max(GetCharacterWidth(FS_NORMAL, 97) * (MAX_LENGTH_GROUP_NAME_CHARS - 4), this->column_size[VGC_NAME].width);
- this->tiny_step_height = this->column_size[VGC_NAME].height;
-
- this->column_size[VGC_PROTECT] = GetSpriteSize(SPR_GROUP_REPLACE_PROTECT);
- this->tiny_step_height = max(this->tiny_step_height, this->column_size[VGC_PROTECT].height);
-
- this->column_size[VGC_AUTOREPLACE] = GetSpriteSize(SPR_GROUP_REPLACE_ACTIVE);
- this->tiny_step_height = max(this->tiny_step_height, this->column_size[VGC_AUTOREPLACE].height);
-
- this->column_size[VGC_PROFIT].width = 0;
- this->column_size[VGC_PROFIT].height = 0;
- static const SpriteID profit_sprites[] = {SPR_PROFIT_NA, SPR_PROFIT_NEGATIVE, SPR_PROFIT_SOME, SPR_PROFIT_LOT};
- for (uint i = 0; i < lengthof(profit_sprites); i++) {
- Dimension d = GetSpriteSize(profit_sprites[i]);
- this->column_size[VGC_PROFIT] = maxdim(this->column_size[VGC_PROFIT], d);
- }
- this->tiny_step_height = max(this->tiny_step_height, this->column_size[VGC_PROFIT].height);
-
- SetDParamMaxValue(0, GroupStatistics::Get(this->vli.company, ALL_GROUP, this->vli.vtype).num_vehicle, 3, FS_SMALL);
- this->column_size[VGC_NUMBER] = GetStringBoundingBox(STR_TINY_COMMA);
- this->tiny_step_height = max(this->tiny_step_height, this->column_size[VGC_NUMBER].height);
-
- this->tiny_step_height += WD_MATRIX_TOP;
-
- return WD_FRAMERECT_LEFT + 8 +
- this->column_size[VGC_NAME].width + 2 +
- this->column_size[VGC_PROTECT].width + 2 +
- this->column_size[VGC_AUTOREPLACE].width + 2 +
- this->column_size[VGC_PROFIT].width + 2 +
- this->column_size[VGC_NUMBER].width + 2 +
- WD_FRAMERECT_RIGHT;
- }
-
- /**
- * Draw a row in the group list.
- * @param y Top of the row.
- * @param left Left of the row.
- * @param right Right of the row.
- * @param g_id Group to list.
- * @param protection Whether autoreplace protection is set.
- */
- void DrawGroupInfo(int y, int left, int right, GroupID g_id, bool protection = false) const
- {
- /* Highlight the group if a vehicle is dragged over it */
- if (g_id == this->group_over) {
- GfxFillRect(left + WD_FRAMERECT_LEFT, y + WD_FRAMERECT_TOP + WD_MATRIX_TOP, right - WD_FRAMERECT_RIGHT, y + this->tiny_step_height - WD_FRAMERECT_BOTTOM - WD_MATRIX_TOP, _colour_gradient[COLOUR_GREY][7]);
- }
-
- if (g_id == NEW_GROUP) return;
-
- /* draw the selected group in white, else we draw it in black */
- TextColour colour = g_id == this->vli.index ? TC_WHITE : TC_BLACK;
- const GroupStatistics &stats = GroupStatistics::Get(this->vli.company, g_id, this->vli.vtype);
- bool rtl = _current_text_dir == TD_RTL;
-
- /* draw group name */
- int longer_name = 0;
- StringID str;
- if (IsAllGroupID(g_id)) {
- str = STR_GROUP_ALL_TRAINS + this->vli.vtype;
- } else if (IsDefaultGroupID(g_id)) {
- str = STR_GROUP_DEFAULT_TRAINS + this->vli.vtype;
- } else {
- SetDParam(0, g_id);
- str = STR_GROUP_NAME;
- if (!protection) {
- longer_name += this->column_size[VGC_PROTECT].width + 2;
- if (!stats.autoreplace_defined) longer_name += this->column_size[VGC_AUTOREPLACE].width + 2;
- }
- }
- int x = rtl ? right - WD_FRAMERECT_RIGHT - 8 - this->column_size[VGC_NAME].width - longer_name + 1 : left + WD_FRAMERECT_LEFT + 8;
- DrawString(x, x + this->column_size[VGC_NAME].width + longer_name - 1, y + (this->tiny_step_height - this->column_size[VGC_NAME].height) / 2, str, colour);
-
- /* draw autoreplace protection */
- x = rtl ? x - 2 - this->column_size[VGC_PROTECT].width : x + 2 + this->column_size[VGC_NAME].width;
- if (protection) DrawSprite(SPR_GROUP_REPLACE_PROTECT, PAL_NONE, x, y + (this->tiny_step_height - this->column_size[VGC_PROTECT].height) / 2);
-
- /* draw autoreplace status */
- x = rtl ? x - 2 - this->column_size[VGC_AUTOREPLACE].width : x + 2 + this->column_size[VGC_PROTECT].width;
- if (stats.autoreplace_defined) DrawSprite(SPR_GROUP_REPLACE_ACTIVE, stats.autoreplace_finished ? PALETTE_CRASH : PAL_NONE, x, y + (this->tiny_step_height - this->column_size[VGC_AUTOREPLACE].height) / 2);
-
- /* draw the profit icon */
- x = rtl ? x - 2 - this->column_size[VGC_PROFIT].width : x + 2 + this->column_size[VGC_AUTOREPLACE].width;
- SpriteID spr;
- if (stats.num_profit_vehicle == 0) {
- spr = SPR_PROFIT_NA;
- } else if (stats.profit_last_year < 0) {
- spr = SPR_PROFIT_NEGATIVE;
- } else if (stats.profit_last_year < 10000 * stats.num_profit_vehicle) { // TODO magic number
- spr = SPR_PROFIT_SOME;
- } else {
- spr = SPR_PROFIT_LOT;
- }
- DrawSprite(spr, PAL_NONE, x, y + (this->tiny_step_height - this->column_size[VGC_PROFIT].height) / 2);
-
- /* draw the number of vehicles of the group */
- x = rtl ? x - 2 - this->column_size[VGC_NUMBER].width : x + 2 + this->column_size[VGC_PROFIT].width;
- SetDParam(0, stats.num_vehicle);
- DrawString(x, x + this->column_size[VGC_NUMBER].width - 1, y + (this->tiny_step_height - this->column_size[VGC_NUMBER].height) / 2, STR_TINY_COMMA, colour, SA_RIGHT | SA_FORCE);
- }
-
- /**
- * Mark the widget containing the currently highlighted group as dirty.
- */
- void DirtyHighlightedGroupWidget()
- {
- if (this->group_over == INVALID_GROUP) return;
-
- if (IsAllGroupID(this->group_over)) {
- this->SetWidgetDirty(WID_GL_ALL_VEHICLES);
- } else if (IsDefaultGroupID(this->group_over)) {
- this->SetWidgetDirty(WID_GL_DEFAULT_VEHICLES);
- } else {
- this->SetWidgetDirty(WID_GL_LIST_GROUP);
- }
- }
-
-public:
- VehicleGroupWindow(WindowDesc *desc, WindowNumber window_number) : BaseVehicleListWindow(desc, window_number)
- {
- this->CreateNestedTree();
-
- this->vscroll = this->GetScrollbar(WID_GL_LIST_VEHICLE_SCROLLBAR);
- this->group_sb = this->GetScrollbar(WID_GL_LIST_GROUP_SCROLLBAR);
-
- switch (this->vli.vtype) {
- default: NOT_REACHED();
- case VEH_TRAIN: this->sorting = &_sorting.train; break;
- case VEH_ROAD: this->sorting = &_sorting.roadveh; break;
- case VEH_SHIP: this->sorting = &_sorting.ship; break;
- case VEH_AIRCRAFT: this->sorting = &_sorting.aircraft; break;
- }
-
- this->vli.index = ALL_GROUP;
- this->vehicle_sel = INVALID_VEHICLE;
- this->group_rename = INVALID_GROUP;
- this->group_over = INVALID_GROUP;
-
- this->vehicles.SetListing(*this->sorting);
- this->vehicles.ForceRebuild();
- this->vehicles.NeedResort();
-
- this->BuildVehicleList();
- this->SortVehicleList();
-
- this->groups.ForceRebuild();
- this->groups.NeedResort();
- this->BuildGroupList(vli.company);
- this->groups.Sort(&GroupNameSorter);
-
- this->GetWidget(WID_GL_CAPTION)->widget_data = STR_VEHICLE_LIST_TRAIN_CAPTION + this->vli.vtype;
- this->GetWidget(WID_GL_LIST_VEHICLE)->tool_tip = STR_VEHICLE_LIST_TRAIN_LIST_TOOLTIP + this->vli.vtype;
-
- this->GetWidget(WID_GL_CREATE_GROUP)->widget_data += this->vli.vtype;
- this->GetWidget(WID_GL_RENAME_GROUP)->widget_data += this->vli.vtype;
- this->GetWidget(WID_GL_DELETE_GROUP)->widget_data += this->vli.vtype;
- this->GetWidget(WID_GL_REPLACE_PROTECTION)->widget_data += this->vli.vtype;
-
- this->FinishInitNested(window_number);
- this->owner = vli.company;
- }
-
- ~VehicleGroupWindow()
- {
- *this->sorting = this->vehicles.GetListing();
- }
-
- virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
- {
- switch (widget) {
- case WID_GL_LIST_GROUP: {
- size->width = this->ComputeGroupInfoSize();
- resize->height = this->tiny_step_height;
-
- /* Minimum height is the height of the list widget minus all and default vehicles... */
- size->height = 4 * GetVehicleListHeight(this->vli.vtype, this->tiny_step_height) - 2 * this->tiny_step_height;
-
- /* ... minus the buttons at the bottom ... */
- uint max_icon_height = GetSpriteSize(this->GetWidget(WID_GL_CREATE_GROUP)->widget_data).height;
- max_icon_height = max(max_icon_height, GetSpriteSize(this->GetWidget(WID_GL_RENAME_GROUP)->widget_data).height);
- max_icon_height = max(max_icon_height, GetSpriteSize(this->GetWidget(WID_GL_DELETE_GROUP)->widget_data).height);
- max_icon_height = max(max_icon_height, GetSpriteSize(this->GetWidget(WID_GL_REPLACE_PROTECTION)->widget_data).height);
-
- /* Get a multiple of tiny_step_height of that amount */
- size->height = Ceil(size->height - max_icon_height, tiny_step_height);
- break;
- }
-
- case WID_GL_ALL_VEHICLES:
- case WID_GL_DEFAULT_VEHICLES:
- size->width = this->ComputeGroupInfoSize();
- size->height = this->tiny_step_height;
- break;
-
- case WID_GL_SORT_BY_ORDER: {
- Dimension d = GetStringBoundingBox(this->GetWidget(widget)->widget_data);
- d.width += padding.width + WD_SORTBUTTON_ARROW_WIDTH * 2; // Doubled since the string is centred and it also looks better.
- d.height += padding.height;
- *size = maxdim(*size, d);
- break;
- }
-
- case WID_GL_LIST_VEHICLE:
- this->ComputeGroupInfoSize();
- resize->height = GetVehicleListHeight(this->vli.vtype, this->tiny_step_height);
- size->height = 4 * resize->height;
- break;
-
- case WID_GL_MANAGE_VEHICLES_DROPDOWN: {
- Dimension d = this->GetActionDropdownSize(true, true);
- d.height += padding.height;
- d.width += padding.width;
- *size = maxdim(*size, d);
- break;
- }
- }
- }
-
- /**
- * Some data on this window has become invalid.
- * @param data Information about the changed data.
- * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
- */
- virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
- {
- if (data == 0) {
- /* This needs to be done in command-scope to enforce rebuilding before resorting invalid data */
- this->vehicles.ForceRebuild();
- this->groups.ForceRebuild();
- } else {
- this->vehicles.ForceResort();
- this->groups.ForceResort();
- }
-
- /* Process ID-invalidation in command-scope as well */
- if (this->group_rename != INVALID_GROUP && !Group::IsValidID(this->group_rename)) {
- DeleteWindowByClass(WC_QUERY_STRING);
- this->group_rename = INVALID_GROUP;
- }
-
- if (!(IsAllGroupID(this->vli.index) || IsDefaultGroupID(this->vli.index) || Group::IsValidID(this->vli.index))) {
- this->vli.index = ALL_GROUP;
- HideDropDownMenu(this);
- }
- this->SetDirty();
- }
-
- virtual void SetStringParameters(int widget) const
- {
- switch (widget) {
- case WID_GL_AVAILABLE_VEHICLES:
- SetDParam(0, STR_VEHICLE_LIST_AVAILABLE_TRAINS + this->vli.vtype);
- break;
-
- case WID_GL_CAPTION:
- /* If selected_group == DEFAULT_GROUP || ALL_GROUP, draw the standard caption
- * We list all vehicles or ungrouped vehicles */
- if (IsDefaultGroupID(this->vli.index) || IsAllGroupID(this->vli.index)) {
- SetDParam(0, STR_COMPANY_NAME);
- SetDParam(1, this->vli.company);
- SetDParam(2, this->vehicles.Length());
- SetDParam(3, this->vehicles.Length());
- } else {
- const Group *g = Group::Get(this->vli.index);
-
- SetDParam(0, STR_GROUP_NAME);
- SetDParam(1, g->index);
- SetDParam(2, g->statistics.num_vehicle);
- SetDParam(3, g->statistics.num_vehicle);
- }
- break;
- }
- }
-
- virtual void OnPaint()
- {
- /* If we select the all vehicles, this->list will contain all vehicles of the owner
- * else this->list will contain all vehicles which belong to the selected group */
- this->BuildVehicleList();
- this->SortVehicleList();
-
- this->BuildGroupList(this->owner);
- this->groups.Sort(&GroupNameSorter);
-
- this->group_sb->SetCount(this->groups.Length());
- this->vscroll->SetCount(this->vehicles.Length());
-
- /* The drop down menu is out, *but* it may not be used, retract it. */
- if (this->vehicles.Length() == 0 && this->IsWidgetLowered(WID_GL_MANAGE_VEHICLES_DROPDOWN)) {
- this->RaiseWidget(WID_GL_MANAGE_VEHICLES_DROPDOWN);
- HideDropDownMenu(this);
- }
-
- /* Disable all lists management button when the list is empty */
- this->SetWidgetsDisabledState(this->vehicles.Length() == 0 || _local_company != this->vli.company,
- WID_GL_STOP_ALL,
- WID_GL_START_ALL,
- WID_GL_MANAGE_VEHICLES_DROPDOWN,
- WIDGET_LIST_END);
-
- /* Disable the group specific function when we select the default group or all vehicles */
- this->SetWidgetsDisabledState(IsDefaultGroupID(this->vli.index) || IsAllGroupID(this->vli.index) || _local_company != this->vli.company,
- WID_GL_DELETE_GROUP,
- WID_GL_RENAME_GROUP,
- WID_GL_REPLACE_PROTECTION,
- WIDGET_LIST_END);
-
- /* Disable remaining buttons for non-local companies
- * Needed while changing _local_company, eg. by cheats
- * All procedures (eg. move vehicle to another group)
- * verify, whether you are the owner of the vehicle,
- * so it doesn't have to be disabled
- */
- this->SetWidgetsDisabledState(_local_company != this->vli.company,
- WID_GL_CREATE_GROUP,
- WID_GL_AVAILABLE_VEHICLES,
- WIDGET_LIST_END);
-
- /* If not a default group and the group has replace protection, show an enabled replace sprite. */
- uint16 protect_sprite = SPR_GROUP_REPLACE_OFF_TRAIN;
- if (!IsDefaultGroupID(this->vli.index) && !IsAllGroupID(this->vli.index) && Group::Get(this->vli.index)->replace_protection) protect_sprite = SPR_GROUP_REPLACE_ON_TRAIN;
- this->GetWidget(WID_GL_REPLACE_PROTECTION)->widget_data = protect_sprite + this->vli.vtype;
-
- /* Set text of sort by dropdown */
- this->GetWidget(WID_GL_SORT_BY_DROPDOWN)->widget_data = this->vehicle_sorter_names[this->vehicles.SortType()];
-
- this->DrawWidgets();
- }
-
- virtual void DrawWidget(const Rect &r, int widget) const
- {
- switch (widget) {
- case WID_GL_ALL_VEHICLES:
- DrawGroupInfo(r.top, r.left, r.right, ALL_GROUP);
- break;
-
- case WID_GL_DEFAULT_VEHICLES:
- DrawGroupInfo(r.top, r.left, r.right, DEFAULT_GROUP);
- break;
-
- case WID_GL_LIST_GROUP: {
- int y1 = r.top;
- int max = min(this->group_sb->GetPosition() + this->group_sb->GetCapacity(), this->groups.Length());
- for (int i = this->group_sb->GetPosition(); i < max; ++i) {
- const Group *g = this->groups[i];
-
- assert(g->owner == this->owner);
-
- DrawGroupInfo(y1, r.left, r.right, g->index, g->replace_protection);
-
- y1 += this->tiny_step_height;
- }
- if ((uint)this->group_sb->GetPosition() + this->group_sb->GetCapacity() > this->groups.Length()) {
- DrawGroupInfo(y1, r.left, r.right, NEW_GROUP);
- }
- break;
- }
-
- case WID_GL_SORT_BY_ORDER:
- this->DrawSortButtonState(WID_GL_SORT_BY_ORDER, this->vehicles.IsDescSortOrder() ? SBS_DOWN : SBS_UP);
- break;
-
- case WID_GL_LIST_VEHICLE:
- this->DrawVehicleListItems(this->vehicle_sel, this->resize.step_height, r);
- break;
- }
- }
-
- virtual void OnClick(Point pt, int widget, int click_count)
- {
- switch (widget) {
- case WID_GL_SORT_BY_ORDER: // Flip sorting method ascending/descending
- this->vehicles.ToggleSortOrder();
- this->SetDirty();
- break;
-
- case WID_GL_SORT_BY_DROPDOWN: // Select sorting criteria dropdown menu
- ShowDropDownMenu(this, this->vehicle_sorter_names, this->vehicles.SortType(), WID_GL_SORT_BY_DROPDOWN, 0, (this->vli.vtype == VEH_TRAIN || this->vli.vtype == VEH_ROAD) ? 0 : (1 << 10));
- return;
-
- case WID_GL_ALL_VEHICLES: // All vehicles button
- if (!IsAllGroupID(this->vli.index)) {
- this->vli.index = ALL_GROUP;
- this->vehicles.ForceRebuild();
- this->SetDirty();
- }
- break;
-
- case WID_GL_DEFAULT_VEHICLES: // Ungrouped vehicles button
- if (!IsDefaultGroupID(this->vli.index)) {
- this->vli.index = DEFAULT_GROUP;
- this->vehicles.ForceRebuild();
- this->SetDirty();
- }
- break;
-
- case WID_GL_LIST_GROUP: { // Matrix Group
- uint id_g = this->group_sb->GetScrolledRowFromWidget(pt.y, this, WID_GL_LIST_GROUP, 0, this->tiny_step_height);
- if (id_g >= this->groups.Length()) return;
-
- this->vli.index = this->groups[id_g]->index;
-
- this->vehicles.ForceRebuild();
- this->SetDirty();
- break;
- }
-
- case WID_GL_LIST_VEHICLE: { // Matrix Vehicle
- uint id_v = this->vscroll->GetScrolledRowFromWidget(pt.y, this, WID_GL_LIST_VEHICLE);
- if (id_v >= this->vehicles.Length()) return; // click out of list bound
-
- const Vehicle *v = this->vehicles[id_v];
- if (VehicleClicked(v)) break;
-
- this->vehicle_sel = v->index;
-
- int image = v->GetImage(_current_text_dir == TD_RTL ? DIR_E : DIR_W, EIT_IN_LIST);
- SetObjectToPlaceWnd(image, GetVehiclePalette(v), HT_DRAG, this);
- _cursor.vehchain = true;
-
- this->SetDirty();
- break;
- }
-
- case WID_GL_CREATE_GROUP: { // Create a new group
- DoCommandP(0, this->vli.vtype, 0, CMD_CREATE_GROUP | CMD_MSG(STR_ERROR_GROUP_CAN_T_CREATE), CcCreateGroup);
- break;
- }
-
- case WID_GL_DELETE_GROUP: { // Delete the selected group
- GroupID group = this->vli.index;
- this->vli.index = ALL_GROUP;
-
- DoCommandP(0, group, 0, CMD_DELETE_GROUP | CMD_MSG(STR_ERROR_GROUP_CAN_T_DELETE));
- break;
- }
-
- case WID_GL_RENAME_GROUP: // Rename the selected roup
- this->ShowRenameGroupWindow(this->vli.index, false);
- break;
-
- case WID_GL_AVAILABLE_VEHICLES:
- ShowBuildVehicleWindow(INVALID_TILE, this->vli.vtype);
- break;
-
- case WID_GL_MANAGE_VEHICLES_DROPDOWN: {
- DropDownList *list = this->BuildActionDropdownList(true, Group::IsValidID(this->vli.index));
- ShowDropDownList(this, list, 0, WID_GL_MANAGE_VEHICLES_DROPDOWN);
- break;
- }
-
- case WID_GL_START_ALL:
- case WID_GL_STOP_ALL: { // Start/stop all vehicles of the list
- DoCommandP(0, (1 << 1) | (widget == WID_GL_START_ALL ? (1 << 0) : 0), this->vli.Pack(), CMD_MASS_START_STOP);
- break;
- }
-
- case WID_GL_REPLACE_PROTECTION: {
- const Group *g = Group::GetIfValid(this->vli.index);
- if (g != NULL) {
- DoCommandP(0, this->vli.index, !g->replace_protection, CMD_SET_GROUP_REPLACE_PROTECTION);
- }
- break;
- }
- }
- }
-
- virtual void OnDragDrop(Point pt, int widget)
- {
- switch (widget) {
- case WID_GL_DEFAULT_VEHICLES: // Ungrouped vehicles
- DoCommandP(0, DEFAULT_GROUP, this->vehicle_sel | (_ctrl_pressed ? 1 << 31 : 0), CMD_ADD_VEHICLE_GROUP | CMD_MSG(STR_ERROR_GROUP_CAN_T_ADD_VEHICLE));
-
- this->vehicle_sel = INVALID_VEHICLE;
- this->group_over = INVALID_GROUP;
-
- this->SetDirty();
- break;
-
- case WID_GL_LIST_GROUP: { // Matrix group
- const VehicleID vindex = this->vehicle_sel;
- this->vehicle_sel = INVALID_VEHICLE;
- this->group_over = INVALID_GROUP;
- this->SetDirty();
-
- uint id_g = this->group_sb->GetScrolledRowFromWidget(pt.y, this, WID_GL_LIST_GROUP, 0, this->tiny_step_height);
- GroupID new_g = id_g >= this->groups.Length() ? NEW_GROUP : this->groups[id_g]->index;
-
- DoCommandP(0, new_g, vindex | (_ctrl_pressed ? 1 << 31 : 0), CMD_ADD_VEHICLE_GROUP | CMD_MSG(STR_ERROR_GROUP_CAN_T_ADD_VEHICLE), new_g == NEW_GROUP ? CcAddVehicleNewGroup : NULL);
- break;
- }
-
- case WID_GL_LIST_VEHICLE: { // Matrix vehicle
- const VehicleID vindex = this->vehicle_sel;
- this->vehicle_sel = INVALID_VEHICLE;
- this->group_over = INVALID_GROUP;
- this->SetDirty();
-
- uint id_v = this->vscroll->GetScrolledRowFromWidget(pt.y, this, WID_GL_LIST_VEHICLE);
- if (id_v >= this->vehicles.Length()) return; // click out of list bound
-
- const Vehicle *v = this->vehicles[id_v];
- if (!VehicleClicked(v) && vindex == v->index) {
- ShowVehicleViewWindow(v);
- }
- break;
- }
- }
- _cursor.vehchain = false;
- }
-
- virtual void OnQueryTextFinished(char *str)
- {
- if (str != NULL) DoCommandP(0, this->group_rename, 0, CMD_RENAME_GROUP | CMD_MSG(STR_ERROR_GROUP_CAN_T_RENAME), NULL, str);
- this->group_rename = INVALID_GROUP;
- }
-
- virtual void OnResize()
- {
- this->group_sb->SetCapacityFromWidget(this, WID_GL_LIST_GROUP);
- this->vscroll->SetCapacityFromWidget(this, WID_GL_LIST_VEHICLE);
- }
-
- virtual void OnDropdownSelect(int widget, int index)
- {
- switch (widget) {
- case WID_GL_SORT_BY_DROPDOWN:
- this->vehicles.SetSortType(index);
- break;
-
- case WID_GL_MANAGE_VEHICLES_DROPDOWN:
- assert(this->vehicles.Length() != 0);
-
- switch (index) {
- case ADI_REPLACE: // Replace window
- ShowReplaceGroupVehicleWindow(this->vli.index, this->vli.vtype);
- break;
- case ADI_SERVICE: // Send for servicing
- case ADI_DEPOT: { // Send to Depots
- DoCommandP(0, DEPOT_MASS_SEND | (index == ADI_SERVICE ? DEPOT_SERVICE : 0U), this->vli.Pack(), GetCmdSendToDepot(this->vli.vtype));
- break;
- }
-
- case ADI_ADD_SHARED: // Add shared Vehicles
- assert(Group::IsValidID(this->vli.index));
-
- DoCommandP(0, this->vli.index, this->vli.vtype, CMD_ADD_SHARED_VEHICLE_GROUP | CMD_MSG(STR_ERROR_GROUP_CAN_T_ADD_SHARED_VEHICLE));
- break;
- case ADI_REMOVE_ALL: // Remove all Vehicles from the selected group
- assert(Group::IsValidID(this->vli.index));
-
- DoCommandP(0, this->vli.index, 0, CMD_REMOVE_ALL_VEHICLES_GROUP | CMD_MSG(STR_ERROR_GROUP_CAN_T_REMOVE_ALL_VEHICLES));
- break;
- default: NOT_REACHED();
- }
- break;
-
- default: NOT_REACHED();
- }
-
- this->SetDirty();
- }
-
- virtual void OnTick()
- {
- if (_pause_mode != PM_UNPAUSED) return;
- if (this->groups.NeedResort() || this->vehicles.NeedResort()) {
- this->SetDirty();
- }
- }
-
- virtual void OnPlaceObjectAbort()
- {
- /* abort drag & drop */
- this->vehicle_sel = INVALID_VEHICLE;
- this->DirtyHighlightedGroupWidget();
- this->group_over = INVALID_GROUP;
- this->SetWidgetDirty(WID_GL_LIST_VEHICLE);
- }
-
- virtual void OnMouseDrag(Point pt, int widget)
- {
- if (this->vehicle_sel == INVALID_VEHICLE) return;
-
- /* A vehicle is dragged over... */
- GroupID new_group_over = INVALID_GROUP;
- switch (widget) {
- case WID_GL_DEFAULT_VEHICLES: // ... the 'default' group.
- new_group_over = DEFAULT_GROUP;
- break;
-
- case WID_GL_LIST_GROUP: { // ... the list of custom groups.
- uint id_g = this->group_sb->GetScrolledRowFromWidget(pt.y, this, WID_GL_LIST_GROUP, 0, this->tiny_step_height);
- new_group_over = id_g >= this->groups.Length() ? NEW_GROUP : this->groups[id_g]->index;
- break;
- }
- }
-
- /* Do not highlight when dragging over the current group */
- if (Vehicle::Get(vehicle_sel)->group_id == new_group_over) new_group_over = INVALID_GROUP;
-
- /* Mark widgets as dirty if the group changed. */
- if (new_group_over != this->group_over) {
- this->DirtyHighlightedGroupWidget();
- this->group_over = new_group_over;
- this->DirtyHighlightedGroupWidget();
- }
- }
-
- void ShowRenameGroupWindow(GroupID group, bool empty)
- {
- assert(Group::IsValidID(group));
- this->group_rename = group;
- /* Show empty query for new groups */
- StringID str = STR_EMPTY;
- if (!empty) {
- SetDParam(0, group);
- str = STR_GROUP_NAME;
- }
- ShowQueryString(str, STR_GROUP_RENAME_CAPTION, MAX_LENGTH_GROUP_NAME_CHARS, this, CS_ALPHANUMERAL, QSF_ENABLE_DEFAULT | QSF_LEN_IN_CHARS);
- }
-
- /**
- * Tests whether a given vehicle is selected in the window, and unselects it if necessary.
- * Called when the vehicle is deleted.
- * @param vehicle Vehicle that is going to be deleted
- */
- void UnselectVehicle(VehicleID vehicle)
- {
- if (this->vehicle_sel == vehicle) ResetObjectToPlace();
- }
-};
-
-
-static WindowDesc _other_group_desc(
- WDP_AUTO, "list_groups", 460, 246,
- WC_INVALID, WC_NONE,
- 0,
- _nested_group_widgets, lengthof(_nested_group_widgets)
-);
-
-static WindowDesc _train_group_desc(
- WDP_AUTO, "list_groups_train", 525, 246,
- WC_TRAINS_LIST, WC_NONE,
- 0,
- _nested_group_widgets, lengthof(_nested_group_widgets)
-);
-
-/**
- * Show the group window for the given company and vehicle type.
- * @param company The company to show the window for.
- * @param vehicle_type The type of vehicle to show it for.
- */
-void ShowCompanyGroup(CompanyID company, VehicleType vehicle_type)
-{
- if (!Company::IsValidID(company)) return;
-
- WindowNumber num = VehicleListIdentifier(VL_GROUP_LIST, vehicle_type, company).Pack();
- if (vehicle_type == VEH_TRAIN) {
- AllocateWindowDescFront(&_train_group_desc, num);
- } else {
- _other_group_desc.cls = GetWindowClassForVehicleType(vehicle_type);
- AllocateWindowDescFront(&_other_group_desc, num);
- }
-}
-
-/**
- * Finds a group list window determined by vehicle type and owner
- * @param vt vehicle type
- * @param owner owner of groups
- * @return pointer to VehicleGroupWindow, NULL if not found
- */
-static inline VehicleGroupWindow *FindVehicleGroupWindow(VehicleType vt, Owner owner)
-{
- return (VehicleGroupWindow *)FindWindowById(GetWindowClassForVehicleType(vt), VehicleListIdentifier(VL_GROUP_LIST, vt, owner).Pack());
-}
-
-/**
- * Opens a 'Rename group' window for newly created group
- * @param success did command succeed?
- * @param tile unused
- * @param p1 vehicle type
- * @param p2 unused
- * @see CmdCreateGroup
- */
-void CcCreateGroup(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
-{
- if (result.Failed()) return;
- assert(p1 <= VEH_AIRCRAFT);
-
- VehicleGroupWindow *w = FindVehicleGroupWindow((VehicleType)p1, _current_company);
- if (w != NULL) w->ShowRenameGroupWindow(_new_group_id, true);
-}
-
-/**
- * Open rename window after adding a vehicle to a new group via drag and drop.
- * @param success Did command succeed?
- * @param tile Unused.
- * @param p1 Unused.
- * @param p2 Bit 0-19: Vehicle ID.
- */
-void CcAddVehicleNewGroup(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
-{
- if (result.Failed()) return;
- assert(Vehicle::IsValidID(GB(p2, 0, 20)));
-
- CcCreateGroup(result, 0, Vehicle::Get(GB(p2, 0, 20))->type, 0);
-}
-
-/**
- * Removes the highlight of a vehicle in a group window
- * @param *v Vehicle to remove all highlights from
- */
-void DeleteGroupHighlightOfVehicle(const Vehicle *v)
-{
- /* If we haven't got any vehicles on the mouse pointer, we haven't got any highlighted in any group windows either
- * If that is the case, we can skip looping though the windows and save time
- */
- if (_special_mouse_mode != WSM_DRAGDROP) return;
-
- VehicleGroupWindow *w = FindVehicleGroupWindow(v->type, v->owner);
- if (w != NULL) w->UnselectVehicle(v->index);
-}
diff --git a/src/industry_gui.cpp.orig b/src/industry_gui.cpp.orig
deleted file mode 100644
index ca39e8f1cb..0000000000
--- a/src/industry_gui.cpp.orig
+++ /dev/null
@@ -1,2715 +0,0 @@
-/* $Id$ */
-
-/*
- * This file is part of OpenTTD.
- * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
- * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see .
- */
-
-/** @file industry_gui.cpp GUIs related to industries. */
-
-#include "stdafx.h"
-#include "error.h"
-#include "gui.h"
-#include "settings_gui.h"
-#include "sound_func.h"
-#include "window_func.h"
-#include "textbuf_gui.h"
-#include "command_func.h"
-#include "viewport_func.h"
-#include "industry.h"
-#include "town.h"
-#include "cheat_type.h"
-#include "newgrf_industries.h"
-#include "newgrf_text.h"
-#include "newgrf_debug.h"
-#include "strings_func.h"
-#include "company_func.h"
-#include "tilehighlight_func.h"
-#include "string_func.h"
-#include "sortlist_type.h"
-#include "widgets/dropdown_func.h"
-#include "company_base.h"
-#include "core/geometry_func.hpp"
-#include "core/random_func.hpp"
-#include "core/backup_type.hpp"
-#include "genworld.h"
-#include "smallmap_gui.h"
-#include "widgets/dropdown_type.h"
-#include "widgets/industry_widget.h"
-
-#include "table/strings.h"
-
-bool _ignore_restrictions;
-uint64 _displayed_industries; ///< Communication from the industry chain window to the smallmap window about what industries to display.
-
-assert_compile(NUM_INDUSTRYTYPES <= 64); // Make sure all industry types fit in _displayed_industries.
-
-/** Cargo suffix type (for which window is it requested) */
-enum CargoSuffixType {
- CST_FUND, ///< Fund-industry window
- CST_VIEW, ///< View-industry window
- CST_DIR, ///< Industry-directory window
-};
-
-static void ShowIndustryCargoesWindow(IndustryType id);
-
-/**
- * Gets the string to display after the cargo name (using callback 37)
- * @param cargo the cargo for which the suffix is requested
- * - 00 - first accepted cargo type
- * - 01 - second accepted cargo type
- * - 02 - third accepted cargo type
- * - 03 - first produced cargo type
- * - 04 - second produced cargo type
- * @param cst the cargo suffix type (for which window is it requested). @see CargoSuffixType
- * @param ind the industry (NULL if in fund window)
- * @param ind_type the industry type
- * @param indspec the industry spec
- * @param suffix is filled with the string to display
- * @param suffix_last lastof(suffix)
- */
-static void GetCargoSuffix(uint cargo, CargoSuffixType cst, const Industry *ind, IndustryType ind_type, const IndustrySpec *indspec, char *suffix, const char *suffix_last)
-{
- suffix[0] = '\0';
- if (HasBit(indspec->callback_mask, CBM_IND_CARGO_SUFFIX)) {
- uint16 callback = GetIndustryCallback(CBID_INDUSTRY_CARGO_SUFFIX, 0, (cst << 8) | cargo, const_cast(ind), ind_type, (cst != CST_FUND) ? ind->location.tile : INVALID_TILE);
- if (callback == CALLBACK_FAILED || callback == 0x400) return;
- if (callback > 0x400) {
- ErrorUnknownCallbackResult(indspec->grf_prop.grffile->grfid, CBID_INDUSTRY_CARGO_SUFFIX, callback);
- } else if (indspec->grf_prop.grffile->grf_version >= 8 || GB(callback, 0, 8) != 0xFF) {
- StartTextRefStackUsage(indspec->grf_prop.grffile, 6);
- GetString(suffix, GetGRFStringID(indspec->grf_prop.grffile->grfid, 0xD000 + callback), suffix_last);
- StopTextRefStackUsage();
- }
- }
-}
-
-/**
- * Gets all strings to display after the cargoes of industries (using callback 37)
- * @param cb_offset The offset for the cargo used in cb37, 0 for accepted cargoes, 3 for produced cargoes
- * @param cst the cargo suffix type (for which window is it requested). @see CargoSuffixType
- * @param ind the industry (NULL if in fund window)
- * @param ind_type the industry type
- * @param indspec the industry spec
- * @param cargoes array with cargotypes. for CT_INVALID no suffix will be determined
- * @param suffixes is filled with the suffixes
- */
-template
-static inline void GetAllCargoSuffixes(uint cb_offset, CargoSuffixType cst, const Industry *ind, IndustryType ind_type, const IndustrySpec *indspec, const TC &cargoes, TS &suffixes)
-{
- assert_compile(lengthof(cargoes) <= lengthof(suffixes));
- for (uint j = 0; j < lengthof(cargoes); j++) {
- if (cargoes[j] != CT_INVALID) {
- GetCargoSuffix(cb_offset + j, cst, ind, ind_type, indspec, suffixes[j], lastof(suffixes[j]));
- } else {
- suffixes[j][0] = '\0';
- }
- }
-}
-
-IndustryType _sorted_industry_types[NUM_INDUSTRYTYPES]; ///< Industry types sorted by name.
-
-/** Sort industry types by their name. */
-static int CDECL IndustryTypeNameSorter(const IndustryType *a, const IndustryType *b)
-{
- static char industry_name[2][64];
-
- const IndustrySpec *indsp1 = GetIndustrySpec(*a);
- SetDParam(0, indsp1->name);
- GetString(industry_name[0], STR_JUST_STRING, lastof(industry_name[0]));
-
- const IndustrySpec *indsp2 = GetIndustrySpec(*b);
- SetDParam(0, indsp2->name);
- GetString(industry_name[1], STR_JUST_STRING, lastof(industry_name[1]));
-
- int r = strnatcmp(industry_name[0], industry_name[1]); // Sort by name (natural sorting).
-
- /* If the names are equal, sort by industry type. */
- return (r != 0) ? r : (*a - *b);
-}
-
-/**
- * Initialize the list of sorted industry types.
- */
-void SortIndustryTypes()
-{
- /* Add each industry type to the list. */
- for (IndustryType i = 0; i < NUM_INDUSTRYTYPES; i++) {
- _sorted_industry_types[i] = i;
- }
-
- /* Sort industry types by name. */
- QSortT(_sorted_industry_types, NUM_INDUSTRYTYPES, &IndustryTypeNameSorter);
-}
-
-/**
- * Command callback. In case of failure to build an industry, show an error message.
- * @param result Result of the command.
- * @param tile Tile where the industry is placed.
- * @param p1 Additional data of the #CMD_BUILD_INDUSTRY command.
- * @param p2 Additional data of the #CMD_BUILD_INDUSTRY command.
- */
-void CcBuildIndustry(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
-{
- if (result.Succeeded()) return;
-
- uint8 indtype = GB(p1, 0, 8);
- if (indtype < NUM_INDUSTRYTYPES) {
- const IndustrySpec *indsp = GetIndustrySpec(indtype);
- if (indsp->enabled) {
- SetDParam(0, indsp->name);
- ShowErrorMessage(STR_ERROR_CAN_T_BUILD_HERE, result.GetErrorMessage(), WL_INFO, TileX(tile) * TILE_SIZE, TileY(tile) * TILE_SIZE);
- }
- }
-}
-
-static const NWidgetPart _nested_build_industry_widgets[] = {
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
- NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_FUND_INDUSTRY_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
- NWidget(WWT_SHADEBOX, COLOUR_DARK_GREEN),
- NWidget(WWT_DEFSIZEBOX, COLOUR_DARK_GREEN),
- NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN),
- EndContainer(),
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_MATRIX, COLOUR_DARK_GREEN, WID_DPI_MATRIX_WIDGET), SetMatrixDataTip(1, 0, STR_FUND_INDUSTRY_SELECTION_TOOLTIP), SetFill(1, 0), SetResize(1, 1), SetScrollbar(WID_DPI_SCROLLBAR),
- NWidget(NWID_VSCROLLBAR, COLOUR_DARK_GREEN, WID_DPI_SCROLLBAR),
- EndContainer(),
- NWidget(WWT_PANEL, COLOUR_DARK_GREEN, WID_DPI_INFOPANEL), SetResize(1, 0),
- EndContainer(),
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_TEXTBTN, COLOUR_DARK_GREEN, WID_DPI_DISPLAY_WIDGET), SetFill(1, 0), SetResize(1, 0),
- SetDataTip(STR_INDUSTRY_DISPLAY_CHAIN, STR_INDUSTRY_DISPLAY_CHAIN_TOOLTIP),
- NWidget(WWT_TEXTBTN, COLOUR_DARK_GREEN, WID_DPI_FUND_WIDGET), SetFill(1, 0), SetResize(1, 0), SetDataTip(STR_JUST_STRING, STR_NULL),
- NWidget(WWT_RESIZEBOX, COLOUR_DARK_GREEN),
- EndContainer(),
-};
-
-/** Window definition of the dynamic place industries gui */
-static WindowDesc _build_industry_desc(
- WDP_AUTO, "build_industry", 170, 212,
- WC_BUILD_INDUSTRY, WC_NONE,
- WDF_CONSTRUCTION,
- _nested_build_industry_widgets, lengthof(_nested_build_industry_widgets)
-);
-
-/** Build (fund or prospect) a new industry, */
-class BuildIndustryWindow : public Window {
- int selected_index; ///< index of the element in the matrix
- IndustryType selected_type; ///< industry corresponding to the above index
- uint16 callback_timer; ///< timer counter for callback eventual verification
- bool timer_enabled; ///< timer can be used
- uint16 count; ///< How many industries are loaded
- IndustryType index[NUM_INDUSTRYTYPES + 1]; ///< Type of industry, in the order it was loaded
- bool enabled[NUM_INDUSTRYTYPES + 1]; ///< availability state, coming from CBID_INDUSTRY_PROBABILITY (if ever)
- Scrollbar *vscroll;
-
- /** The offset for the text in the matrix. */
- static const int MATRIX_TEXT_OFFSET = 17;
-
- void SetupArrays()
- {
- this->count = 0;
-
- for (uint i = 0; i < lengthof(this->index); i++) {
- this->index[i] = INVALID_INDUSTRYTYPE;
- this->enabled[i] = false;
- }
-
- if (_game_mode == GM_EDITOR) { // give room for the Many Random "button"
- this->index[this->count] = INVALID_INDUSTRYTYPE;
- this->enabled[this->count] = true;
- this->count++;
- this->timer_enabled = false;
- }
- /* Fill the arrays with industries.
- * The tests performed after the enabled allow to load the industries
- * In the same way they are inserted by grf (if any)
- */
- for (uint8 i = 0; i < NUM_INDUSTRYTYPES; i++) {
- IndustryType ind = _sorted_industry_types[i];
- const IndustrySpec *indsp = GetIndustrySpec(ind);
- if (indsp->enabled) {
- /* Rule is that editor mode loads all industries.
- * In game mode, all non raw industries are loaded too
- * and raw ones are loaded only when setting allows it */
- if (_game_mode != GM_EDITOR && indsp->IsRawIndustry() && _settings_game.construction.raw_industry_construction == 0) {
- /* Unselect if the industry is no longer in the list */
- if (this->selected_type == ind) this->selected_index = -1;
- continue;
- }
- this->index[this->count] = ind;
- this->enabled[this->count] = (_game_mode == GM_EDITOR) || GetIndustryProbabilityCallback(ind, IACT_USERCREATION, 1) > 0;
- /* Keep the selection to the correct line */
- if (this->selected_type == ind) this->selected_index = this->count;
- this->count++;
- }
- }
-
- /* first industry type is selected if the current selection is invalid.
- * I'll be damned if there are none available ;) */
- if (this->selected_index == -1) {
- this->selected_index = 0;
- this->selected_type = this->index[0];
- }
-
- this->vscroll->SetCount(this->count);
- }
-
- /** Update status of the fund and display-chain widgets. */
- void SetButtons()
- {
- this->SetWidgetDisabledState(WID_DPI_FUND_WIDGET, this->selected_type != INVALID_INDUSTRYTYPE && !this->enabled[this->selected_index]);
- this->SetWidgetDisabledState(WID_DPI_DISPLAY_WIDGET, this->selected_type == INVALID_INDUSTRYTYPE && this->enabled[this->selected_index]);
- }
-
-public:
- BuildIndustryWindow() : Window(&_build_industry_desc)
- {
- this->timer_enabled = _loaded_newgrf_features.has_newindustries;
-
- this->selected_index = -1;
- this->selected_type = INVALID_INDUSTRYTYPE;
-
- this->callback_timer = DAY_TICKS;
-
- this->CreateNestedTree();
- this->vscroll = this->GetScrollbar(WID_DPI_SCROLLBAR);
- this->FinishInitNested(0);
-
- this->SetButtons();
- }
-
- virtual void OnInit()
- {
- this->SetupArrays();
- }
-
- virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
- {
- switch (widget) {
- case WID_DPI_MATRIX_WIDGET: {
- Dimension d = GetStringBoundingBox(STR_FUND_INDUSTRY_MANY_RANDOM_INDUSTRIES);
- for (byte i = 0; i < this->count; i++) {
- if (this->index[i] == INVALID_INDUSTRYTYPE) continue;
- d = maxdim(d, GetStringBoundingBox(GetIndustrySpec(this->index[i])->name));
- }
- resize->height = GetMinSizing(NWST_STEP, FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM);
- d.width += MATRIX_TEXT_OFFSET + padding.width;
- d.height = 5 * resize->height;
- *size = maxdim(*size, d);
- break;
- }
-
- case WID_DPI_INFOPANEL: {
- /* Extra line for cost outside of editor + extra lines for 'extra' information for NewGRFs. */
- int height = 2 + (_game_mode == GM_EDITOR ? 0 : 1) + (_loaded_newgrf_features.has_newindustries ? 4 : 0);
- Dimension d = {0, 0};
- for (byte i = 0; i < this->count; i++) {
- if (this->index[i] == INVALID_INDUSTRYTYPE) continue;
-
- const IndustrySpec *indsp = GetIndustrySpec(this->index[i]);
-
- char cargo_suffix[3][512];
- GetAllCargoSuffixes(0, CST_FUND, NULL, this->index[i], indsp, indsp->accepts_cargo, cargo_suffix);
- StringID str = STR_INDUSTRY_VIEW_REQUIRES_CARGO;
- byte p = 0;
- SetDParam(0, STR_JUST_NOTHING);
- SetDParamStr(1, "");
- for (byte j = 0; j < lengthof(indsp->accepts_cargo); j++) {
- if (indsp->accepts_cargo[j] == CT_INVALID) continue;
- if (p > 0) str++;
- SetDParam(p++, CargoSpec::Get(indsp->accepts_cargo[j])->name);
- SetDParamStr(p++, cargo_suffix[j]);
- }
- d = maxdim(d, GetStringBoundingBox(str));
-
- /* Draw the produced cargoes, if any. Otherwise, will print "Nothing". */
- GetAllCargoSuffixes(3, CST_FUND, NULL, this->index[i], indsp, indsp->produced_cargo, cargo_suffix);
- str = STR_INDUSTRY_VIEW_PRODUCES_CARGO;
- p = 0;
- SetDParam(0, STR_JUST_NOTHING);
- SetDParamStr(1, "");
- for (byte j = 0; j < lengthof(indsp->produced_cargo); j++) {
- if (indsp->produced_cargo[j] == CT_INVALID) continue;
- if (p > 0) str++;
- SetDParam(p++, CargoSpec::Get(indsp->produced_cargo[j])->name);
- SetDParamStr(p++, cargo_suffix[j]);
- }
- d = maxdim(d, GetStringBoundingBox(str));
- }
-
- /* Set it to something more sane :) */
- size->height = height * FONT_HEIGHT_NORMAL + WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM;
- size->width = d.width + WD_FRAMERECT_LEFT + WD_FRAMERECT_RIGHT;
- break;
- }
-
- case WID_DPI_FUND_WIDGET: {
- Dimension d = GetStringBoundingBox(STR_FUND_INDUSTRY_BUILD_NEW_INDUSTRY);
- d = maxdim(d, GetStringBoundingBox(STR_FUND_INDUSTRY_PROSPECT_NEW_INDUSTRY));
- d = maxdim(d, GetStringBoundingBox(STR_FUND_INDUSTRY_FUND_NEW_INDUSTRY));
- d.width += padding.width;
- d.height += padding.height;
- *size = maxdim(*size, d);
- break;
- }
- }
- }
-
- virtual void SetStringParameters(int widget) const
- {
- switch (widget) {
- case WID_DPI_FUND_WIDGET:
- /* Raw industries might be prospected. Show this fact by changing the string
- * In Editor, you just build, while ingame, or you fund or you prospect */
- if (_game_mode == GM_EDITOR) {
- /* We've chosen many random industries but no industries have been specified */
- SetDParam(0, STR_FUND_INDUSTRY_BUILD_NEW_INDUSTRY);
- } else {
- const IndustrySpec *indsp = GetIndustrySpec(this->index[this->selected_index]);
- SetDParam(0, (_settings_game.construction.raw_industry_construction == 2 && indsp->IsRawIndustry()) ? STR_FUND_INDUSTRY_PROSPECT_NEW_INDUSTRY : STR_FUND_INDUSTRY_FUND_NEW_INDUSTRY);
- }
- break;
- }
- }
-
- virtual void DrawWidget(const Rect &r, int widget) const
- {
- switch (widget) {
- case WID_DPI_MATRIX_WIDGET: {
- uint text_left, text_right, icon_left, icon_right;
- if (_current_text_dir == TD_RTL) {
- icon_right = r.right - WD_MATRIX_RIGHT;
- icon_left = icon_right - 10;
- text_right = icon_right - BuildIndustryWindow::MATRIX_TEXT_OFFSET;
- text_left = r.left + WD_MATRIX_LEFT;
- } else {
- icon_left = r.left + WD_MATRIX_LEFT;
- icon_right = icon_left + 10;
- text_left = icon_left + BuildIndustryWindow::MATRIX_TEXT_OFFSET;
- text_right = r.right - WD_MATRIX_RIGHT;
- }
-
- for (byte i = 0; i < this->vscroll->GetCapacity() && i + this->vscroll->GetPosition() < this->count; i++) {
- int y = r.top + WD_MATRIX_TOP + i * this->resize.step_height;
- bool selected = this->selected_index == i + this->vscroll->GetPosition();
-
- if (this->index[i + this->vscroll->GetPosition()] == INVALID_INDUSTRYTYPE) {
- DrawString(text_left, text_right, y, STR_FUND_INDUSTRY_MANY_RANDOM_INDUSTRIES, selected ? TC_WHITE : TC_ORANGE);
- continue;
- }
- const IndustrySpec *indsp = GetIndustrySpec(this->index[i + this->vscroll->GetPosition()]);
-
- /* Draw the name of the industry in white is selected, otherwise, in orange */
- DrawString(text_left, text_right, y, indsp->name, selected ? TC_WHITE : TC_ORANGE);
- GfxFillRect(icon_left, y + 1, icon_right, y + 7, selected ? PC_WHITE : PC_BLACK);
- GfxFillRect(icon_left + 1, y + 2, icon_right - 1, y + 6, indsp->map_colour);
- }
- break;
- }
-
- case WID_DPI_INFOPANEL: {
- int y = r.top + WD_FRAMERECT_TOP;
- int bottom = r.bottom - WD_FRAMERECT_BOTTOM;
- int left = r.left + WD_FRAMERECT_LEFT;
- int right = r.right - WD_FRAMERECT_RIGHT;
-
- if (this->selected_type == INVALID_INDUSTRYTYPE) {
- DrawStringMultiLine(left, right, y, bottom, STR_FUND_INDUSTRY_MANY_RANDOM_INDUSTRIES_TOOLTIP);
- break;
- }
-
- const IndustrySpec *indsp = GetIndustrySpec(this->selected_type);
-
- if (_game_mode != GM_EDITOR) {
- SetDParam(0, indsp->GetConstructionCost());
- DrawString(left, right, y, STR_FUND_INDUSTRY_INDUSTRY_BUILD_COST);
- y += FONT_HEIGHT_NORMAL;
- }
-
- /* Draw the accepted cargoes, if any. Otherwise, will print "Nothing". */
- char cargo_suffix[3][512];
- GetAllCargoSuffixes(0, CST_FUND, NULL, this->selected_type, indsp, indsp->accepts_cargo, cargo_suffix);
- StringID str = STR_INDUSTRY_VIEW_REQUIRES_CARGO;
- byte p = 0;
- SetDParam(0, STR_JUST_NOTHING);
- SetDParamStr(1, "");
- for (byte j = 0; j < lengthof(indsp->accepts_cargo); j++) {
- if (indsp->accepts_cargo[j] == CT_INVALID) continue;
- if (p > 0) str++;
- SetDParam(p++, CargoSpec::Get(indsp->accepts_cargo[j])->name);
- SetDParamStr(p++, cargo_suffix[j]);
- }
- DrawString(left, right, y, str);
- y += FONT_HEIGHT_NORMAL;
-
- /* Draw the produced cargoes, if any. Otherwise, will print "Nothing". */
- GetAllCargoSuffixes(3, CST_FUND, NULL, this->selected_type, indsp, indsp->produced_cargo, cargo_suffix);
- str = STR_INDUSTRY_VIEW_PRODUCES_CARGO;
- p = 0;
- SetDParam(0, STR_JUST_NOTHING);
- SetDParamStr(1, "");
- for (byte j = 0; j < lengthof(indsp->produced_cargo); j++) {
- if (indsp->produced_cargo[j] == CT_INVALID) continue;
- if (p > 0) str++;
- SetDParam(p++, CargoSpec::Get(indsp->produced_cargo[j])->name);
- SetDParamStr(p++, cargo_suffix[j]);
- }
- DrawString(left, right, y, str);
- y += FONT_HEIGHT_NORMAL;
-
- /* Get the additional purchase info text, if it has not already been queried. */
- str = STR_NULL;
- if (HasBit(indsp->callback_mask, CBM_IND_FUND_MORE_TEXT)) {
- uint16 callback_res = GetIndustryCallback(CBID_INDUSTRY_FUND_MORE_TEXT, 0, 0, NULL, this->selected_type, INVALID_TILE);
- if (callback_res != CALLBACK_FAILED && callback_res != 0x400) {
- if (callback_res > 0x400) {
- ErrorUnknownCallbackResult(indsp->grf_prop.grffile->grfid, CBID_INDUSTRY_FUND_MORE_TEXT, callback_res);
- } else {
- str = GetGRFStringID(indsp->grf_prop.grffile->grfid, 0xD000 + callback_res); // No. here's the new string
- if (str != STR_UNDEFINED) {
- StartTextRefStackUsage(indsp->grf_prop.grffile, 6);
- DrawStringMultiLine(left, right, y, bottom, str, TC_YELLOW);
- StopTextRefStackUsage();
- }
- }
- }
- }
- break;
- }
- }
- }
-
- virtual void OnClick(Point pt, int widget, int click_count)
- {
- switch (widget) {
- case WID_DPI_MATRIX_WIDGET: {
- int y = this->vscroll->GetScrolledRowFromWidget(pt.y, this, WID_DPI_MATRIX_WIDGET);
- if (y < this->count) { // Is it within the boundaries of available data?
- this->selected_index = y;
- this->selected_type = this->index[y];
- const IndustrySpec *indsp = (this->selected_type == INVALID_INDUSTRYTYPE) ? NULL : GetIndustrySpec(this->selected_type);
-
- this->SetDirty();
-
- if (_thd.GetCallbackWnd() == this &&
- ((_game_mode != GM_EDITOR && _settings_game.construction.raw_industry_construction == 2 && indsp != NULL && indsp->IsRawIndustry()) ||
- this->selected_type == INVALID_INDUSTRYTYPE ||
- !this->enabled[this->selected_index])) {
- /* Reset the button state if going to prospecting or "build many industries" */
- this->RaiseButtons();
- ResetObjectToPlace();
- }
-
- this->SetButtons();
- if (this->enabled[this->selected_index] && click_count > 1) this->OnClick(pt, WID_DPI_FUND_WIDGET, 1);
- }
- break;
- }
-
- case WID_DPI_DISPLAY_WIDGET:
- if (this->selected_type != INVALID_INDUSTRYTYPE) ShowIndustryCargoesWindow(this->selected_type);
- break;
-
- case WID_DPI_FUND_WIDGET: {
- if (this->selected_type == INVALID_INDUSTRYTYPE) {
- this->HandleButtonClick(WID_DPI_FUND_WIDGET);
-
- if (Town::GetNumItems() == 0) {
- ShowErrorMessage(STR_ERROR_CAN_T_GENERATE_INDUSTRIES, STR_ERROR_MUST_FOUND_TOWN_FIRST, WL_INFO);
- } else {
- extern void GenerateIndustries();
- _generating_world = true;
- GenerateIndustries();
- _generating_world = false;
- }
- } else if (_game_mode != GM_EDITOR && _settings_game.construction.raw_industry_construction == 2 && GetIndustrySpec(this->selected_type)->IsRawIndustry()) {
- DoCommandP(0, this->selected_type, InteractiveRandom(), CMD_BUILD_INDUSTRY | CMD_MSG(STR_ERROR_CAN_T_CONSTRUCT_THIS_INDUSTRY));
- this->HandleButtonClick(WID_DPI_FUND_WIDGET);
- } else {
- HandlePlacePushButton(this, WID_DPI_FUND_WIDGET, SPR_CURSOR_INDUSTRY, HT_RECT);
- }
- break;
- }
- }
- }
-
- virtual void OnResize()
- {
- /* Adjust the number of items in the matrix depending of the resize */
- this->vscroll->SetCapacityFromWidget(this, WID_DPI_MATRIX_WIDGET);
- }
-
- virtual void OnPlaceObject(Point pt, TileIndex tile)
- {
- bool success = true;
- /* We do not need to protect ourselves against "Random Many Industries" in this mode */
- const IndustrySpec *indsp = GetIndustrySpec(this->selected_type);
- uint32 seed = InteractiveRandom();
-
- if (_game_mode == GM_EDITOR) {
- /* Show error if no town exists at all */
- if (Town::GetNumItems() == 0) {
- SetDParam(0, indsp->name);
- ShowErrorMessage(STR_ERROR_CAN_T_BUILD_HERE, STR_ERROR_MUST_FOUND_TOWN_FIRST, WL_INFO, pt.x, pt.y);
- return;
- }
-
- Backup cur_company(_current_company, OWNER_NONE, FILE_LINE);
- _generating_world = true;
- _ignore_restrictions = true;
-
- DoCommandP(tile, (InteractiveRandomRange(indsp->num_table) << 8) | this->selected_type, seed,
- CMD_BUILD_INDUSTRY | CMD_MSG(STR_ERROR_CAN_T_CONSTRUCT_THIS_INDUSTRY), &CcBuildIndustry);
-
- cur_company.Restore();
- _ignore_restrictions = false;
- _generating_world = false;
- } else {
- success = DoCommandP(tile, (InteractiveRandomRange(indsp->num_table) << 8) | this->selected_type, seed, CMD_BUILD_INDUSTRY | CMD_MSG(STR_ERROR_CAN_T_CONSTRUCT_THIS_INDUSTRY));
- }
-
- /* If an industry has been built, just reset the cursor and the system */
- if (success && !_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
- }
-
- virtual void OnTick()
- {
- if (_pause_mode != PM_UNPAUSED) return;
- if (!this->timer_enabled) return;
- if (--this->callback_timer == 0) {
- /* We have just passed another day.
- * See if we need to update availability of currently selected industry */
- this->callback_timer = DAY_TICKS; // restart counter
-
- const IndustrySpec *indsp = GetIndustrySpec(this->selected_type);
-
- if (indsp->enabled) {
- bool call_back_result = GetIndustryProbabilityCallback(this->selected_type, IACT_USERCREATION, 1) > 0;
-
- /* Only if result does match the previous state would it require a redraw. */
- if (call_back_result != this->enabled[this->selected_index]) {
- this->enabled[this->selected_index] = call_back_result;
- this->SetButtons();
- this->SetDirty();
- }
- }
- }
- }
-
- virtual void OnTimeout()
- {
- this->RaiseButtons();
- }
-
- virtual void OnPlaceObjectAbort()
- {
- this->RaiseButtons();
- }
-
- /**
- * Some data on this window has become invalid.
- * @param data Information about the changed data.
- * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
- */
- virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
- {
- if (!gui_scope) return;
- this->SetupArrays();
-
- const IndustrySpec *indsp = (this->selected_type == INVALID_INDUSTRYTYPE) ? NULL : GetIndustrySpec(this->selected_type);
- if (indsp == NULL) this->enabled[this->selected_index] = _settings_game.difficulty.industry_density != ID_FUND_ONLY;
- this->SetButtons();
- }
-};
-
-void ShowBuildIndustryWindow()
-{
- if (_game_mode != GM_EDITOR && !Company::IsValidID(_local_company)) return;
- if (BringWindowToFrontById(WC_BUILD_INDUSTRY, 0)) return;
- new BuildIndustryWindow();
-}
-
-static void UpdateIndustryProduction(Industry *i);
-
-static inline bool IsProductionAlterable(const Industry *i)
-{
- const IndustrySpec *is = GetIndustrySpec(i->type);
- return ((_game_mode == GM_EDITOR || _cheats.setup_prod.value) &&
- (is->production_rate[0] != 0 || is->production_rate[1] != 0 || is->IsRawIndustry()));
-}
-
-class IndustryViewWindow : public Window
-{
- /** Modes for changing production */
- enum Editability {
- EA_NONE, ///< Not alterable
- EA_MULTIPLIER, ///< Allow changing the production multiplier
- EA_RATE, ///< Allow changing the production rates
- };
-
- /** Specific lines in the info panel */
- enum InfoLine {
- IL_NONE, ///< No line
- IL_MULTIPLIER, ///< Production multiplier
- IL_RATE1, ///< Production rate of cargo 1
- IL_RATE2, ///< Production rate of cargo 2
- };
-
- Editability editable; ///< Mode for changing production
- InfoLine editbox_line; ///< The line clicked to open the edit box
- InfoLine clicked_line; ///< The line of the button that has been clicked
- byte clicked_button; ///< The button that has been clicked (to raise)
- int production_offset_y; ///< The offset of the production texts/buttons
- int info_height; ///< Height needed for the #WID_IV_INFO panel
-
-public:
- IndustryViewWindow(WindowDesc *desc, WindowNumber window_number) : Window(desc)
- {
- this->flags |= WF_DISABLE_VP_SCROLL;
- this->editbox_line = IL_NONE;
- this->clicked_line = IL_NONE;
- this->clicked_button = 0;
- this->info_height = WD_FRAMERECT_TOP + 2 * FONT_HEIGHT_NORMAL + WD_FRAMERECT_BOTTOM + 1; // Info panel has at least two lines text.
-
- this->InitNested(window_number);
- NWidgetViewport *nvp = this->GetWidget(WID_IV_VIEWPORT);
- nvp->InitializeViewport(this, Industry::Get(window_number)->location.GetCenterTile(), ZOOM_LVL_INDUSTRY);
-
- this->InvalidateData();
- }
-
- virtual void OnPaint()
- {
- this->DrawWidgets();
-
- if (this->IsShaded()) return; // Don't draw anything when the window is shaded.
-
- NWidgetBase *nwi = this->GetWidget(WID_IV_INFO);
- uint expected = this->DrawInfo(nwi->pos_x, nwi->pos_x + nwi->current_x - 1, nwi->pos_y) - nwi->pos_y;
- if (expected > nwi->current_y - 1) {
- this->info_height = expected + 1;
- this->ReInit();
- return;
- }
- }
-
- /**
- * Draw the text in the #WID_IV_INFO panel.
- * @param left Left edge of the panel.
- * @param right Right edge of the panel.
- * @param top Top edge of the panel.
- * @return Expected position of the bottom edge of the panel.
- */
- int DrawInfo(uint left, uint right, uint top)
- {
- Industry *i = Industry::Get(this->window_number);
- const IndustrySpec *ind = GetIndustrySpec(i->type);
- int y = top + WD_FRAMERECT_TOP;
- bool first = true;
- bool has_accept = false;
- char cargo_suffix[3][512];
-
- if (i->prod_level == PRODLEVEL_CLOSURE) {
- DrawString(left + WD_FRAMERECT_LEFT, right - WD_FRAMERECT_RIGHT, y, STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE);
- y += 2 * FONT_HEIGHT_NORMAL;
- }
-
- if (HasBit(ind->callback_mask, CBM_IND_PRODUCTION_CARGO_ARRIVAL) || HasBit(ind->callback_mask, CBM_IND_PRODUCTION_256_TICKS)) {
- GetAllCargoSuffixes(0, CST_VIEW, i, i->type, ind, i->accepts_cargo, cargo_suffix);
- for (byte j = 0; j < lengthof(i->accepts_cargo); j++) {
- if (i->accepts_cargo[j] == CT_INVALID) continue;
- has_accept = true;
- if (first) {
- DrawString(left + WD_FRAMERECT_LEFT, right - WD_FRAMERECT_RIGHT, y, STR_INDUSTRY_VIEW_WAITING_FOR_PROCESSING);
- y += FONT_HEIGHT_NORMAL;
- first = false;
- }
- SetDParam(0, i->accepts_cargo[j]);
- SetDParam(1, i->incoming_cargo_waiting[j]);
- SetDParamStr(2, cargo_suffix[j]);
- DrawString(left + WD_FRAMETEXT_LEFT, right - WD_FRAMERECT_RIGHT, y, STR_INDUSTRY_VIEW_WAITING_STOCKPILE_CARGO);
- y += FONT_HEIGHT_NORMAL;
- }
- } else {
- GetAllCargoSuffixes(0, CST_VIEW, i, i->type, ind, i->accepts_cargo, cargo_suffix);
- StringID str = STR_INDUSTRY_VIEW_REQUIRES_CARGO;
- byte p = 0;
- for (byte j = 0; j < lengthof(i->accepts_cargo); j++) {
- if (i->accepts_cargo[j] == CT_INVALID) continue;
- has_accept = true;
- if (p > 0) str++;
- SetDParam(p++, CargoSpec::Get(i->accepts_cargo[j])->name);
- SetDParamStr(p++, cargo_suffix[j]);
- }
- if (has_accept) {
- DrawString(left + WD_FRAMERECT_LEFT, right - WD_FRAMERECT_RIGHT, y, str);
- y += FONT_HEIGHT_NORMAL;
- }
- }
-
- GetAllCargoSuffixes(3, CST_VIEW, i, i->type, ind, i->produced_cargo, cargo_suffix);
- first = true;
- for (byte j = 0; j < lengthof(i->produced_cargo); j++) {
- if (i->produced_cargo[j] == CT_INVALID) continue;
- if (first) {
- if (has_accept) y += WD_PAR_VSEP_WIDE;
- DrawString(left + WD_FRAMERECT_LEFT, right - WD_FRAMERECT_RIGHT, y, STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE);
- y += FONT_HEIGHT_NORMAL;
- if (this->editable == EA_RATE) this->production_offset_y = y;
- first = false;
- }
-
- SetDParam(0, i->produced_cargo[j]);
- SetDParam(1, i->last_month_production[j]);
- SetDParamStr(2, cargo_suffix[j]);
- SetDParam(3, ToPercent8(i->last_month_pct_transported[j]));
- uint x = left + WD_FRAMETEXT_LEFT + (this->editable == EA_RATE ? SETTING_BUTTON_WIDTH + 10 : 0);
- DrawString(x, right - WD_FRAMERECT_RIGHT, y, STR_INDUSTRY_VIEW_TRANSPORTED);
- /* Let's put out those buttons.. */
- if (this->editable == EA_RATE) {
- DrawArrowButtons(left + WD_FRAMETEXT_LEFT, y, COLOUR_YELLOW, (this->clicked_line == IL_RATE1 + j) ? this->clicked_button : 0,
- i->production_rate[j] > 0, i->production_rate[j] < 255);
- }
- y += FONT_HEIGHT_NORMAL;
- }
-
- /* Display production multiplier if editable */
- if (this->editable == EA_MULTIPLIER) {
- y += WD_PAR_VSEP_WIDE;
- this->production_offset_y = y;
- SetDParam(0, RoundDivSU(i->prod_level * 100, PRODLEVEL_DEFAULT));
- uint x = left + WD_FRAMETEXT_LEFT + SETTING_BUTTON_WIDTH + 10;
- DrawString(x, right - WD_FRAMERECT_RIGHT, y, STR_INDUSTRY_VIEW_PRODUCTION_LEVEL);
- DrawArrowButtons(left + WD_FRAMETEXT_LEFT, y, COLOUR_YELLOW, (this->clicked_line == IL_MULTIPLIER) ? this->clicked_button : 0,
- i->prod_level > PRODLEVEL_MINIMUM, i->prod_level < PRODLEVEL_MAXIMUM);
- y += FONT_HEIGHT_NORMAL;
- }
-
- /* Get the extra message for the GUI */
- if (HasBit(ind->callback_mask, CBM_IND_WINDOW_MORE_TEXT)) {
- uint16 callback_res = GetIndustryCallback(CBID_INDUSTRY_WINDOW_MORE_TEXT, 0, 0, i, i->type, i->location.tile);
- if (callback_res != CALLBACK_FAILED && callback_res != 0x400) {
- if (callback_res > 0x400) {
- ErrorUnknownCallbackResult(ind->grf_prop.grffile->grfid, CBID_INDUSTRY_WINDOW_MORE_TEXT, callback_res);
- } else {
- StringID message = GetGRFStringID(ind->grf_prop.grffile->grfid, 0xD000 + callback_res);
- if (message != STR_NULL && message != STR_UNDEFINED) {
- y += WD_PAR_VSEP_WIDE;
-
- StartTextRefStackUsage(ind->grf_prop.grffile, 6);
- /* Use all the available space left from where we stand up to the
- * end of the window. We ALSO enlarge the window if needed, so we
- * can 'go' wild with the bottom of the window. */
- y = DrawStringMultiLine(left + WD_FRAMERECT_LEFT, right - WD_FRAMERECT_RIGHT, y, UINT16_MAX, message, TC_BLACK);
- StopTextRefStackUsage();
- }
- }
- }
- }
- return y + WD_FRAMERECT_BOTTOM;
- }
-
- virtual void SetStringParameters(int widget) const
- {
- if (widget == WID_IV_CAPTION) SetDParam(0, this->window_number);
- }
-
- virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
- {
- if (widget == WID_IV_INFO) size->height = this->info_height;
- }
-
- virtual void OnClick(Point pt, int widget, int click_count)
- {
- switch (widget) {
- case WID_IV_INFO: {
- Industry *i = Industry::Get(this->window_number);
- InfoLine line = IL_NONE;
-
- switch (this->editable) {
- case EA_NONE: break;
-
- case EA_MULTIPLIER:
- if (IsInsideBS(pt.y, this->production_offset_y, FONT_HEIGHT_NORMAL)) line = IL_MULTIPLIER;
- break;
-
- case EA_RATE:
- if (pt.y >= this->production_offset_y) {
- int row = (pt.y - this->production_offset_y) / FONT_HEIGHT_NORMAL;
- for (uint j = 0; j < lengthof(i->produced_cargo); j++) {
- if (i->produced_cargo[j] == CT_INVALID) continue;
- row--;
- if (row < 0) {
- line = (InfoLine)(IL_RATE1 + j);
- break;
- }
- }
- }
- break;
- }
- if (line == IL_NONE) return;
-
- NWidgetBase *nwi = this->GetWidget(widget);
- int left = nwi->pos_x + WD_FRAMETEXT_LEFT;
- int right = nwi->pos_x + nwi->current_x - 1 - WD_FRAMERECT_RIGHT;
- if (IsInsideMM(pt.x, left, left + SETTING_BUTTON_WIDTH)) {
- /* Clicked buttons, decrease or increase production */
- byte button = (pt.x < left + SETTING_BUTTON_WIDTH / 2) ? 1 : 2;
- switch (this->editable) {
- case EA_MULTIPLIER:
- if (button == 1) {
- if (i->prod_level <= PRODLEVEL_MINIMUM) return;
- i->prod_level = max(i->prod_level / 2, PRODLEVEL_MINIMUM);
- } else {
- if (i->prod_level >= PRODLEVEL_MAXIMUM) return;
- i->prod_level = minu(i->prod_level * 2, PRODLEVEL_MAXIMUM);
- }
- break;
-
- case EA_RATE:
- if (button == 1) {
- if (i->production_rate[line - IL_RATE1] <= 0) return;
- i->production_rate[line - IL_RATE1] = max(i->production_rate[line - IL_RATE1] / 2, 0);
- } else {
- if (i->production_rate[line - IL_RATE1] >= 255) return;
- /* a zero production industry is unlikely to give anything but zero, so push it a little bit */
- int new_prod = i->production_rate[line - IL_RATE1] == 0 ? 1 : i->production_rate[line - IL_RATE1] * 2;
- i->production_rate[line - IL_RATE1] = minu(new_prod, 255);
- }
- break;
-
- default: NOT_REACHED();
- }
-
- UpdateIndustryProduction(i);
- this->SetDirty();
- this->SetTimeout();
- this->clicked_line = line;
- this->clicked_button = button;
- } else if (IsInsideMM(pt.x, left + SETTING_BUTTON_WIDTH + 10, right)) {
- /* clicked the text */
- this->editbox_line = line;
- switch (this->editable) {
- case EA_MULTIPLIER:
- SetDParam(0, RoundDivSU(i->prod_level * 100, PRODLEVEL_DEFAULT));
- ShowQueryString(STR_JUST_INT, STR_CONFIG_GAME_PRODUCTION_LEVEL, 10, this, CS_ALPHANUMERAL, QSF_NONE);
- break;
-
- case EA_RATE:
- SetDParam(0, i->production_rate[line - IL_RATE1] * 8);
- ShowQueryString(STR_JUST_INT, STR_CONFIG_GAME_PRODUCTION, 10, this, CS_ALPHANUMERAL, QSF_NONE);
- break;
-
- default: NOT_REACHED();
- }
- }
- break;
- }
-
- case WID_IV_GOTO: {
- Industry *i = Industry::Get(this->window_number);
- if (_ctrl_pressed) {
- ShowExtraViewPortWindow(i->location.GetCenterTile());
- } else {
- ScrollMainWindowToTile(i->location.GetCenterTile());
- }
- break;
- }
-
- case WID_IV_DISPLAY: {
- Industry *i = Industry::Get(this->window_number);
- ShowIndustryCargoesWindow(i->type);
- break;
- }
- }
- }
-
- virtual void OnTimeout()
- {
- this->clicked_line = IL_NONE;
- this->clicked_button = 0;
- this->SetDirty();
- }
-
- virtual void OnResize()
- {
- if (this->viewport != NULL) {
- NWidgetViewport *nvp = this->GetWidget(WID_IV_VIEWPORT);
- nvp->UpdateViewportCoordinates(this);
-
- ScrollWindowToTile(Industry::Get(this->window_number)->location.GetCenterTile(), this, true); // Re-center viewport.
- }
- }
-
- virtual void OnQueryTextFinished(char *str)
- {
- if (StrEmpty(str)) return;
-
- Industry *i = Industry::Get(this->window_number);
- uint value = atoi(str);
- switch (this->editbox_line) {
- case IL_NONE: NOT_REACHED();
-
- case IL_MULTIPLIER:
- i->prod_level = ClampU(RoundDivSU(value * PRODLEVEL_DEFAULT, 100), PRODLEVEL_MINIMUM, PRODLEVEL_MAXIMUM);
- break;
-
- default:
- i->production_rate[this->editbox_line - IL_RATE1] = ClampU(RoundDivSU(value, 8), 0, 255);
- break;
- }
- UpdateIndustryProduction(i);
- this->SetDirty();
- }
-
- /**
- * Some data on this window has become invalid.
- * @param data Information about the changed data.
- * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
- */
- virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
- {
- if (!gui_scope) return;
- const Industry *i = Industry::Get(this->window_number);
- if (IsProductionAlterable(i)) {
- const IndustrySpec *ind = GetIndustrySpec(i->type);
- this->editable = ind->UsesSmoothEconomy() ? EA_RATE : EA_MULTIPLIER;
- } else {
- this->editable = EA_NONE;
- }
- }
-
- virtual bool IsNewGRFInspectable() const
- {
- return ::IsNewGRFInspectable(GSF_INDUSTRIES, this->window_number);
- }
-
- virtual void ShowNewGRFInspectWindow() const
- {
- ::ShowNewGRFInspectWindow(GSF_INDUSTRIES, this->window_number);
- }
-};
-
-static void UpdateIndustryProduction(Industry *i)
-{
- const IndustrySpec *indspec = GetIndustrySpec(i->type);
- if (!indspec->UsesSmoothEconomy()) i->RecomputeProductionMultipliers();
-
- for (byte j = 0; j < lengthof(i->produced_cargo); j++) {
- if (i->produced_cargo[j] != CT_INVALID) {
- i->last_month_production[j] = 8 * i->production_rate[j];
- }
- }
-}
-
-/** Widget definition of the view industry gui */
-static const NWidgetPart _nested_industry_view_widgets[] = {
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_CLOSEBOX, COLOUR_CREAM),
- NWidget(WWT_CAPTION, COLOUR_CREAM, WID_IV_CAPTION), SetDataTip(STR_INDUSTRY_VIEW_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
- NWidget(WWT_DEBUGBOX, COLOUR_CREAM),
- NWidget(WWT_SHADEBOX, COLOUR_CREAM),
- NWidget(WWT_DEFSIZEBOX, COLOUR_CREAM),
- NWidget(WWT_STICKYBOX, COLOUR_CREAM),
- EndContainer(),
- NWidget(WWT_PANEL, COLOUR_CREAM),
- NWidget(WWT_INSET, COLOUR_CREAM), SetPadding(2, 2, 2, 2),
- NWidget(NWID_VIEWPORT, INVALID_COLOUR, WID_IV_VIEWPORT), SetMinimalSize(254, 86), SetFill(1, 0), SetPadding(1, 1, 1, 1), SetResize(1, 1),
- EndContainer(),
- EndContainer(),
- NWidget(WWT_PANEL, COLOUR_CREAM, WID_IV_INFO), SetMinimalSize(260, 2), SetResize(1, 0),
- EndContainer(),
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_PUSHTXTBTN, COLOUR_CREAM, WID_IV_GOTO), SetFill(1, 0), SetResize(1, 0), SetDataTip(STR_BUTTON_LOCATION, STR_INDUSTRY_VIEW_LOCATION_TOOLTIP),
- NWidget(WWT_PUSHTXTBTN, COLOUR_CREAM, WID_IV_DISPLAY), SetFill(1, 0), SetResize(1, 0), SetDataTip(STR_INDUSTRY_DISPLAY_CHAIN, STR_INDUSTRY_DISPLAY_CHAIN_TOOLTIP),
- NWidget(WWT_RESIZEBOX, COLOUR_CREAM),
- EndContainer(),
-};
-
-/** Window definition of the view industry gui */
-static WindowDesc _industry_view_desc(
- WDP_AUTO, "view_industry", 260, 120,
- WC_INDUSTRY_VIEW, WC_NONE,
- 0,
- _nested_industry_view_widgets, lengthof(_nested_industry_view_widgets)
-);
-
-void ShowIndustryViewWindow(int industry)
-{
- AllocateWindowDescFront(&_industry_view_desc, industry);
-}
-
-/** Widget definition of the industry directory gui */
-static const NWidgetPart _nested_industry_directory_widgets[] = {
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
- NWidget(WWT_CAPTION, COLOUR_BROWN), SetDataTip(STR_INDUSTRY_DIRECTORY_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
- NWidget(WWT_SHADEBOX, COLOUR_BROWN),
- NWidget(WWT_DEFSIZEBOX, COLOUR_BROWN),
- NWidget(WWT_STICKYBOX, COLOUR_BROWN),
- EndContainer(),
- NWidget(NWID_HORIZONTAL),
- NWidget(NWID_VERTICAL),
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_TEXTBTN, COLOUR_BROWN, WID_ID_DROPDOWN_ORDER), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER),
- NWidget(WWT_DROPDOWN, COLOUR_BROWN, WID_ID_DROPDOWN_CRITERIA), SetDataTip(STR_JUST_STRING, STR_TOOLTIP_SORT_CRITERIA),
- NWidget(WWT_PANEL, COLOUR_BROWN), SetResize(1, 0), EndContainer(),
- EndContainer(),
- NWidget(WWT_PANEL, COLOUR_BROWN, WID_ID_INDUSTRY_LIST), SetDataTip(0x0, STR_INDUSTRY_DIRECTORY_LIST_CAPTION), SetResize(1, 1), SetScrollbar(WID_ID_SCROLLBAR), EndContainer(),
- EndContainer(),
- NWidget(NWID_VERTICAL),
- NWidget(NWID_VSCROLLBAR, COLOUR_BROWN, WID_ID_SCROLLBAR),
- NWidget(WWT_RESIZEBOX, COLOUR_BROWN),
- EndContainer(),
- EndContainer(),
-};
-
-typedef GUIList GUIIndustryList;
-
-
-/**
- * The list of industries.
- */
-class IndustryDirectoryWindow : public Window {
-protected:
- /* Runtime saved values */
- static Listing last_sorting;
- static const Industry *last_industry;
-
- /* Constants for sorting stations */
- static const StringID sorter_names[];
- static GUIIndustryList::SortFunction * const sorter_funcs[];
-
- GUIIndustryList industries;
- Scrollbar *vscroll;
-
- /** (Re)Build industries list */
- void BuildSortIndustriesList()
- {
- if (this->industries.NeedRebuild()) {
- this->industries.Clear();
-
- const Industry *i;
- FOR_ALL_INDUSTRIES(i) {
- *this->industries.Append() = i;
- }
-
- this->industries.Compact();
- this->industries.RebuildDone();
- this->vscroll->SetCount(this->industries.Length()); // Update scrollbar as well.
- }
-
- if (!this->industries.Sort()) return;
- IndustryDirectoryWindow::last_industry = NULL; // Reset name sorter sort cache
- this->SetWidgetDirty(WID_ID_INDUSTRY_LIST); // Set the modified widget dirty
- }
-
- /**
- * Returns percents of cargo transported if industry produces this cargo, else -1
- *
- * @param i industry to check
- * @param id cargo slot
- * @return percents of cargo transported, or -1 if industry doesn't use this cargo slot
- */
- static inline int GetCargoTransportedPercentsIfValid(const Industry *i, uint id)
- {
- assert(id < lengthof(i->produced_cargo));
-
- if (i->produced_cargo[id] == CT_INVALID) return 101;
- return ToPercent8(i->last_month_pct_transported[id]);
- }
-
- /**
- * Returns value representing industry's transported cargo
- * percentage for industry sorting
- *
- * @param i industry to check
- * @return value used for sorting
- */
- static int GetCargoTransportedSortValue(const Industry *i)
- {
- int p1 = GetCargoTransportedPercentsIfValid(i, 0);
- int p2 = GetCargoTransportedPercentsIfValid(i, 1);
-
- if (p1 > p2) Swap(p1, p2); // lower value has higher priority
-
- return (p1 << 8) + p2;
- }
-
- /** Sort industries by name */
- static int CDECL IndustryNameSorter(const Industry * const *a, const Industry * const *b)
- {
- static char buf_cache[96];
- static char buf[96];
-
- SetDParam(0, (*a)->index);
- GetString(buf, STR_INDUSTRY_NAME, lastof(buf));
-
- if (*b != last_industry) {
- last_industry = *b;
- SetDParam(0, (*b)->index);
- GetString(buf_cache, STR_INDUSTRY_NAME, lastof(buf_cache));
- }
-
- return strnatcmp(buf, buf_cache); // Sort by name (natural sorting).
- }
-
- /** Sort industries by type and name */
- static int CDECL IndustryTypeSorter(const Industry * const *a, const Industry * const *b)
- {
- int it_a = 0;
- while (it_a != NUM_INDUSTRYTYPES && (*a)->type != _sorted_industry_types[it_a]) it_a++;
- int it_b = 0;
- while (it_b != NUM_INDUSTRYTYPES && (*b)->type != _sorted_industry_types[it_b]) it_b++;
- int r = it_a - it_b;
- return (r == 0) ? IndustryNameSorter(a, b) : r;
- }
-
- /** Sort industries by production and name */
- static int CDECL IndustryProductionSorter(const Industry * const *a, const Industry * const *b)
- {
- uint prod_a = 0, prod_b = 0;
- for (uint i = 0; i < lengthof((*a)->produced_cargo); i++) {
- if ((*a)->produced_cargo[i] != CT_INVALID) prod_a += (*a)->last_month_production[i];
- if ((*b)->produced_cargo[i] != CT_INVALID) prod_b += (*b)->last_month_production[i];
- }
- int r = prod_a - prod_b;
-
- return (r == 0) ? IndustryTypeSorter(a, b) : r;
- }
-
- /** Sort industries by transported cargo and name */
- static int CDECL IndustryTransportedCargoSorter(const Industry * const *a, const Industry * const *b)
- {
- int r = GetCargoTransportedSortValue(*a) - GetCargoTransportedSortValue(*b);
- return (r == 0) ? IndustryNameSorter(a, b) : r;
- }
-
- /**
- * Get the StringID to draw and set the appropriate DParams.
- * @param i the industry to get the StringID of.
- * @return the StringID.
- */
- StringID GetIndustryString(const Industry *i) const
- {
- const IndustrySpec *indsp = GetIndustrySpec(i->type);
- byte p = 0;
-
- /* Industry name */
- SetDParam(p++, i->index);
-
- static char cargo_suffix[lengthof(i->produced_cargo)][512];
- GetAllCargoSuffixes(3, CST_DIR, i, i->type, indsp, i->produced_cargo, cargo_suffix);
-
- /* Industry productions */
- for (byte j = 0; j < lengthof(i->produced_cargo); j++) {
- if (i->produced_cargo[j] == CT_INVALID) continue;
- SetDParam(p++, i->produced_cargo[j]);
- SetDParam(p++, i->last_month_production[j]);
- SetDParamStr(p++, cargo_suffix[j]);
- }
-
- /* Transported productions */
- for (byte j = 0; j < lengthof(i->produced_cargo); j++) {
- if (i->produced_cargo[j] == CT_INVALID) continue;
- SetDParam(p++, ToPercent8(i->last_month_pct_transported[j]));
- }
-
- /* Drawing the right string */
- switch (p) {
- case 1: return STR_INDUSTRY_DIRECTORY_ITEM_NOPROD;
- case 5: return STR_INDUSTRY_DIRECTORY_ITEM;
- default: return STR_INDUSTRY_DIRECTORY_ITEM_TWO;
- }
- }
-
-public:
- IndustryDirectoryWindow(WindowDesc *desc, WindowNumber number) : Window(desc)
- {
- this->CreateNestedTree();
- this->vscroll = this->GetScrollbar(WID_ID_SCROLLBAR);
-
- this->industries.SetListing(this->last_sorting);
- this->industries.SetSortFuncs(IndustryDirectoryWindow::sorter_funcs);
- this->industries.ForceRebuild();
- this->BuildSortIndustriesList();
-
- this->FinishInitNested(0);
- }
-
- ~IndustryDirectoryWindow()
- {
- this->last_sorting = this->industries.GetListing();
- }
-
- virtual void SetStringParameters(int widget) const
- {
- if (widget == WID_ID_DROPDOWN_CRITERIA) SetDParam(0, IndustryDirectoryWindow::sorter_names[this->industries.SortType()]);
- }
-
- virtual void DrawWidget(const Rect &r, int widget) const
- {
- switch (widget) {
- case WID_ID_DROPDOWN_ORDER:
- this->DrawSortButtonState(widget, this->industries.IsDescSortOrder() ? SBS_DOWN : SBS_UP);
- break;
-
- case WID_ID_INDUSTRY_LIST: {
- int n = 0;
- int y = Center(r.top, this->resize.step_height);
- if (this->industries.Length() == 0) {
- DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, y, STR_INDUSTRY_DIRECTORY_NONE);
- break;
- }
- for (uint i = this->vscroll->GetPosition(); i < this->industries.Length(); i++) {
- DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, y, this->GetIndustryString(this->industries[i]));
-
- y += this->resize.step_height;
- if (++n == this->vscroll->GetCapacity()) break; // max number of industries in 1 window
- }
- break;
- }
- }
- }
-
- virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
- {
- switch (widget) {
- case WID_ID_DROPDOWN_ORDER: {
- Dimension d = GetStringBoundingBox(this->GetWidget(widget)->widget_data);
- d.width += padding.width + WD_SORTBUTTON_ARROW_WIDTH * 2; // Doubled since the string is centred and it also looks better.
- d.height += padding.height;
- *size = maxdim(*size, d);
- break;
- }
-
- case WID_ID_DROPDOWN_CRITERIA: {
- Dimension d = {0, 0};
- for (uint i = 0; IndustryDirectoryWindow::sorter_names[i] != INVALID_STRING_ID; i++) {
- d = maxdim(d, GetStringBoundingBox(IndustryDirectoryWindow::sorter_names[i]));
- }
- d.width += padding.width;
- d.height += padding.height;
- *size = maxdim(*size, d);
- break;
- }
-
- case WID_ID_INDUSTRY_LIST: {
- Dimension d = GetStringBoundingBox(STR_INDUSTRY_DIRECTORY_NONE);
- for (uint i = 0; i < this->industries.Length(); i++) {
- d = maxdim(d, GetStringBoundingBox(this->GetIndustryString(this->industries[i])));
- }
- resize->height = d.height = GetMinSizing(NWST_STEP, d.height);
- d.height *= 5;
- d.width += padding.width + WD_FRAMERECT_LEFT + WD_FRAMERECT_RIGHT;
- d.height += padding.height + WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM;
- *size = maxdim(*size, d);
- break;
- }
- }
- }
-
-
- virtual void OnClick(Point pt, int widget, int click_count)
- {
- switch (widget) {
- case WID_ID_DROPDOWN_ORDER:
- this->industries.ToggleSortOrder();
- this->SetDirty();
- break;
-
- case WID_ID_DROPDOWN_CRITERIA:
- ShowDropDownMenu(this, IndustryDirectoryWindow::sorter_names, this->industries.SortType(), WID_ID_DROPDOWN_CRITERIA, 0, 0);
- break;
-
- case WID_ID_INDUSTRY_LIST: {
- uint p = this->vscroll->GetScrolledRowFromWidget(pt.y, this, WID_ID_INDUSTRY_LIST, WD_FRAMERECT_TOP);
- if (p < this->industries.Length()) {
- if (_ctrl_pressed) {
- ShowExtraViewPortWindow(this->industries[p]->location.tile);
- } else {
- ScrollMainWindowToTile(this->industries[p]->location.tile);
- }
- }
- break;
- }
- }
- }
-
- virtual void OnDropdownSelect(int widget, int index)
- {
- if (this->industries.SortType() != index) {
- this->industries.SetSortType(index);
- this->BuildSortIndustriesList();
- }
- }
-
- virtual void OnResize()
- {
- this->vscroll->SetCapacityFromWidget(this, WID_ID_INDUSTRY_LIST);
- }
-
- virtual void OnPaint()
- {
- if (this->industries.NeedRebuild()) this->BuildSortIndustriesList();
- this->DrawWidgets();
- }
-
- virtual void OnHundredthTick()
- {
- this->industries.ForceResort();
- this->BuildSortIndustriesList();
- }
-
- /**
- * Some data on this window has become invalid.
- * @param data Information about the changed data.
- * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
- */
- virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
- {
- if (data == 0) {
- /* This needs to be done in command-scope to enforce rebuilding before resorting invalid data */
- this->industries.ForceRebuild();
- } else {
- this->industries.ForceResort();
- }
- }
-};
-
-Listing IndustryDirectoryWindow::last_sorting = {false, 0};
-const Industry *IndustryDirectoryWindow::last_industry = NULL;
-
-/* Available station sorting functions. */
-GUIIndustryList::SortFunction * const IndustryDirectoryWindow::sorter_funcs[] = {
- &IndustryNameSorter,
- &IndustryTypeSorter,
- &IndustryProductionSorter,
- &IndustryTransportedCargoSorter
-};
-
-/* Names of the sorting functions */
-const StringID IndustryDirectoryWindow::sorter_names[] = {
- STR_SORT_BY_NAME,
- STR_SORT_BY_TYPE,
- STR_SORT_BY_PRODUCTION,
- STR_SORT_BY_TRANSPORTED,
- INVALID_STRING_ID
-};
-
-
-/** Window definition of the industry directory gui */
-static WindowDesc _industry_directory_desc(
- WDP_AUTO, "list_industries", 428, 190,
- WC_INDUSTRY_DIRECTORY, WC_NONE,
- 0,
- _nested_industry_directory_widgets, lengthof(_nested_industry_directory_widgets)
-);
-
-void ShowIndustryDirectory()
-{
- AllocateWindowDescFront(&_industry_directory_desc, 0);
-}
-
-/** Widgets of the industry cargoes window. */
-static const NWidgetPart _nested_industry_cargoes_widgets[] = {
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
- NWidget(WWT_CAPTION, COLOUR_BROWN, WID_IC_CAPTION), SetDataTip(STR_INDUSTRY_CARGOES_INDUSTRY_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
- NWidget(WWT_SHADEBOX, COLOUR_BROWN),
- NWidget(WWT_DEFSIZEBOX, COLOUR_BROWN),
- NWidget(WWT_STICKYBOX, COLOUR_BROWN),
- EndContainer(),
- NWidget(NWID_HORIZONTAL),
- NWidget(NWID_VERTICAL),
- NWidget(WWT_PANEL, COLOUR_BROWN, WID_IC_PANEL), SetResize(1, 10), SetMinimalSize(200, 90), SetScrollbar(WID_IC_SCROLLBAR), EndContainer(),
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_TEXTBTN, COLOUR_BROWN, WID_IC_NOTIFY),
- SetDataTip(STR_INDUSTRY_CARGOES_NOTIFY_SMALLMAP, STR_INDUSTRY_CARGOES_NOTIFY_SMALLMAP_TOOLTIP),
- NWidget(WWT_PANEL, COLOUR_BROWN), SetFill(1, 0), SetResize(0, 0), EndContainer(),
- NWidget(WWT_DROPDOWN, COLOUR_BROWN, WID_IC_IND_DROPDOWN), SetFill(0, 0), SetResize(0, 0),
- SetDataTip(STR_INDUSTRY_CARGOES_SELECT_INDUSTRY, STR_INDUSTRY_CARGOES_SELECT_INDUSTRY_TOOLTIP),
- NWidget(WWT_DROPDOWN, COLOUR_BROWN, WID_IC_CARGO_DROPDOWN), SetFill(0, 0), SetResize(0, 0),
- SetDataTip(STR_INDUSTRY_CARGOES_SELECT_CARGO, STR_INDUSTRY_CARGOES_SELECT_CARGO_TOOLTIP),
- EndContainer(),
- EndContainer(),
- NWidget(NWID_VERTICAL),
- NWidget(NWID_VSCROLLBAR, COLOUR_BROWN, WID_IC_SCROLLBAR),
- NWidget(WWT_RESIZEBOX, COLOUR_BROWN),
- EndContainer(),
- EndContainer(),
-};
-
-/** Window description for the industry cargoes window. */
-static WindowDesc _industry_cargoes_desc(
- WDP_AUTO, "industry_cargoes", 300, 210,
- WC_INDUSTRY_CARGOES, WC_NONE,
- 0,
- _nested_industry_cargoes_widgets, lengthof(_nested_industry_cargoes_widgets)
-);
-
-/** Available types of field. */
-enum CargoesFieldType {
- CFT_EMPTY, ///< Empty field.
- CFT_SMALL_EMPTY, ///< Empty small field (for the header).
- CFT_INDUSTRY, ///< Display industry.
- CFT_CARGO, ///< Display cargo connections.
- CFT_CARGO_LABEL, ///< Display cargo labels.
- CFT_HEADER, ///< Header text.
-};
-
-static const uint MAX_CARGOES = 3; ///< Maximum number of cargoes carried in a #CFT_CARGO field in #CargoesField.
-
-/** Data about a single field in the #IndustryCargoesWindow panel. */
-struct CargoesField {
- static const int VERT_INTER_INDUSTRY_SPACE;
- static const int HOR_CARGO_BORDER_SPACE;
- static const int CARGO_STUB_WIDTH;
- static const int HOR_CARGO_WIDTH, HOR_CARGO_SPACE;
- static const int CARGO_FIELD_WIDTH;
- static const int VERT_CARGO_SPACE, VERT_CARGO_EDGE;
- static const int BLOB_DISTANCE, BLOB_WIDTH, BLOB_HEIGHT;
-
- static const int INDUSTRY_LINE_COLOUR;
- static const int CARGO_LINE_COLOUR;
-
- static int small_height, normal_height;
- static int industry_width;
-
- CargoesFieldType type; ///< Type of field.
- union {
- struct {
- IndustryType ind_type; ///< Industry type (#NUM_INDUSTRYTYPES means 'houses').
- CargoID other_produced[MAX_CARGOES]; ///< Cargoes produced but not used in this figure.
- CargoID other_accepted[MAX_CARGOES]; ///< Cargoes accepted but not used in this figure.
- } industry; ///< Industry data (for #CFT_INDUSTRY).
- struct {
- CargoID vertical_cargoes[MAX_CARGOES]; ///< Cargoes running from top to bottom (cargo ID or #INVALID_CARGO).
- byte num_cargoes; ///< Number of cargoes.
- CargoID supp_cargoes[MAX_CARGOES]; ///< Cargoes entering from the left (index in #vertical_cargoes, or #INVALID_CARGO).
- byte top_end; ///< Stop at the top of the vertical cargoes.
- CargoID cust_cargoes[MAX_CARGOES]; ///< Cargoes leaving to the right (index in #vertical_cargoes, or #INVALID_CARGO).
- byte bottom_end; ///< Stop at the bottom of the vertical cargoes.
- } cargo; ///< Cargo data (for #CFT_CARGO).
- struct {
- CargoID cargoes[MAX_CARGOES]; ///< Cargoes to display (or #INVALID_CARGO).
- bool left_align; ///< Align all cargo texts to the left (else align to the right).
- } cargo_label; ///< Label data (for #CFT_CARGO_LABEL).
- StringID header; ///< Header text (for #CFT_HEADER).
- } u; // Data for each type.
-
- /**
- * Make one of the empty fields (#CFT_EMPTY or #CFT_SMALL_EMPTY).
- * @param type Type of empty field.
- */
- void MakeEmpty(CargoesFieldType type)
- {
- this->type = type;
- }
-
- /**
- * Make an industry type field.
- * @param ind_type Industry type (#NUM_INDUSTRYTYPES means 'houses').
- * @note #other_accepted and #other_produced should be filled later.
- */
- void MakeIndustry(IndustryType ind_type)
- {
- this->type = CFT_INDUSTRY;
- this->u.industry.ind_type = ind_type;
- MemSetT(this->u.industry.other_accepted, INVALID_CARGO, MAX_CARGOES);
- MemSetT(this->u.industry.other_produced, INVALID_CARGO, MAX_CARGOES);
- }
-
- /**
- * Connect a cargo from an industry to the #CFT_CARGO column.
- * @param cargo Cargo to connect.
- * @param produced Cargo is produced (if \c false, cargo is assumed to be accepted).
- * @return Horizontal connection index, or \c -1 if not accepted at all.
- */
- int ConnectCargo(CargoID cargo, bool producer)
- {
- assert(this->type == CFT_CARGO);
- if (cargo == INVALID_CARGO) return -1;
-
- /* Find the vertical cargo column carrying the cargo. */
- int column = -1;
- for (int i = 0; i < this->u.cargo.num_cargoes; i++) {
- if (cargo == this->u.cargo.vertical_cargoes[i]) {
- column = i;
- break;
- }
- }
- if (column < 0) return -1;
-
- if (producer) {
- assert(this->u.cargo.supp_cargoes[column] == INVALID_CARGO);
- this->u.cargo.supp_cargoes[column] = column;
- } else {
- assert(this->u.cargo.cust_cargoes[column] == INVALID_CARGO);
- this->u.cargo.cust_cargoes[column] = column;
- }
- return column;
- }
-
- /**
- * Does this #CFT_CARGO field have a horizontal connection?
- * @return \c true if a horizontal connection exists, \c false otherwise.
- */
- bool HasConnection()
- {
- assert(this->type == CFT_CARGO);
-
- for (uint i = 0; i < MAX_CARGOES; i++) {
- if (this->u.cargo.supp_cargoes[i] != INVALID_CARGO) return true;
- if (this->u.cargo.cust_cargoes[i] != INVALID_CARGO) return true;
- }
- return false;
- }
-
- /**
- * Make a piece of cargo column.
- * @param cargoes Array of #CargoID (may contain #INVALID_CARGO).
- * @param length Number of cargoes in \a cargoes.
- * @param count Number of cargoes to display (should be at least the number of valid cargoes, or \c -1 to let the method compute it).
- * @param top_end This is the first cargo field of this column.
- * @param bottom_end This is the last cargo field of this column.
- * @note #supp_cargoes and #cust_cargoes should be filled in later.
- */
- void MakeCargo(const CargoID *cargoes, uint length, int count = -1, bool top_end = false, bool bottom_end = false)
- {
- this->type = CFT_CARGO;
- uint i;
- uint num = 0;
- for (i = 0; i < MAX_CARGOES && i < length; i++) {
- if (cargoes[i] != INVALID_CARGO) {
- this->u.cargo.vertical_cargoes[num] = cargoes[i];
- num++;
- }
- }
- this->u.cargo.num_cargoes = (count < 0) ? num : count;
- for (; num < MAX_CARGOES; num++) this->u.cargo.vertical_cargoes[num] = INVALID_CARGO;
- this->u.cargo.top_end = top_end;
- this->u.cargo.bottom_end = bottom_end;
- MemSetT(this->u.cargo.supp_cargoes, INVALID_CARGO, MAX_CARGOES);
- MemSetT(this->u.cargo.cust_cargoes, INVALID_CARGO, MAX_CARGOES);
- }
-
- /**
- * Make a field displaying cargo type names.
- * @param cargoes Array of #CargoID (may contain #INVALID_CARGO).
- * @param length Number of cargoes in \a cargoes.
- * @param left_align ALign texts to the left (else to the right).
- */
- void MakeCargoLabel(const CargoID *cargoes, uint length, bool left_align)
- {
- this->type = CFT_CARGO_LABEL;
- uint i;
- for (i = 0; i < MAX_CARGOES && i < length; i++) this->u.cargo_label.cargoes[i] = cargoes[i];
- for (; i < MAX_CARGOES; i++) this->u.cargo_label.cargoes[i] = INVALID_CARGO;
- this->u.cargo_label.left_align = left_align;
- }
-
- /**
- * Make a header above an industry column.
- * @param textid Text to display.
- */
- void MakeHeader(StringID textid)
- {
- this->type = CFT_HEADER;
- this->u.header = textid;
- }
-
- /**
- * For a #CFT_CARGO, compute the left position of the left-most vertical cargo connection.
- * @param xpos Left position of the field.
- * @return Left position of the left-most vertical cargo column.
- */
- int GetCargoBase(int xpos) const
- {
- assert(this->type == CFT_CARGO);
-
- switch (this->u.cargo.num_cargoes) {
- case 0: return xpos + CARGO_FIELD_WIDTH / 2;
- case 1: return xpos + CARGO_FIELD_WIDTH / 2 - HOR_CARGO_WIDTH / 2;
- case 2: return xpos + CARGO_FIELD_WIDTH / 2 - HOR_CARGO_WIDTH - HOR_CARGO_SPACE / 2;
- case 3: return xpos + CARGO_FIELD_WIDTH / 2 - HOR_CARGO_WIDTH - HOR_CARGO_SPACE - HOR_CARGO_WIDTH / 2;
- default: NOT_REACHED();
- }
- }
-
- /**
- * Draw the field.
- * @param xpos Position of the left edge.
- * @param vpos Position of the top edge.
- */
- void Draw(int xpos, int ypos) const
- {
- switch (this->type) {
- case CFT_EMPTY:
- case CFT_SMALL_EMPTY:
- break;
-
- case CFT_HEADER:
- ypos += (small_height - FONT_HEIGHT_NORMAL) / 2;
- DrawString(xpos, xpos + industry_width, ypos, this->u.header, TC_WHITE, SA_HOR_CENTER);
- break;
-
- case CFT_INDUSTRY: {
- int ypos1 = ypos + VERT_INTER_INDUSTRY_SPACE / 2;
- int ypos2 = ypos + normal_height - 1 - VERT_INTER_INDUSTRY_SPACE / 2;
- int xpos2 = xpos + industry_width - 1;
- GfxDrawLine(xpos, ypos1, xpos2, ypos1, INDUSTRY_LINE_COLOUR);
- GfxDrawLine(xpos, ypos1, xpos, ypos2, INDUSTRY_LINE_COLOUR);
- GfxDrawLine(xpos, ypos2, xpos2, ypos2, INDUSTRY_LINE_COLOUR);
- GfxDrawLine(xpos2, ypos1, xpos2, ypos2, INDUSTRY_LINE_COLOUR);
- ypos += (normal_height - FONT_HEIGHT_NORMAL) / 2;
- if (this->u.industry.ind_type < NUM_INDUSTRYTYPES) {
- const IndustrySpec *indsp = GetIndustrySpec(this->u.industry.ind_type);
- SetDParam(0, indsp->name);
- DrawString(xpos, xpos2, ypos, STR_JUST_STRING, TC_WHITE, SA_HOR_CENTER);
-
- /* Draw the industry legend. */
- int blob_left, blob_right;
- if (_current_text_dir == TD_RTL) {
- blob_right = xpos2 - BLOB_DISTANCE;
- blob_left = blob_right - BLOB_WIDTH;
- } else {
- blob_left = xpos + BLOB_DISTANCE;
- blob_right = blob_left + BLOB_WIDTH;
- }
- GfxFillRect(blob_left, ypos2 - BLOB_DISTANCE - BLOB_HEIGHT, blob_right, ypos2 - BLOB_DISTANCE, PC_BLACK); // Border
- GfxFillRect(blob_left + 1, ypos2 - BLOB_DISTANCE - BLOB_HEIGHT + 1, blob_right - 1, ypos2 - BLOB_DISTANCE - 1, indsp->map_colour);
- } else {
- DrawString(xpos, xpos2, ypos, STR_INDUSTRY_CARGOES_HOUSES, TC_FROMSTRING, SA_HOR_CENTER);
- }
-
- /* Draw the other_produced/other_accepted cargoes. */
- const CargoID *other_right, *other_left;
- if (_current_text_dir == TD_RTL) {
- other_right = this->u.industry.other_accepted;
- other_left = this->u.industry.other_produced;
- } else {
- other_right = this->u.industry.other_produced;
- other_left = this->u.industry.other_accepted;
- }
- ypos1 += VERT_CARGO_EDGE;
- for (uint i = 0; i < MAX_CARGOES; i++) {
- if (other_right[i] != INVALID_CARGO) {
- const CargoSpec *csp = CargoSpec::Get(other_right[i]);
- int xp = xpos + industry_width + CARGO_STUB_WIDTH;
- DrawHorConnection(xpos + industry_width, xp - 1, ypos1, csp);
- GfxDrawLine(xp, ypos1, xp, ypos1 + FONT_HEIGHT_NORMAL - 1, CARGO_LINE_COLOUR);
- }
- if (other_left[i] != INVALID_CARGO) {
- const CargoSpec *csp = CargoSpec::Get(other_left[i]);
- int xp = xpos - CARGO_STUB_WIDTH;
- DrawHorConnection(xp + 1, xpos - 1, ypos1, csp);
- GfxDrawLine(xp, ypos1, xp, ypos1 + FONT_HEIGHT_NORMAL - 1, CARGO_LINE_COLOUR);
- }
- ypos1 += FONT_HEIGHT_NORMAL + VERT_CARGO_SPACE;
- }
- break;
- }
-
- case CFT_CARGO: {
- int cargo_base = this->GetCargoBase(xpos);
- int top = ypos + (this->u.cargo.top_end ? VERT_INTER_INDUSTRY_SPACE / 2 + 1 : 0);
- int bot = ypos - (this->u.cargo.bottom_end ? VERT_INTER_INDUSTRY_SPACE / 2 + 1 : 0) + normal_height - 1;
- int colpos = cargo_base;
- for (int i = 0; i < this->u.cargo.num_cargoes; i++) {
- if (this->u.cargo.top_end) GfxDrawLine(colpos, top - 1, colpos + HOR_CARGO_WIDTH - 1, top - 1, CARGO_LINE_COLOUR);
- if (this->u.cargo.bottom_end) GfxDrawLine(colpos, bot + 1, colpos + HOR_CARGO_WIDTH - 1, bot + 1, CARGO_LINE_COLOUR);
- GfxDrawLine(colpos, top, colpos, bot, CARGO_LINE_COLOUR);
- colpos++;
- const CargoSpec *csp = CargoSpec::Get(this->u.cargo.vertical_cargoes[i]);
- GfxFillRect(colpos, top, colpos + HOR_CARGO_WIDTH - 2, bot, csp->legend_colour, FILLRECT_OPAQUE);
- colpos += HOR_CARGO_WIDTH - 2;
- GfxDrawLine(colpos, top, colpos, bot, CARGO_LINE_COLOUR);
- colpos += 1 + HOR_CARGO_SPACE;
- }
-
- const CargoID *hor_left, *hor_right;
- if (_current_text_dir == TD_RTL) {
- hor_left = this->u.cargo.cust_cargoes;
- hor_right = this->u.cargo.supp_cargoes;
- } else {
- hor_left = this->u.cargo.supp_cargoes;
- hor_right = this->u.cargo.cust_cargoes;
- }
- ypos += VERT_CARGO_EDGE + VERT_INTER_INDUSTRY_SPACE / 2;
- for (uint i = 0; i < MAX_CARGOES; i++) {
- if (hor_left[i] != INVALID_CARGO) {
- int col = hor_left[i];
- int dx = 0;
- const CargoSpec *csp = CargoSpec::Get(this->u.cargo.vertical_cargoes[col]);
- for (; col > 0; col--) {
- int lf = cargo_base + col * HOR_CARGO_WIDTH + (col - 1) * HOR_CARGO_SPACE;
- DrawHorConnection(lf, lf + HOR_CARGO_SPACE - dx, ypos, csp);
- dx = 1;
- }
- DrawHorConnection(xpos, cargo_base - dx, ypos, csp);
- }
- if (hor_right[i] != INVALID_CARGO) {
- int col = hor_right[i];
- int dx = 0;
- const CargoSpec *csp = CargoSpec::Get(this->u.cargo.vertical_cargoes[col]);
- for (; col < this->u.cargo.num_cargoes - 1; col++) {
- int lf = cargo_base + (col + 1) * HOR_CARGO_WIDTH + col * HOR_CARGO_SPACE;
- DrawHorConnection(lf + dx - 1, lf + HOR_CARGO_SPACE - 1, ypos, csp);
- dx = 1;
- }
- DrawHorConnection(cargo_base + col * HOR_CARGO_SPACE + (col + 1) * HOR_CARGO_WIDTH - 1 + dx, xpos + CARGO_FIELD_WIDTH - 1, ypos, csp);
- }
- ypos += FONT_HEIGHT_NORMAL + VERT_CARGO_SPACE;
- }
- break;
- }
-
- case CFT_CARGO_LABEL:
- ypos += VERT_CARGO_EDGE + VERT_INTER_INDUSTRY_SPACE / 2;
- for (uint i = 0; i < MAX_CARGOES; i++) {
- if (this->u.cargo_label.cargoes[i] != INVALID_CARGO) {
- const CargoSpec *csp = CargoSpec::Get(this->u.cargo_label.cargoes[i]);
- DrawString(xpos + WD_FRAMERECT_LEFT, xpos + industry_width - 1 - WD_FRAMERECT_RIGHT, ypos, csp->name, TC_WHITE,
- (this->u.cargo_label.left_align) ? SA_LEFT : SA_RIGHT);
- }
- ypos += FONT_HEIGHT_NORMAL + VERT_CARGO_SPACE;
- }
- break;
-
- default:
- NOT_REACHED();
- }
- }
-
- /**
- * Decide which cargo was clicked at in a #CFT_CARGO field.
- * @param left Left industry neighbour if available (else \c NULL should be supplied).
- * @param right Right industry neighbour if available (else \c NULL should be supplied).
- * @param pt Click position in the cargo field.
- * @return Cargo clicked at, or #INVALID_CARGO if none.
- */
- CargoID CargoClickedAt(const CargoesField *left, const CargoesField *right, Point pt) const
- {
- assert(this->type == CFT_CARGO);
-
- /* Vertical matching. */
- int cpos = this->GetCargoBase(0);
- uint col;
- for (col = 0; col < this->u.cargo.num_cargoes; col++) {
- if (pt.x < cpos) break;
- if (pt.x < cpos + CargoesField::HOR_CARGO_WIDTH) return this->u.cargo.vertical_cargoes[col];
- cpos += CargoesField::HOR_CARGO_WIDTH + CargoesField::HOR_CARGO_SPACE;
- }
- /* col = 0 -> left of first col, 1 -> left of 2nd col, ... this->u.cargo.num_cargoes right of last-col. */
-
- int vpos = VERT_INTER_INDUSTRY_SPACE / 2 + VERT_CARGO_EDGE;
- uint row;
- for (row = 0; row < MAX_CARGOES; row++) {
- if (pt.y < vpos) return INVALID_CARGO;
- if (pt.y < vpos + FONT_HEIGHT_NORMAL) break;
- vpos += FONT_HEIGHT_NORMAL + VERT_CARGO_SPACE;
- }
- if (row == MAX_CARGOES) return INVALID_CARGO;
-
- /* row = 0 -> at first horizontal row, row = 1 -> second horizontal row, 2 = 3rd horizontal row. */
- if (col == 0) {
- if (this->u.cargo.supp_cargoes[row] != INVALID_CARGO) return this->u.cargo.vertical_cargoes[this->u.cargo.supp_cargoes[row]];
- if (left != NULL) {
- if (left->type == CFT_INDUSTRY) return left->u.industry.other_produced[row];
- if (left->type == CFT_CARGO_LABEL && !left->u.cargo_label.left_align) return left->u.cargo_label.cargoes[row];
- }
- return INVALID_CARGO;
- }
- if (col == this->u.cargo.num_cargoes) {
- if (this->u.cargo.cust_cargoes[row] != INVALID_CARGO) return this->u.cargo.vertical_cargoes[this->u.cargo.cust_cargoes[row]];
- if (right != NULL) {
- if (right->type == CFT_INDUSTRY) return right->u.industry.other_accepted[row];
- if (right->type == CFT_CARGO_LABEL && right->u.cargo_label.left_align) return right->u.cargo_label.cargoes[row];
- }
- return INVALID_CARGO;
- }
- if (row >= col) {
- /* Clicked somewhere in-between vertical cargo connection.
- * Since the horizontal connection is made in the same order as the vertical list, the above condition
- * ensures we are left-below the main diagonal, thus at the supplying side.
- */
- return (this->u.cargo.supp_cargoes[row] != INVALID_CARGO) ? this->u.cargo.vertical_cargoes[this->u.cargo.supp_cargoes[row]] : INVALID_CARGO;
- } else {
- /* Clicked at a customer connection. */
- return (this->u.cargo.cust_cargoes[row] != INVALID_CARGO) ? this->u.cargo.vertical_cargoes[this->u.cargo.cust_cargoes[row]] : INVALID_CARGO;
- }
- }
-
- /**
- * Decide what cargo the user clicked in the cargo label field.
- * @param pt Click position in the cargo label field.
- * @return Cargo clicked at, or #INVALID_CARGO if none.
- */
- CargoID CargoLabelClickedAt(Point pt) const
- {
- assert(this->type == CFT_CARGO_LABEL);
-
- int vpos = VERT_INTER_INDUSTRY_SPACE / 2 + VERT_CARGO_EDGE;
- uint row;
- for (row = 0; row < MAX_CARGOES; row++) {
- if (pt.y < vpos) return INVALID_CARGO;
- if (pt.y < vpos + FONT_HEIGHT_NORMAL) break;
- vpos += FONT_HEIGHT_NORMAL + VERT_CARGO_SPACE;
- }
- if (row == MAX_CARGOES) return INVALID_CARGO;
- return this->u.cargo_label.cargoes[row];
- }
-
-private:
- /**
- * Draw a horizontal cargo connection.
- * @param left Left-most coordinate to draw.
- * @param right Right-most coordinate to draw.
- * @param top Top coordinate of the cargo connection.
- * @param csp Cargo to draw.
- */
- static void DrawHorConnection(int left, int right, int top, const CargoSpec *csp)
- {
- GfxDrawLine(left, top, right, top, CARGO_LINE_COLOUR);
- GfxFillRect(left, top + 1, right, top + FONT_HEIGHT_NORMAL - 2, csp->legend_colour, FILLRECT_OPAQUE);
- GfxDrawLine(left, top + FONT_HEIGHT_NORMAL - 1, right, top + FONT_HEIGHT_NORMAL - 1, CARGO_LINE_COLOUR);
- }
-};
-
-assert_compile(MAX_CARGOES >= cpp_lengthof(IndustrySpec, produced_cargo));
-assert_compile(MAX_CARGOES >= cpp_lengthof(IndustrySpec, accepts_cargo));
-
-int CargoesField::small_height; ///< Height of the header row.
-int CargoesField::normal_height; ///< Height of the non-header rows.
-int CargoesField::industry_width; ///< Width of an industry field.
-const int CargoesField::VERT_INTER_INDUSTRY_SPACE = 6; ///< Amount of space between two industries in a column.
-
-const int CargoesField::HOR_CARGO_BORDER_SPACE = 15; ///< Amount of space between the left/right edge of a #CFT_CARGO field, and the left/right most vertical cargo.
-const int CargoesField::CARGO_STUB_WIDTH = 10; ///< Width of a cargo not carried in the column (should be less than #HOR_CARGO_BORDER_SPACE).
-const int CargoesField::HOR_CARGO_WIDTH = 15; ///< Width of a vertical cargo column (inclusive the border line).
-const int CargoesField::HOR_CARGO_SPACE = 5; ///< Amount of horizontal space between two vertical cargoes.
-const int CargoesField::VERT_CARGO_EDGE = 4; ///< Amount of vertical space between top/bottom and the top/bottom connected cargo at an industry.
-const int CargoesField::VERT_CARGO_SPACE = 4; ///< Amount of vertical space between two connected cargoes at an industry.
-
-const int CargoesField::BLOB_DISTANCE = 5; ///< Distance of the industry legend colour from the edge of the industry box.
-const int CargoesField::BLOB_WIDTH = 12; ///< Width of the industry legend colour, including border.
-const int CargoesField::BLOB_HEIGHT = 9; ///< Height of the industry legend colour, including border
-
-/** Width of a #CFT_CARGO field. */
-const int CargoesField::CARGO_FIELD_WIDTH = HOR_CARGO_BORDER_SPACE * 2 + HOR_CARGO_WIDTH * MAX_CARGOES + HOR_CARGO_SPACE * (MAX_CARGOES - 1);
-
-const int CargoesField::INDUSTRY_LINE_COLOUR = PC_YELLOW; ///< Line colour of the industry type box.
-const int CargoesField::CARGO_LINE_COLOUR = PC_YELLOW; ///< Line colour around the cargo.
-
-/** A single row of #CargoesField. */
-struct CargoesRow {
- CargoesField columns[5]; ///< One row of fields.
-
- /**
- * Connect industry production cargoes to the cargo column after it.
- * @param column Column of the industry.
- */
- void ConnectIndustryProduced(int column)
- {
- CargoesField *ind_fld = this->columns + column;
- CargoesField *cargo_fld = this->columns + column + 1;
- assert(ind_fld->type == CFT_INDUSTRY && cargo_fld->type == CFT_CARGO);
-
- MemSetT(ind_fld->u.industry.other_produced, INVALID_CARGO, MAX_CARGOES);
-
- if (ind_fld->u.industry.ind_type < NUM_INDUSTRYTYPES) {
- CargoID others[MAX_CARGOES]; // Produced cargoes not carried in the cargo column.
- int other_count = 0;
-
- const IndustrySpec *indsp = GetIndustrySpec(ind_fld->u.industry.ind_type);
- for (uint i = 0; i < lengthof(indsp->produced_cargo); i++) {
- int col = cargo_fld->ConnectCargo(indsp->produced_cargo[i], true);
- if (col < 0) others[other_count++] = indsp->produced_cargo[i];
- }
-
- /* Allocate other cargoes in the empty holes of the horizontal cargo connections. */
- for (uint i = 0; i < MAX_CARGOES && other_count > 0; i++) {
- if (cargo_fld->u.cargo.supp_cargoes[i] == INVALID_CARGO) ind_fld->u.industry.other_produced[i] = others[--other_count];
- }
- } else {
- /* Houses only display what is demanded. */
- for (uint i = 0; i < cargo_fld->u.cargo.num_cargoes; i++) {
- CargoID cid = cargo_fld->u.cargo.vertical_cargoes[i];
- if (cid == CT_PASSENGERS || cid == CT_MAIL) cargo_fld->ConnectCargo(cid, true);
- }
- }
- }
-
- /**
- * Construct a #CFT_CARGO_LABEL field.
- * @param column Column to create the new field.
- * @param accepting Display accepted cargo (if \c false, display produced cargo).
- */
- void MakeCargoLabel(int column, bool accepting)
- {
- CargoID cargoes[MAX_CARGOES];
- MemSetT(cargoes, INVALID_CARGO, lengthof(cargoes));
-
- CargoesField *label_fld = this->columns + column;
- CargoesField *cargo_fld = this->columns + (accepting ? column - 1 : column + 1);
-
- assert(cargo_fld->type == CFT_CARGO && label_fld->type == CFT_EMPTY);
- for (uint i = 0; i < cargo_fld->u.cargo.num_cargoes; i++) {
- int col = cargo_fld->ConnectCargo(cargo_fld->u.cargo.vertical_cargoes[i], !accepting);
- if (col >= 0) cargoes[col] = cargo_fld->u.cargo.vertical_cargoes[i];
- }
- label_fld->MakeCargoLabel(cargoes, lengthof(cargoes), accepting);
- }
-
-
- /**
- * Connect industry accepted cargoes to the cargo column before it.
- * @param column Column of the industry.
- */
- void ConnectIndustryAccepted(int column)
- {
- CargoesField *ind_fld = this->columns + column;
- CargoesField *cargo_fld = this->columns + column - 1;
- assert(ind_fld->type == CFT_INDUSTRY && cargo_fld->type == CFT_CARGO);
-
- MemSetT(ind_fld->u.industry.other_accepted, INVALID_CARGO, MAX_CARGOES);
-
- if (ind_fld->u.industry.ind_type < NUM_INDUSTRYTYPES) {
- CargoID others[MAX_CARGOES]; // Accepted cargoes not carried in the cargo column.
- int other_count = 0;
-
- const IndustrySpec *indsp = GetIndustrySpec(ind_fld->u.industry.ind_type);
- for (uint i = 0; i < lengthof(indsp->accepts_cargo); i++) {
- int col = cargo_fld->ConnectCargo(indsp->accepts_cargo[i], false);
- if (col < 0) others[other_count++] = indsp->accepts_cargo[i];
- }
-
- /* Allocate other cargoes in the empty holes of the horizontal cargo connections. */
- for (uint i = 0; i < MAX_CARGOES && other_count > 0; i++) {
- if (cargo_fld->u.cargo.cust_cargoes[i] == INVALID_CARGO) ind_fld->u.industry.other_accepted[i] = others[--other_count];
- }
- } else {
- /* Houses only display what is demanded. */
- for (uint i = 0; i < cargo_fld->u.cargo.num_cargoes; i++) {
- for (uint h = 0; h < NUM_HOUSES; h++) {
- HouseSpec *hs = HouseSpec::Get(h);
- if (!hs->enabled) continue;
-
- for (uint j = 0; j < lengthof(hs->accepts_cargo); j++) {
- if (cargo_fld->u.cargo.vertical_cargoes[i] == hs->accepts_cargo[j]) {
- cargo_fld->ConnectCargo(cargo_fld->u.cargo.vertical_cargoes[i], false);
- goto next_cargo;
- }
- }
- }
-next_cargo: ;
- }
- }
- }
-};
-
-
-/**
- * Window displaying the cargo connections around an industry (or cargo).
- *
- * The main display is constructed from 'fields', rectangles that contain an industry, piece of the cargo connection, cargo labels, or headers.
- * For a nice display, the following should be kept in mind:
- * - A #CFT_HEADER is always at the top of an column of #CFT_INDUSTRY fields.
- * - A #CFT_CARGO_LABEL field is also always put in a column of #CFT_INDUSTRY fields.
- * - The top row contains #CFT_HEADER and #CFT_SMALL_EMPTY fields.
- * - Cargo connections have a column of their own (#CFT_CARGO fields).
- * - Cargo accepted or produced by an industry, but not carried in a cargo connection, is drawn in the space of a cargo column attached to the industry.
- * The information however is part of the industry.
- *
- * This results in the following invariants:
- * - Width of a #CFT_INDUSTRY column is large enough to hold all industry type labels, all cargo labels, and all header texts.
- * - Height of a #CFT_INDUSTRY is large enough to hold a header line, or a industry type line, \c N cargo labels
- * (where \c N is the maximum number of cargoes connected between industries), \c N connections of cargo types, and space
- * between two industry types (1/2 above it, and 1/2 underneath it).
- * - Width of a cargo field (#CFT_CARGO) is large enough to hold \c N vertical columns (one for each type of cargo).
- * Also, space is needed between an industry and the leftmost/rightmost column to draw the non-carried cargoes.
- * - Height of a #CFT_CARGO field is equally high as the height of the #CFT_INDUSTRY.
- * - A field at the top (#CFT_HEADER or #CFT_SMALL_EMPTY) match the width of the fields below them (#CFT_INDUSTRY respectively
- * #CFT_CARGO), the height should be sufficient to display the header text.
- *
- * When displaying the cargoes around an industry type, five columns are needed (supplying industries, accepted cargoes, the industry,
- * produced cargoes, customer industries). Displaying the industries around a cargo needs three columns (supplying industries, the cargo,
- * customer industries). The remaining two columns are set to #CFT_EMPTY with a width equal to the average of a cargo and an industry column.
- */
-struct IndustryCargoesWindow : public Window {
- static const int HOR_TEXT_PADDING, VERT_TEXT_PADDING;
-
- typedef SmallVector Fields;
-
- Fields fields; ///< Fields to display in the #WID_IC_PANEL.
- uint ind_cargo; ///< If less than #NUM_INDUSTRYTYPES, an industry type, else a cargo id + NUM_INDUSTRYTYPES.
- Dimension cargo_textsize; ///< Size to hold any cargo text, as well as STR_INDUSTRY_CARGOES_SELECT_CARGO.
- Dimension ind_textsize; ///< Size to hold any industry type text, as well as STR_INDUSTRY_CARGOES_SELECT_INDUSTRY.
- Scrollbar *vscroll;
-
- IndustryCargoesWindow(int id) : Window(&_industry_cargoes_desc)
- {
- this->OnInit();
- this->CreateNestedTree();
- this->vscroll = this->GetScrollbar(WID_IC_SCROLLBAR);
- this->FinishInitNested(0);
- this->OnInvalidateData(id);
- }
-
- virtual void OnInit()
- {
- /* Initialize static CargoesField size variables. */
- Dimension d = GetStringBoundingBox(STR_INDUSTRY_CARGOES_PRODUCERS);
- d = maxdim(d, GetStringBoundingBox(STR_INDUSTRY_CARGOES_CUSTOMERS));
- d.width += WD_FRAMETEXT_LEFT + WD_FRAMETEXT_RIGHT;
- d.height += WD_FRAMETEXT_TOP + WD_FRAMETEXT_BOTTOM;
- CargoesField::small_height = d.height;
-
- /* Decide about the size of the box holding the text of an industry type. */
- this->ind_textsize.width = 0;
- this->ind_textsize.height = 0;
- for (IndustryType it = 0; it < NUM_INDUSTRYTYPES; it++) {
- const IndustrySpec *indsp = GetIndustrySpec(it);
- if (!indsp->enabled) continue;
- this->ind_textsize = maxdim(this->ind_textsize, GetStringBoundingBox(indsp->name));
- }
- d.width = max(d.width, this->ind_textsize.width);
- d.height = this->ind_textsize.height;
- this->ind_textsize = maxdim(this->ind_textsize, GetStringBoundingBox(STR_INDUSTRY_CARGOES_SELECT_INDUSTRY));
-
- /* Compute max size of the cargo texts. */
- this->cargo_textsize.width = 0;
- this->cargo_textsize.height = 0;
- for (uint i = 0; i < NUM_CARGO; i++) {
- const CargoSpec *csp = CargoSpec::Get(i);
- if (!csp->IsValid()) continue;
- this->cargo_textsize = maxdim(this->cargo_textsize, GetStringBoundingBox(csp->name));
- }
- d = maxdim(d, this->cargo_textsize); // Box must also be wide enough to hold any cargo label.
- this->cargo_textsize = maxdim(this->cargo_textsize, GetStringBoundingBox(STR_INDUSTRY_CARGOES_SELECT_CARGO));
-
- d.width += 2 * HOR_TEXT_PADDING;
- /* Ensure the height is enough for the industry type text, for the horizontal connections, and for the cargo labels. */
- uint min_ind_height = CargoesField::VERT_CARGO_EDGE * 2 + MAX_CARGOES * FONT_HEIGHT_NORMAL + (MAX_CARGOES - 1) * CargoesField::VERT_CARGO_SPACE;
- d.height = max(d.height + 2 * VERT_TEXT_PADDING, min_ind_height);
-
- CargoesField::industry_width = d.width;
- CargoesField::normal_height = d.height + CargoesField::VERT_INTER_INDUSTRY_SPACE;
- }
-
- virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
- {
- switch (widget) {
- case WID_IC_PANEL:
- size->width = WD_FRAMETEXT_LEFT + CargoesField::industry_width * 3 + CargoesField::CARGO_FIELD_WIDTH * 2 + WD_FRAMETEXT_RIGHT;
- break;
-
- case WID_IC_IND_DROPDOWN:
- size->width = max(size->width, this->ind_textsize.width + padding.width);
- break;
-
- case WID_IC_CARGO_DROPDOWN:
- size->width = max(size->width, this->cargo_textsize.width + padding.width);
- break;
- }
- }
-
-
- CargoesFieldType type; ///< Type of field.
- virtual void SetStringParameters (int widget) const
- {
- if (widget != WID_IC_CAPTION) return;
-
- if (this->ind_cargo < NUM_INDUSTRYTYPES) {
- const IndustrySpec *indsp = GetIndustrySpec(this->ind_cargo);
- SetDParam(0, indsp->name);
- } else {
- const CargoSpec *csp = CargoSpec::Get(this->ind_cargo - NUM_INDUSTRYTYPES);
- SetDParam(0, csp->name);
- }
- }
-
- /**
- * Do the two sets of cargoes have a valid cargo in common?
- * @param cargoes1 Base address of the first cargo array.
- * @param length1 Number of cargoes in the first cargo array.
- * @param cargoes2 Base address of the second cargo array.
- * @param length2 Number of cargoes in the second cargo array.
- * @return Arrays have at least one valid cargo in common.
- */
- static bool HasCommonValidCargo(const CargoID *cargoes1, uint length1, const CargoID *cargoes2, uint length2)
- {
- while (length1 > 0) {
- if (*cargoes1 != INVALID_CARGO) {
- for (uint i = 0; i < length2; i++) if (*cargoes1 == cargoes2[i]) return true;
- }
- cargoes1++;
- length1--;
- }
- return false;
- }
-
- /**
- * Can houses be used to supply one of the cargoes?
- * @param cargoes Base address of the cargo array.
- * @param length Number of cargoes in the array.
- * @return Houses can supply at least one of the cargoes.
- */
- static bool HousesCanSupply(const CargoID *cargoes, uint length)
- {
- for (uint i = 0; i < length; i++) {
- if (cargoes[i] == INVALID_CARGO) continue;
- if (cargoes[i] == CT_PASSENGERS || cargoes[i] == CT_MAIL) return true;
- }
- return false;
- }
-
- /**
- * Can houses be used as customers of the produced cargoes?
- * @param cargoes Base address of the cargo array.
- * @param length Number of cargoes in the array.
- * @return Houses can accept at least one of the cargoes.
- */
- static bool HousesCanAccept(const CargoID *cargoes, uint length)
- {
- HouseZones climate_mask;
- switch (_settings_game.game_creation.landscape) {
- case LT_TEMPERATE: climate_mask = HZ_TEMP; break;
- case LT_ARCTIC: climate_mask = HZ_SUBARTC_ABOVE | HZ_SUBARTC_BELOW; break;
- case LT_TROPIC: climate_mask = HZ_SUBTROPIC; break;
- case LT_TOYLAND: climate_mask = HZ_TOYLND; break;
- default: NOT_REACHED();
- }
- for (uint i = 0; i < length; i++) {
- if (cargoes[i] == INVALID_CARGO) continue;
-
- for (uint h = 0; h < NUM_HOUSES; h++) {
- HouseSpec *hs = HouseSpec::Get(h);
- if (!hs->enabled || !(hs->building_availability & climate_mask)) continue;
-
- for (uint j = 0; j < lengthof(hs->accepts_cargo); j++) {
- if (cargoes[i] == hs->accepts_cargo[j]) return true;
- }
- }
- }
- return false;
- }
-
- /**
- * Count how many industries have accepted cargoes in common with one of the supplied set.
- * @param cargoes Cargoes to search.
- * @param length Number of cargoes in \a cargoes.
- * @return Number of industries that have an accepted cargo in common with the supplied set.
- */
- static int CountMatchingAcceptingIndustries(const CargoID *cargoes, uint length)
- {
- int count = 0;
- for (IndustryType it = 0; it < NUM_INDUSTRYTYPES; it++) {
- const IndustrySpec *indsp = GetIndustrySpec(it);
- if (!indsp->enabled) continue;
-
- if (HasCommonValidCargo(cargoes, length, indsp->accepts_cargo, lengthof(indsp->accepts_cargo))) count++;
- }
- return count;
- }
-
- /**
- * Count how many industries have produced cargoes in common with one of the supplied set.
- * @param cargoes Cargoes to search.
- * @param length Number of cargoes in \a cargoes.
- * @return Number of industries that have a produced cargo in common with the supplied set.
- */
- static int CountMatchingProducingIndustries(const CargoID *cargoes, uint length)
- {
- int count = 0;
- for (IndustryType it = 0; it < NUM_INDUSTRYTYPES; it++) {
- const IndustrySpec *indsp = GetIndustrySpec(it);
- if (!indsp->enabled) continue;
-
- if (HasCommonValidCargo(cargoes, length, indsp->produced_cargo, lengthof(indsp->produced_cargo))) count++;
- }
- return count;
- }
-
- /**
- * Shorten the cargo column to just the part between industries.
- * @param column Column number of the cargo column.
- * @param top Current top row.
- * @param bottom Current bottom row.
- */
- void ShortenCargoColumn(int column, int top, int bottom)
- {
- while (top < bottom && !this->fields[top].columns[column].HasConnection()) {
- this->fields[top].columns[column].MakeEmpty(CFT_EMPTY);
- top++;
- }
- this->fields[top].columns[column].u.cargo.top_end = true;
-
- while (bottom > top && !this->fields[bottom].columns[column].HasConnection()) {
- this->fields[bottom].columns[column].MakeEmpty(CFT_EMPTY);
- bottom--;
- }
- this->fields[bottom].columns[column].u.cargo.bottom_end = true;
- }
-
- /**
- * Place an industry in the fields.
- * @param row Row of the new industry.
- * @param col Column of the new industry.
- * @param it Industry to place.
- */
- void PlaceIndustry(int row, int col, IndustryType it)
- {
- assert(this->fields[row].columns[col].type == CFT_EMPTY);
- this->fields[row].columns[col].MakeIndustry(it);
- if (col == 0) {
- this->fields[row].ConnectIndustryProduced(col);
- } else {
- this->fields[row].ConnectIndustryAccepted(col);
- }
- }
-
- /**
- * Notify smallmap that new displayed industries have been selected (in #_displayed_industries).
- */
- void NotifySmallmap()
- {
- if (!this->IsWidgetLowered(WID_IC_NOTIFY)) return;
-
- /* Only notify the smallmap window if it exists. In particular, do not
- * bring it to the front to prevent messing up any nice layout of the user. */
- InvalidateWindowClassesData(WC_SMALLMAP, 0);
- }
-
- /**
- * Compute what and where to display for industry type \a it.
- * @param it Industry type to display.
- */
- void ComputeIndustryDisplay(IndustryType it)
- {
- this->GetWidget(WID_IC_CAPTION)->widget_data = STR_INDUSTRY_CARGOES_INDUSTRY_CAPTION;
- this->ind_cargo = it;
- _displayed_industries = 1ULL << it;
-
- this->fields.Clear();
- CargoesRow *row = this->fields.Append();
- row->columns[0].MakeHeader(STR_INDUSTRY_CARGOES_PRODUCERS);
- row->columns[1].MakeEmpty(CFT_SMALL_EMPTY);
- row->columns[2].MakeEmpty(CFT_SMALL_EMPTY);
- row->columns[3].MakeEmpty(CFT_SMALL_EMPTY);
- row->columns[4].MakeHeader(STR_INDUSTRY_CARGOES_CUSTOMERS);
-
- const IndustrySpec *central_sp = GetIndustrySpec(it);
- bool houses_supply = HousesCanSupply(central_sp->accepts_cargo, lengthof(central_sp->accepts_cargo));
- bool houses_accept = HousesCanAccept(central_sp->produced_cargo, lengthof(central_sp->produced_cargo));
- /* Make a field consisting of two cargo columns. */
- int num_supp = CountMatchingProducingIndustries(central_sp->accepts_cargo, lengthof(central_sp->accepts_cargo)) + houses_supply;
- int num_cust = CountMatchingAcceptingIndustries(central_sp->produced_cargo, lengthof(central_sp->produced_cargo)) + houses_accept;
- int num_indrows = max(3, max(num_supp, num_cust)); // One is needed for the 'it' industry, and 2 for the cargo labels.
- for (int i = 0; i < num_indrows; i++) {
- CargoesRow *row = this->fields.Append();
- row->columns[0].MakeEmpty(CFT_EMPTY);
- row->columns[1].MakeCargo(central_sp->accepts_cargo, lengthof(central_sp->accepts_cargo));
- row->columns[2].MakeEmpty(CFT_EMPTY);
- row->columns[3].MakeCargo(central_sp->produced_cargo, lengthof(central_sp->produced_cargo));
- row->columns[4].MakeEmpty(CFT_EMPTY);
- }
- /* Add central industry. */
- int central_row = 1 + num_indrows / 2;
- this->fields[central_row].columns[2].MakeIndustry(it);
- this->fields[central_row].ConnectIndustryProduced(2);
- this->fields[central_row].ConnectIndustryAccepted(2);
-
- /* Add cargo labels. */
- this->fields[central_row - 1].MakeCargoLabel(2, true);
- this->fields[central_row + 1].MakeCargoLabel(2, false);
-
- /* Add suppliers and customers of the 'it' industry. */
- int supp_count = 0;
- int cust_count = 0;
- for (IndustryType it = 0; it < NUM_INDUSTRYTYPES; it++) {
- const IndustrySpec *indsp = GetIndustrySpec(it);
- if (!indsp->enabled) continue;
-
- if (HasCommonValidCargo(central_sp->accepts_cargo, lengthof(central_sp->accepts_cargo), indsp->produced_cargo, lengthof(indsp->produced_cargo))) {
- this->PlaceIndustry(1 + supp_count * num_indrows / num_supp, 0, it);
- SetBit(_displayed_industries, it);
- supp_count++;
- }
- if (HasCommonValidCargo(central_sp->produced_cargo, lengthof(central_sp->produced_cargo), indsp->accepts_cargo, lengthof(indsp->accepts_cargo))) {
- this->PlaceIndustry(1 + cust_count * num_indrows / num_cust, 4, it);
- SetBit(_displayed_industries, it);
- cust_count++;
- }
- }
- if (houses_supply) {
- this->PlaceIndustry(1 + supp_count * num_indrows / num_supp, 0, NUM_INDUSTRYTYPES);
- supp_count++;
- }
- if (houses_accept) {
- this->PlaceIndustry(1 + cust_count * num_indrows / num_cust, 4, NUM_INDUSTRYTYPES);
- cust_count++;
- }
-
- this->ShortenCargoColumn(1, 1, num_indrows);
- this->ShortenCargoColumn(3, 1, num_indrows);
- const NWidgetBase *nwp = this->GetWidget(WID_IC_PANEL);
- this->vscroll->SetCount(CeilDiv(WD_FRAMETEXT_TOP + WD_FRAMETEXT_BOTTOM + CargoesField::small_height + num_indrows * CargoesField::normal_height, nwp->resize_y));
- this->SetDirty();
- this->NotifySmallmap();
- }
-
- /**
- * Compute what and where to display for cargo id \a cid.
- * @param cid Cargo id to display.
- */
- void ComputeCargoDisplay(CargoID cid)
- {
- this->GetWidget(WID_IC_CAPTION)->widget_data = STR_INDUSTRY_CARGOES_CARGO_CAPTION;
- this->ind_cargo = cid + NUM_INDUSTRYTYPES;
- _displayed_industries = 0;
-
- this->fields.Clear();
- CargoesRow *row = this->fields.Append();
- row->columns[0].MakeHeader(STR_INDUSTRY_CARGOES_PRODUCERS);
- row->columns[1].MakeEmpty(CFT_SMALL_EMPTY);
- row->columns[2].MakeHeader(STR_INDUSTRY_CARGOES_CUSTOMERS);
- row->columns[3].MakeEmpty(CFT_SMALL_EMPTY);
- row->columns[4].MakeEmpty(CFT_SMALL_EMPTY);
-
- bool houses_supply = HousesCanSupply(&cid, 1);
- bool houses_accept = HousesCanAccept(&cid, 1);
- int num_supp = CountMatchingProducingIndustries(&cid, 1) + houses_supply + 1; // Ensure room for the cargo label.
- int num_cust = CountMatchingAcceptingIndustries(&cid, 1) + houses_accept;
- int num_indrows = max(num_supp, num_cust);
- for (int i = 0; i < num_indrows; i++) {
- CargoesRow *row = this->fields.Append();
- row->columns[0].MakeEmpty(CFT_EMPTY);
- row->columns[1].MakeCargo(&cid, 1);
- row->columns[2].MakeEmpty(CFT_EMPTY);
- row->columns[3].MakeEmpty(CFT_EMPTY);
- row->columns[4].MakeEmpty(CFT_EMPTY);
- }
-
- this->fields[num_indrows].MakeCargoLabel(0, false); // Add cargo labels at the left bottom.
-
- /* Add suppliers and customers of the cargo. */
- int supp_count = 0;
- int cust_count = 0;
- for (IndustryType it = 0; it < NUM_INDUSTRYTYPES; it++) {
- const IndustrySpec *indsp = GetIndustrySpec(it);
- if (!indsp->enabled) continue;
-
- if (HasCommonValidCargo(&cid, 1, indsp->produced_cargo, lengthof(indsp->produced_cargo))) {
- this->PlaceIndustry(1 + supp_count * num_indrows / num_supp, 0, it);
- SetBit(_displayed_industries, it);
- supp_count++;
- }
- if (HasCommonValidCargo(&cid, 1, indsp->accepts_cargo, lengthof(indsp->accepts_cargo))) {
- this->PlaceIndustry(1 + cust_count * num_indrows / num_cust, 2, it);
- SetBit(_displayed_industries, it);
- cust_count++;
- }
- }
- if (houses_supply) {
- this->PlaceIndustry(1 + supp_count * num_indrows / num_supp, 0, NUM_INDUSTRYTYPES);
- supp_count++;
- }
- if (houses_accept) {
- this->PlaceIndustry(1 + cust_count * num_indrows / num_cust, 2, NUM_INDUSTRYTYPES);
- cust_count++;
- }
-
- this->ShortenCargoColumn(1, 1, num_indrows);
- const NWidgetBase *nwp = this->GetWidget(WID_IC_PANEL);
- this->vscroll->SetCount(CeilDiv(WD_FRAMETEXT_TOP + WD_FRAMETEXT_BOTTOM + CargoesField::small_height + num_indrows * CargoesField::normal_height, nwp->resize_y));
- this->SetDirty();
- this->NotifySmallmap();
- }
-
- /**
- * Some data on this window has become invalid.
- * @param data Information about the changed data.
- * - data = 0 .. NUM_INDUSTRYTYPES - 1: Display the chain around the given industry.
- * - data = NUM_INDUSTRYTYPES: Stop sending updates to the smallmap window.
- * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
- */
- virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
- {
- if (!gui_scope) return;
- if (data == NUM_INDUSTRYTYPES) {
- if (this->IsWidgetLowered(WID_IC_NOTIFY)) {
- this->RaiseWidget(WID_IC_NOTIFY);
- this->SetWidgetDirty(WID_IC_NOTIFY);
- }
- return;
- }
-
- assert(data >= 0 && data < NUM_INDUSTRYTYPES);
- this->ComputeIndustryDisplay(data);
- }
-
- virtual void DrawWidget(const Rect &r, int widget) const
- {
- if (widget != WID_IC_PANEL) return;
-
- DrawPixelInfo tmp_dpi, *old_dpi;
- int width = r.right - r.left + 1;
- int height = r.bottom - r.top + 1 - WD_FRAMERECT_TOP - WD_FRAMERECT_BOTTOM;
- if (!FillDrawPixelInfo(&tmp_dpi, r.left + WD_FRAMERECT_LEFT, r.top + WD_FRAMERECT_TOP, width, height)) return;
- old_dpi = _cur_dpi;
- _cur_dpi = &tmp_dpi;
-
- int left_pos = WD_FRAMERECT_LEFT;
- if (this->ind_cargo >= NUM_INDUSTRYTYPES) left_pos += (CargoesField::industry_width + CargoesField::CARGO_FIELD_WIDTH) / 2;
- int last_column = (this->ind_cargo < NUM_INDUSTRYTYPES) ? 4 : 2;
-
- const NWidgetBase *nwp = this->GetWidget(WID_IC_PANEL);
- int vpos = -this->vscroll->GetPosition() * nwp->resize_y;
- for (uint i = 0; i < this->fields.Length(); i++) {
- int row_height = (i == 0) ? CargoesField::small_height : CargoesField::normal_height;
- if (vpos + row_height >= 0) {
- int xpos = left_pos;
- int col, dir;
- if (_current_text_dir == TD_RTL) {
- col = last_column;
- dir = -1;
- } else {
- col = 0;
- dir = 1;
- }
- while (col >= 0 && col <= last_column) {
- this->fields[i].columns[col].Draw(xpos, vpos);
- xpos += (col & 1) ? CargoesField::CARGO_FIELD_WIDTH : CargoesField::industry_width;
- col += dir;
- }
- }
- vpos += row_height;
- if (vpos >= height) break;
- }
-
- _cur_dpi = old_dpi;
- }
-
- /**
- * Calculate in which field was clicked, and within the field, at what position.
- * @param pt Clicked position in the #WID_IC_PANEL widget.
- * @param fieldxy If \c true is returned, field x/y coordinate of \a pt.
- * @param xy If \c true is returned, x/y coordinate with in the field.
- * @return Clicked at a valid position.
- */
- bool CalculatePositionInWidget(Point pt, Point *fieldxy, Point *xy)
- {
- const NWidgetBase *nw = this->GetWidget(WID_IC_PANEL);
- pt.x -= nw->pos_x;
- pt.y -= nw->pos_y;
-
- int vpos = WD_FRAMERECT_TOP + CargoesField::small_height - this->vscroll->GetPosition() * nw->resize_y;
- if (pt.y < vpos) return false;
-
- int row = (pt.y - vpos) / CargoesField::normal_height; // row is relative to row 1.
- if (row + 1 >= (int)this->fields.Length()) return false;
- vpos = pt.y - vpos - row * CargoesField::normal_height; // Position in the row + 1 field
- row++; // rebase row to match index of this->fields.
-
- int xpos = 2 * WD_FRAMERECT_LEFT + ((this->ind_cargo < NUM_INDUSTRYTYPES) ? 0 : (CargoesField::industry_width + CargoesField::CARGO_FIELD_WIDTH) / 2);
- if (pt.x < xpos) return false;
- int column;
- for (column = 0; column <= 5; column++) {
- int width = (column & 1) ? CargoesField::CARGO_FIELD_WIDTH : CargoesField::industry_width;
- if (pt.x < xpos + width) break;
- xpos += width;
- }
- int num_columns = (this->ind_cargo < NUM_INDUSTRYTYPES) ? 4 : 2;
- if (column > num_columns) return false;
- xpos = pt.x - xpos;
-
- /* Return both positions, compensating for RTL languages (which works due to the equal symmetry in both displays). */
- fieldxy->y = row;
- xy->y = vpos;
- if (_current_text_dir == TD_RTL) {
- fieldxy->x = num_columns - column;
- xy->x = ((column & 1) ? CargoesField::CARGO_FIELD_WIDTH : CargoesField::industry_width) - xpos;
- } else {
- fieldxy->x = column;
- xy->x = xpos;
- }
- return true;
- }
-
- virtual void OnClick(Point pt, int widget, int click_count)
- {
- switch (widget) {
- case WID_IC_PANEL: {
- Point fieldxy, xy;
- if (!CalculatePositionInWidget(pt, &fieldxy, &xy)) return;
-
- const CargoesField *fld = this->fields[fieldxy.y].columns + fieldxy.x;
- switch (fld->type) {
- case CFT_INDUSTRY:
- if (fld->u.industry.ind_type < NUM_INDUSTRYTYPES) this->ComputeIndustryDisplay(fld->u.industry.ind_type);
- break;
-
- case CFT_CARGO: {
- CargoesField *lft = (fieldxy.x > 0) ? this->fields[fieldxy.y].columns + fieldxy.x - 1 : NULL;
- CargoesField *rgt = (fieldxy.x < 4) ? this->fields[fieldxy.y].columns + fieldxy.x + 1 : NULL;
- CargoID cid = fld->CargoClickedAt(lft, rgt, xy);
- if (cid != INVALID_CARGO) this->ComputeCargoDisplay(cid);
- break;
- }
-
- case CFT_CARGO_LABEL: {
- CargoID cid = fld->CargoLabelClickedAt(xy);
- if (cid != INVALID_CARGO) this->ComputeCargoDisplay(cid);
- break;
- }
-
- default:
- break;
- }
- break;
- }
-
- case WID_IC_NOTIFY:
- this->ToggleWidgetLoweredState(WID_IC_NOTIFY);
- this->SetWidgetDirty(WID_IC_NOTIFY);
- if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
-
- if (this->IsWidgetLowered(WID_IC_NOTIFY)) {
- if (FindWindowByClass(WC_SMALLMAP) == NULL) ShowSmallMap();
- this->NotifySmallmap();
- }
- break;
-
- case WID_IC_CARGO_DROPDOWN: {
- DropDownList *lst = new DropDownList;
- const CargoSpec *cs;
- FOR_ALL_SORTED_STANDARD_CARGOSPECS(cs) {
- *lst->Append() = new DropDownListStringItem(cs->name, cs->Index(), false);
- }
- if (lst->Length() == 0) {
- delete lst;
- break;
- }
- int selected = (this->ind_cargo >= NUM_INDUSTRYTYPES) ? (int)(this->ind_cargo - NUM_INDUSTRYTYPES) : -1;
- ShowDropDownList(this, lst, selected, WID_IC_CARGO_DROPDOWN, 0, true);
- break;
- }
-
- case WID_IC_IND_DROPDOWN: {
- DropDownList *lst = new DropDownList;
- for (uint8 i = 0; i < NUM_INDUSTRYTYPES; i++) {
- IndustryType ind = _sorted_industry_types[i];
- const IndustrySpec *indsp = GetIndustrySpec(ind);
- if (!indsp->enabled) continue;
- *lst->Append() = new DropDownListStringItem(indsp->name, ind, false);
- }
- if (lst->Length() == 0) {
- delete lst;
- break;
- }
- int selected = (this->ind_cargo < NUM_INDUSTRYTYPES) ? (int)this->ind_cargo : -1;
- ShowDropDownList(this, lst, selected, WID_IC_IND_DROPDOWN, 0, true);
- break;
- }
- }
- }
-
- virtual void OnDropdownSelect(int widget, int index)
- {
- if (index < 0) return;
-
- switch (widget) {
- case WID_IC_CARGO_DROPDOWN:
- this->ComputeCargoDisplay(index);
- break;
-
- case WID_IC_IND_DROPDOWN:
- this->ComputeIndustryDisplay(index);
- break;
- }
- }
-
- virtual void OnHover(Point pt, int widget)
- {
- if (widget != WID_IC_PANEL) return;
-
- Point fieldxy, xy;
- if (!CalculatePositionInWidget(pt, &fieldxy, &xy)) return;
-
- const CargoesField *fld = this->fields[fieldxy.y].columns + fieldxy.x;
- CargoID cid = INVALID_CARGO;
- switch (fld->type) {
- case CFT_CARGO: {
- CargoesField *lft = (fieldxy.x > 0) ? this->fields[fieldxy.y].columns + fieldxy.x - 1 : NULL;
- CargoesField *rgt = (fieldxy.x < 4) ? this->fields[fieldxy.y].columns + fieldxy.x + 1 : NULL;
- cid = fld->CargoClickedAt(lft, rgt, xy);
- break;
- }
-
- case CFT_CARGO_LABEL: {
- cid = fld->CargoLabelClickedAt(xy);
- break;
- }
-
- case CFT_INDUSTRY:
- if (fld->u.industry.ind_type < NUM_INDUSTRYTYPES && (this->ind_cargo >= NUM_INDUSTRYTYPES || fieldxy.x != 2)) {
- GuiShowTooltips(this, STR_INDUSTRY_CARGOES_INDUSTRY_TOOLTIP, 0, NULL, TCC_HOVER);
- }
- return;
-
- default:
- break;
- }
- if (cid != INVALID_CARGO && (this->ind_cargo < NUM_INDUSTRYTYPES || cid != this->ind_cargo - NUM_INDUSTRYTYPES)) {
- const CargoSpec *csp = CargoSpec::Get(cid);
- uint64 params[5];
- params[0] = csp->name;
- GuiShowTooltips(this, STR_INDUSTRY_CARGOES_CARGO_TOOLTIP, 1, params, TCC_HOVER);
- }
- }
-
- virtual void OnResize()
- {
- this->vscroll->SetCapacityFromWidget(this, WID_IC_PANEL);
- }
-};
-
-const int IndustryCargoesWindow::HOR_TEXT_PADDING = 5; ///< Horizontal padding around the industry type text.
-const int IndustryCargoesWindow::VERT_TEXT_PADDING = 5; ///< Vertical padding around the industry type text.
-
-/**
- * Open the industry and cargoes window.
- * @param id Industry type to display, \c NUM_INDUSTRYTYPES selects a default industry type.
- */
-static void ShowIndustryCargoesWindow(IndustryType id)
-{
- if (id >= NUM_INDUSTRYTYPES) {
- for (uint8 i = 0; i < NUM_INDUSTRYTYPES; i++) {
- const IndustrySpec *indsp = GetIndustrySpec(_sorted_industry_types[i]);
- if (indsp->enabled) {
- id = _sorted_industry_types[i];
- break;
- }
- }
- if (id >= NUM_INDUSTRYTYPES) return;
- }
-
- Window *w = BringWindowToFrontById(WC_INDUSTRY_CARGOES, 0);
- if (w != NULL) {
- w->InvalidateData(id);
- return;
- }
- new IndustryCargoesWindow(id);
-}
-
-/** Open the industry and cargoes window with an industry. */
-void ShowIndustryCargoesWindow()
-{
- ShowIndustryCargoesWindow(NUM_INDUSTRYTYPES);
-}
diff --git a/src/lang/english.txt.orig b/src/lang/english.txt.orig
deleted file mode 100644
index fb21d3fded..0000000000
--- a/src/lang/english.txt.orig
+++ /dev/null
@@ -1,4887 +0,0 @@
-##name English (UK)
-##ownname English (UK)
-##isocode en_GB
-##plural 0
-##textdir ltr
-##digitsep ,
-##digitsepcur ,
-##decimalsep .
-##winlangid 0x0809
-##grflangid 0x01
-
-
-# $Id$
-
-# This file is part of OpenTTD.
-# OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
-# OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see .
-
-
-##id 0x0000
-STR_NULL :
-STR_EMPTY :
-STR_UNDEFINED :(undefined string)
-STR_JUST_NOTHING :Nothing
-
-# Cargo related strings
-# Plural cargo name
-STR_CARGO_PLURAL_NOTHING :
-STR_CARGO_PLURAL_PASSENGERS :Passengers
-STR_CARGO_PLURAL_COAL :Coal
-STR_CARGO_PLURAL_MAIL :Mail
-STR_CARGO_PLURAL_OIL :Oil
-STR_CARGO_PLURAL_LIVESTOCK :Livestock
-STR_CARGO_PLURAL_GOODS :Goods
-STR_CARGO_PLURAL_GRAIN :Grain
-STR_CARGO_PLURAL_WOOD :Wood
-STR_CARGO_PLURAL_IRON_ORE :Iron Ore
-STR_CARGO_PLURAL_STEEL :Steel
-STR_CARGO_PLURAL_VALUABLES :Valuables
-STR_CARGO_PLURAL_COPPER_ORE :Copper Ore
-STR_CARGO_PLURAL_MAIZE :Maize
-STR_CARGO_PLURAL_FRUIT :Fruit
-STR_CARGO_PLURAL_DIAMONDS :Diamonds
-STR_CARGO_PLURAL_FOOD :Food
-STR_CARGO_PLURAL_PAPER :Paper
-STR_CARGO_PLURAL_GOLD :Gold
-STR_CARGO_PLURAL_WATER :Water
-STR_CARGO_PLURAL_WHEAT :Wheat
-STR_CARGO_PLURAL_RUBBER :Rubber
-STR_CARGO_PLURAL_SUGAR :Sugar
-STR_CARGO_PLURAL_TOYS :Toys
-STR_CARGO_PLURAL_CANDY :Sweets
-STR_CARGO_PLURAL_COLA :Cola
-STR_CARGO_PLURAL_COTTON_CANDY :Candyfloss
-STR_CARGO_PLURAL_BUBBLES :Bubbles
-STR_CARGO_PLURAL_TOFFEE :Toffee
-STR_CARGO_PLURAL_BATTERIES :Batteries
-STR_CARGO_PLURAL_PLASTIC :Plastic
-STR_CARGO_PLURAL_FIZZY_DRINKS :Fizzy Drinks
-
-# Singular cargo name
-STR_CARGO_SINGULAR_NOTHING :
-STR_CARGO_SINGULAR_PASSENGER :Passenger
-STR_CARGO_SINGULAR_COAL :Coal
-STR_CARGO_SINGULAR_MAIL :Mail
-STR_CARGO_SINGULAR_OIL :Oil
-STR_CARGO_SINGULAR_LIVESTOCK :Livestock
-STR_CARGO_SINGULAR_GOODS :Goods
-STR_CARGO_SINGULAR_GRAIN :Grain
-STR_CARGO_SINGULAR_WOOD :Wood
-STR_CARGO_SINGULAR_IRON_ORE :Iron Ore
-STR_CARGO_SINGULAR_STEEL :Steel
-STR_CARGO_SINGULAR_VALUABLES :Valuables
-STR_CARGO_SINGULAR_COPPER_ORE :Copper Ore
-STR_CARGO_SINGULAR_MAIZE :Maize
-STR_CARGO_SINGULAR_FRUIT :Fruit
-STR_CARGO_SINGULAR_DIAMOND :Diamond
-STR_CARGO_SINGULAR_FOOD :Food
-STR_CARGO_SINGULAR_PAPER :Paper
-STR_CARGO_SINGULAR_GOLD :Gold
-STR_CARGO_SINGULAR_WATER :Water
-STR_CARGO_SINGULAR_WHEAT :Wheat
-STR_CARGO_SINGULAR_RUBBER :Rubber
-STR_CARGO_SINGULAR_SUGAR :Sugar
-STR_CARGO_SINGULAR_TOY :Toy
-STR_CARGO_SINGULAR_CANDY :Sweet
-STR_CARGO_SINGULAR_COLA :Cola
-STR_CARGO_SINGULAR_COTTON_CANDY :Candyfloss
-STR_CARGO_SINGULAR_BUBBLE :Bubble
-STR_CARGO_SINGULAR_TOFFEE :Toffee
-STR_CARGO_SINGULAR_BATTERY :Battery
-STR_CARGO_SINGULAR_PLASTIC :Plastic
-STR_CARGO_SINGULAR_FIZZY_DRINK :Fizzy Drink
-
-# Quantity of cargo
-STR_QUANTITY_NOTHING :
-STR_QUANTITY_PASSENGERS :{COMMA} passenger{P "" s}
-STR_QUANTITY_COAL :{WEIGHT_LONG} of coal
-STR_QUANTITY_MAIL :{COMMA} bag{P "" s} of mail
-STR_QUANTITY_OIL :{VOLUME_LONG} of oil
-STR_QUANTITY_LIVESTOCK :{COMMA} item{P "" s} of livestock
-STR_QUANTITY_GOODS :{COMMA} crate{P "" s} of goods
-STR_QUANTITY_GRAIN :{WEIGHT_LONG} of grain
-STR_QUANTITY_WOOD :{WEIGHT_LONG} of wood
-STR_QUANTITY_IRON_ORE :{WEIGHT_LONG} of iron ore
-STR_QUANTITY_STEEL :{WEIGHT_LONG} of steel
-STR_QUANTITY_VALUABLES :{COMMA} bag{P "" s} of valuables
-STR_QUANTITY_COPPER_ORE :{WEIGHT_LONG} of copper ore
-STR_QUANTITY_MAIZE :{WEIGHT_LONG} of maize
-STR_QUANTITY_FRUIT :{WEIGHT_LONG} of fruit
-STR_QUANTITY_DIAMONDS :{COMMA} bag{P "" s} of diamonds
-STR_QUANTITY_FOOD :{WEIGHT_LONG} of food
-STR_QUANTITY_PAPER :{WEIGHT_LONG} of paper
-STR_QUANTITY_GOLD :{COMMA} bag{P "" s} of gold
-STR_QUANTITY_WATER :{VOLUME_LONG} of water
-STR_QUANTITY_WHEAT :{WEIGHT_LONG} of wheat
-STR_QUANTITY_RUBBER :{VOLUME_LONG} of rubber
-STR_QUANTITY_SUGAR :{WEIGHT_LONG} of sugar
-STR_QUANTITY_TOYS :{COMMA} toy{P "" s}
-STR_QUANTITY_SWEETS :{COMMA} bag{P "" s} of sweets
-STR_QUANTITY_COLA :{VOLUME_LONG} of cola
-STR_QUANTITY_CANDYFLOSS :{WEIGHT_LONG} of candyfloss
-STR_QUANTITY_BUBBLES :{COMMA} bubble{P "" s}
-STR_QUANTITY_TOFFEE :{WEIGHT_LONG} of toffee
-STR_QUANTITY_BATTERIES :{COMMA} batter{P y ies}
-STR_QUANTITY_PLASTIC :{VOLUME_LONG} of plastic
-STR_QUANTITY_FIZZY_DRINKS :{COMMA} fizzy drink{P "" s}
-STR_QUANTITY_N_A :N/A
-
-# Two letter abbreviation of cargo name
-STR_ABBREV_NOTHING :
-STR_ABBREV_PASSENGERS :{TINY_FONT}PS
-STR_ABBREV_COAL :{TINY_FONT}CL
-STR_ABBREV_MAIL :{TINY_FONT}ML
-STR_ABBREV_OIL :{TINY_FONT}OL
-STR_ABBREV_LIVESTOCK :{TINY_FONT}LV
-STR_ABBREV_GOODS :{TINY_FONT}GD
-STR_ABBREV_GRAIN :{TINY_FONT}GR
-STR_ABBREV_WOOD :{TINY_FONT}WD
-STR_ABBREV_IRON_ORE :{TINY_FONT}OR
-STR_ABBREV_STEEL :{TINY_FONT}ST
-STR_ABBREV_VALUABLES :{TINY_FONT}VL
-STR_ABBREV_COPPER_ORE :{TINY_FONT}CO
-STR_ABBREV_MAIZE :{TINY_FONT}MZ
-STR_ABBREV_FRUIT :{TINY_FONT}FT
-STR_ABBREV_DIAMONDS :{TINY_FONT}DM
-STR_ABBREV_FOOD :{TINY_FONT}FD
-STR_ABBREV_PAPER :{TINY_FONT}PR
-STR_ABBREV_GOLD :{TINY_FONT}GD
-STR_ABBREV_WATER :{TINY_FONT}WR
-STR_ABBREV_WHEAT :{TINY_FONT}WH
-STR_ABBREV_RUBBER :{TINY_FONT}RB
-STR_ABBREV_SUGAR :{TINY_FONT}SG
-STR_ABBREV_TOYS :{TINY_FONT}TY
-STR_ABBREV_SWEETS :{TINY_FONT}SW
-STR_ABBREV_COLA :{TINY_FONT}CL
-STR_ABBREV_CANDYFLOSS :{TINY_FONT}CF
-STR_ABBREV_BUBBLES :{TINY_FONT}BU
-STR_ABBREV_TOFFEE :{TINY_FONT}TF
-STR_ABBREV_BATTERIES :{TINY_FONT}BA
-STR_ABBREV_PLASTIC :{TINY_FONT}PL
-STR_ABBREV_FIZZY_DRINKS :{TINY_FONT}FZ
-STR_ABBREV_NONE :{TINY_FONT}NO
-STR_ABBREV_ALL :{TINY_FONT}ALL
-
-# 'Mode' of transport for cargoes
-STR_PASSENGERS :{COMMA} passenger{P "" s}
-STR_BAGS :{COMMA} bag{P "" s}
-STR_TONS :{COMMA} tonne{P "" s}
-STR_LITERS :{COMMA} litre{P "" s}
-STR_ITEMS :{COMMA} item{P "" s}
-STR_CRATES :{COMMA} crate{P "" s}
-
-# Colours, do not shuffle
-STR_COLOUR_DARK_BLUE :Dark Blue
-STR_COLOUR_PALE_GREEN :Pale Green
-STR_COLOUR_PINK :Pink
-STR_COLOUR_YELLOW :Yellow
-STR_COLOUR_RED :Red
-STR_COLOUR_LIGHT_BLUE :Light Blue
-STR_COLOUR_GREEN :Green
-STR_COLOUR_DARK_GREEN :Dark Green
-STR_COLOUR_BLUE :Blue
-STR_COLOUR_CREAM :Cream
-STR_COLOUR_MAUVE :Mauve
-STR_COLOUR_PURPLE :Purple
-STR_COLOUR_ORANGE :Orange
-STR_COLOUR_BROWN :Brown
-STR_COLOUR_GREY :Grey
-STR_COLOUR_WHITE :White
-
-# Units used in OpenTTD
-STR_UNITS_VELOCITY_IMPERIAL :{COMMA} mph
-STR_UNITS_VELOCITY_METRIC :{COMMA} km/h
-STR_UNITS_VELOCITY_SI :{COMMA} m/s
-
-STR_UNITS_POWER_IMPERIAL :{COMMA}hp
-STR_UNITS_POWER_METRIC :{COMMA}hp
-STR_UNITS_POWER_SI :{COMMA}kW
-
-STR_UNITS_WEIGHT_SHORT_IMPERIAL :{COMMA}t
-STR_UNITS_WEIGHT_SHORT_METRIC :{COMMA}t
-STR_UNITS_WEIGHT_SHORT_SI :{COMMA}kg
-
-STR_UNITS_WEIGHT_LONG_IMPERIAL :{COMMA} ton{P "" s}
-STR_UNITS_WEIGHT_LONG_METRIC :{COMMA} tonne{P "" s}
-STR_UNITS_WEIGHT_LONG_SI :{COMMA} kg
-
-STR_UNITS_VOLUME_SHORT_IMPERIAL :{COMMA}gal
-STR_UNITS_VOLUME_SHORT_METRIC :{COMMA}l
-STR_UNITS_VOLUME_SHORT_SI :{COMMA}m³
-
-STR_UNITS_VOLUME_LONG_IMPERIAL :{COMMA} gallon{P "" s}
-STR_UNITS_VOLUME_LONG_METRIC :{COMMA} litre{P "" s}
-STR_UNITS_VOLUME_LONG_SI :{COMMA} m³
-
-STR_UNITS_FORCE_IMPERIAL :{COMMA} lbf
-STR_UNITS_FORCE_METRIC :{COMMA} kgf
-STR_UNITS_FORCE_SI :{COMMA} kN
-
-STR_UNITS_HEIGHT_IMPERIAL :{COMMA} ft
-STR_UNITS_HEIGHT_METRIC :{COMMA} m
-STR_UNITS_HEIGHT_SI :{COMMA} m
-
-# Common window strings
-STR_LIST_FILTER_TITLE :{BLACK}Filter string:
-STR_LIST_FILTER_OSKTITLE :{BLACK}Enter filter string
-STR_LIST_FILTER_TOOLTIP :{BLACK}Enter a keyword to filter the list for
-
-STR_TOOLTIP_GROUP_ORDER :{BLACK}Select grouping order
-STR_TOOLTIP_SORT_ORDER :{BLACK}Select sorting order (descending/ascending)
-STR_TOOLTIP_SORT_CRITERIA :{BLACK}Select sorting criteria
-STR_TOOLTIP_FILTER_CRITERIA :{BLACK}Select filtering criteria
-STR_BUTTON_SORT_BY :{BLACK}Sort by
-STR_BUTTON_LOCATION :{BLACK}Location
-STR_BUTTON_RENAME :{BLACK}Rename
-
-STR_TOOLTIP_CLOSE_WINDOW :{BLACK}Close window
-STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS :{BLACK}Window title - drag this to move window
-STR_TOOLTIP_SHADE :{BLACK}Shade window - only show the title bar
-STR_TOOLTIP_DEBUG :{BLACK}Show NewGRF debug information
-STR_TOOLTIP_DEFSIZE :{BLACK}Resize window to default size. Ctrl+Click to store current size as default
-STR_TOOLTIP_STICKY :{BLACK}Mark this window as uncloseable by the 'Close All Windows' key. Ctrl+Click to also save state as default
-STR_TOOLTIP_RESIZE :{BLACK}Click and drag to resize this window
-STR_TOOLTIP_TOGGLE_LARGE_SMALL_WINDOW :{BLACK}Toggle large/small window size
-STR_TOOLTIP_VSCROLL_BAR_SCROLLS_LIST :{BLACK}Scroll bar - scrolls list up/down
-STR_TOOLTIP_HSCROLL_BAR_SCROLLS_LIST :{BLACK}Scroll bar - scrolls list left/right
-STR_TOOLTIP_DEMOLISH_BUILDINGS_ETC :{BLACK}Demolish buildings etc. on a square of land. Ctrl selects the area diagonally. Shift toggles building/showing cost estimate
-
-# Query window
-STR_BUTTON_DEFAULT :{BLACK}Default
-STR_BUTTON_CANCEL :{BLACK}Cancel
-STR_BUTTON_OK :{BLACK}OK
-
-# On screen keyboard window
-STR_OSK_KEYBOARD_LAYOUT :`1234567890-=\qwertyuiop[]asdfghjkl;' zxcvbnm,./ .
-STR_OSK_KEYBOARD_LAYOUT_CAPS :~!@#$%^&*()_+|QWERTYUIOP{{}}ASDFGHJKL:" ZXCVBNM<>? .
-
-# Measurement tooltip
-STR_MEASURE_LENGTH :{BLACK}Length: {NUM}
-STR_MEASURE_AREA :{BLACK}Area: {NUM} x {NUM}
-STR_MEASURE_LENGTH_HEIGHTDIFF :{BLACK}Length: {NUM}{}Height difference: {HEIGHT}
-STR_MEASURE_AREA_HEIGHTDIFF :{BLACK}Area: {NUM} x {NUM}{}Height difference: {HEIGHT}
-
-
-# These are used in buttons
-STR_SORT_BY_CAPTION_NAME :{BLACK}Name
-STR_SORT_BY_CAPTION_DATE :{BLACK}Date
-# These are used in dropdowns
-STR_SORT_BY_NAME :Name
-STR_SORT_BY_PRODUCTION :Production
-STR_SORT_BY_TYPE :Type
-STR_SORT_BY_TRANSPORTED :Transported
-STR_SORT_BY_NUMBER :Number
-STR_SORT_BY_PROFIT_LAST_YEAR :Profit last year
-STR_SORT_BY_PROFIT_THIS_YEAR :Profit this year
-STR_SORT_BY_AGE :Age
-STR_SORT_BY_RELIABILITY :Reliability
-STR_SORT_BY_TOTAL_CAPACITY_PER_CARGOTYPE :Total capacity per cargo type
-STR_SORT_BY_MAX_SPEED :Maximum speed
-STR_SORT_BY_MODEL :Model
-STR_SORT_BY_VALUE :Value
-STR_SORT_BY_LENGTH :Length
-STR_SORT_BY_LIFE_TIME :Remaining lifetime
-STR_SORT_BY_TIMETABLE_DELAY :Timetable delay
-STR_SORT_BY_FACILITY :Station type
-STR_SORT_BY_WAITING_TOTAL :Total waiting cargo
-STR_SORT_BY_WAITING_AVAILABLE :Available waiting cargo
-STR_SORT_BY_RATING_MAX :Highest cargo rating
-STR_SORT_BY_RATING_MIN :Lowest cargo rating
-STR_SORT_BY_ENGINE_ID :EngineID (classic sort)
-STR_SORT_BY_COST :Cost
-STR_SORT_BY_POWER :Power
-STR_SORT_BY_TRACTIVE_EFFORT :Tractive effort
-STR_SORT_BY_INTRO_DATE :Introduction date
-STR_SORT_BY_RUNNING_COST :Running cost
-STR_SORT_BY_POWER_VS_RUNNING_COST :Power/Running cost
-STR_SORT_BY_CARGO_CAPACITY :Cargo capacity
-STR_SORT_BY_RANGE :Range
-STR_SORT_BY_POPULATION :Population
-STR_SORT_BY_RATING :Rating
-
-# Tooltips for the main toolbar
-STR_TOOLBAR_TOOLTIP_PAUSE_GAME :{BLACK}Pause game
-STR_TOOLBAR_TOOLTIP_FORWARD :{BLACK}Fast forward the game
-STR_TOOLBAR_TOOLTIP_OPTIONS :{BLACK}Options
-STR_TOOLBAR_TOOLTIP_SAVE_GAME_ABANDON_GAME :{BLACK}Save game, abandon game, exit
-STR_TOOLBAR_TOOLTIP_DISPLAY_MAP :{BLACK}Display map, extra viewport or list of signs
-STR_TOOLBAR_TOOLTIP_DISPLAY_TOWN_DIRECTORY :{BLACK}Display town directory
-STR_TOOLBAR_TOOLTIP_DISPLAY_SUBSIDIES :{BLACK}Display subsidies
-STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_STATIONS :{BLACK}Display list of company's stations
-STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_FINANCES :{BLACK}Display company finances information
-STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_GENERAL :{BLACK}Display general company information
-STR_TOOLBAR_TOOLTIP_DISPLAY_STORY_BOOK :{BLACK}Display story book
-STR_TOOLBAR_TOOLTIP_DISPLAY_GOALS_LIST :{BLACK}Display goal list
-STR_TOOLBAR_TOOLTIP_DISPLAY_GRAPHS :{BLACK}Display graphs
-STR_TOOLBAR_TOOLTIP_DISPLAY_COMPANY_LEAGUE :{BLACK}Display company league table
-STR_TOOLBAR_TOOLTIP_FUND_CONSTRUCTION_OF_NEW :{BLACK}Fund construction of new industry or list all industries
-STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_TRAINS :{BLACK}Display list of company's trains. Ctrl+Click toggles opening the group/vehicle list
-STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_ROAD_VEHICLES :{BLACK}Display list of company's road vehicles. Ctrl+Click toggles opening the group/vehicle list
-STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_SHIPS :{BLACK}Display list of company's ships. Ctrl+Click toggles opening the group/vehicle list
-STR_TOOLBAR_TOOLTIP_DISPLAY_LIST_OF_COMPANY_AIRCRAFT :{BLACK}Display list of company's aircraft. Ctrl+Click toggles opening the group/vehicle list
-STR_TOOLBAR_TOOLTIP_ZOOM_THE_VIEW_IN :{BLACK}Zoom the view in
-STR_TOOLBAR_TOOLTIP_ZOOM_THE_VIEW_OUT :{BLACK}Zoom the view out
-STR_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}Build railway track
-STR_TOOLBAR_TOOLTIP_BUILD_ROADS :{BLACK}Build roads
-STR_TOOLBAR_TOOLTIP_BUILD_SHIP_DOCKS :{BLACK}Build ship docks
-STR_TOOLBAR_TOOLTIP_BUILD_AIRPORTS :{BLACK}Build airports
-STR_TOOLBAR_TOOLTIP_LANDSCAPING :{BLACK}Open the landscaping toolbar to raise/lower land, plant trees, etc.
-STR_TOOLBAR_TOOLTIP_SHOW_SOUND_MUSIC_WINDOW :{BLACK}Show sound/music window
-STR_TOOLBAR_TOOLTIP_SHOW_LAST_MESSAGE_NEWS :{BLACK}Show last message/news report, show message options
-STR_TOOLBAR_TOOLTIP_LAND_BLOCK_INFORMATION :{BLACK}Land area information, console, script debug, screenshots, about OpenTTD
-STR_TOOLBAR_TOOLTIP_SWITCH_TOOLBAR :{BLACK}Switch toolbars
-
-# Extra tooltips for the scenario editor toolbar
-STR_SCENEDIT_TOOLBAR_TOOLTIP_SAVE_SCENARIO_LOAD_SCENARIO :{BLACK}Save scenario, load scenario, abandon scenario editor, exit
-STR_SCENEDIT_TOOLBAR_OPENTTD :{YELLOW}OpenTTD
-STR_SCENEDIT_TOOLBAR_SCENARIO_EDITOR :{YELLOW}Scenario Editor
-STR_SCENEDIT_TOOLBAR_TOOLTIP_MOVE_THE_STARTING_DATE_BACKWARD :{BLACK}Move the starting date backward 1 year
-STR_SCENEDIT_TOOLBAR_TOOLTIP_MOVE_THE_STARTING_DATE_FORWARD :{BLACK}Move the starting date forward 1 year
-STR_SCENEDIT_TOOLBAR_TOOLTIP_SET_DATE :{BLACK}Click to enter the starting year
-STR_SCENEDIT_TOOLBAR_TOOLTIP_DISPLAY_MAP_TOWN_DIRECTORY :{BLACK}Display map, town directory
-STR_SCENEDIT_TOOLBAR_LANDSCAPE_GENERATION :{BLACK}Landscape generation
-STR_SCENEDIT_TOOLBAR_TOWN_GENERATION :{BLACK}Town generation
-STR_SCENEDIT_TOOLBAR_INDUSTRY_GENERATION :{BLACK}Industry generation
-STR_SCENEDIT_TOOLBAR_ROAD_CONSTRUCTION :{BLACK}Road construction
-STR_SCENEDIT_TOOLBAR_PLANT_TREES :{BLACK}Plant trees. Shift toggles building/showing cost estimate
-STR_SCENEDIT_TOOLBAR_PLACE_SIGN :{BLACK}Place sign
-STR_SCENEDIT_TOOLBAR_PLACE_OBJECT :{BLACK}Place object. Shift toggles building/showing cost estimate
-
-############ range for SE file menu starts
-STR_SCENEDIT_FILE_MENU_SAVE_SCENARIO :Save scenario
-STR_SCENEDIT_FILE_MENU_LOAD_SCENARIO :Load scenario
-STR_SCENEDIT_FILE_MENU_SAVE_HEIGHTMAP :Save heightmap
-STR_SCENEDIT_FILE_MENU_LOAD_HEIGHTMAP :Load heightmap
-STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Abandon scenario editor
-STR_SCENEDIT_FILE_MENU_SEPARATOR :
-STR_SCENEDIT_FILE_MENU_QUIT :Exit
-############ range for SE file menu starts
-
-############ range for settings menu starts
-STR_SETTINGS_MENU_GAME_OPTIONS :Game options
-STR_SETTINGS_MENU_CONFIG_SETTINGS :Advanced settings
-STR_SETTINGS_MENU_SCRIPT_SETTINGS :AI/Game script settings
-STR_SETTINGS_MENU_NEWGRF_SETTINGS :NewGRF settings
-STR_SETTINGS_MENU_TRANSPARENCY_OPTIONS :Transparency options
-STR_SETTINGS_MENU_TOWN_NAMES_DISPLAYED :Town names displayed
-STR_SETTINGS_MENU_STATION_NAMES_DISPLAYED :Station names displayed
-STR_SETTINGS_MENU_WAYPOINTS_DISPLAYED :Waypoint names displayed
-STR_SETTINGS_MENU_SIGNS_DISPLAYED :Signs displayed
-STR_SETTINGS_MENU_SHOW_COMPETITOR_SIGNS :Competitor signs and names displayed
-STR_SETTINGS_MENU_FULL_ANIMATION :Full animation
-STR_SETTINGS_MENU_FULL_DETAIL :Full detail
-STR_SETTINGS_MENU_TRANSPARENT_BUILDINGS :Transparent buildings
-STR_SETTINGS_MENU_TRANSPARENT_SIGNS :Transparent signs
-############ range ends here
-
-############ range for file menu starts
-STR_FILE_MENU_SAVE_GAME :Save game
-STR_FILE_MENU_LOAD_GAME :Load game
-STR_FILE_MENU_QUIT_GAME :Abandon game
-STR_FILE_MENU_SEPARATOR :
-STR_FILE_MENU_EXIT :Exit
-############ range ends here
-
-# map menu
-STR_MAP_MENU_MAP_OF_WORLD :Map of world
-STR_MAP_MENU_EXTRA_VIEW_PORT :Extra viewport
-STR_MAP_MENU_LINGRAPH_LEGEND :Cargo Flow Legend
-STR_MAP_MENU_SIGN_LIST :Sign list
-
-############ range for town menu starts
-STR_TOWN_MENU_TOWN_DIRECTORY :Town directory
-STR_TOWN_MENU_FOUND_TOWN :Found town
-############ range ends here
-
-############ range for subsidies menu starts
-STR_SUBSIDIES_MENU_SUBSIDIES :Subsidies
-############ range ends here
-
-############ range for graph menu starts
-STR_GRAPH_MENU_OPERATING_PROFIT_GRAPH :Operating profit graph
-STR_GRAPH_MENU_INCOME_GRAPH :Income graph
-STR_GRAPH_MENU_DELIVERED_CARGO_GRAPH :Delivered cargo graph
-STR_GRAPH_MENU_PERFORMANCE_HISTORY_GRAPH :Performance history graph
-STR_GRAPH_MENU_COMPANY_VALUE_GRAPH :Company value graph
-STR_GRAPH_MENU_CARGO_PAYMENT_RATES :Cargo payment rates
-############ range ends here
-
-############ range for company league menu starts
-STR_GRAPH_MENU_COMPANY_LEAGUE_TABLE :Company league table
-STR_GRAPH_MENU_DETAILED_PERFORMANCE_RATING :Detailed performance rating
-STR_GRAPH_MENU_HIGHSCORE :Highscore table
-############ range ends here
-
-############ range for industry menu starts
-STR_INDUSTRY_MENU_INDUSTRY_DIRECTORY :Industry directory
-STR_INDUSTRY_MENU_INDUSTRY_CHAIN :Industry chains
-STR_INDUSTRY_MENU_FUND_NEW_INDUSTRY :Fund new industry
-############ range ends here
-
-############ range for railway construction menu starts
-STR_RAIL_MENU_RAILROAD_CONSTRUCTION :Railway construction
-STR_RAIL_MENU_ELRAIL_CONSTRUCTION :Electrified railway construction
-STR_RAIL_MENU_MONORAIL_CONSTRUCTION :Monorail construction
-STR_RAIL_MENU_MAGLEV_CONSTRUCTION :Maglev construction
-############ range ends here
-
-############ range for road construction menu starts
-STR_ROAD_MENU_ROAD_CONSTRUCTION :Road construction
-STR_ROAD_MENU_TRAM_CONSTRUCTION :Tramway construction
-############ range ends here
-
-############ range for waterways construction menu starts
-STR_WATERWAYS_MENU_WATERWAYS_CONSTRUCTION :Waterways construction
-############ range ends here
-
-############ range for airport construction menu starts
-STR_AIRCRAFT_MENU_AIRPORT_CONSTRUCTION :Airport construction
-############ range ends here
-
-############ range for landscaping menu starts
-STR_LANDSCAPING_MENU_LANDSCAPING :Landscaping
-############ range ends here
-
-############ range for music menu starts
-STR_TOOLBAR_SOUND_MUSIC :Sound/music
-############ range ends here
-
-############ range for message menu starts
-STR_NEWS_MENU_LAST_MESSAGE_NEWS_REPORT :Last message/news report
-STR_NEWS_MENU_MESSAGE_HISTORY_MENU :Message history
-############ range ends here
-
-############ range for about menu starts
-STR_ABOUT_MENU_LAND_BLOCK_INFO :Land area information
-STR_ABOUT_MENU_SEPARATOR :
-STR_ABOUT_MENU_TOGGLE_CONSOLE :Toggle console
-STR_ABOUT_MENU_AI_DEBUG :AI/Game script debug
-STR_ABOUT_MENU_SCREENSHOT :Screenshot
-STR_ABOUT_MENU_ZOOMIN_SCREENSHOT :Fully zoomed in screenshot
-STR_ABOUT_MENU_DEFAULTZOOM_SCREENSHOT :Default zoom screenshot
-STR_ABOUT_MENU_GIANT_SCREENSHOT :Whole map screenshot
-STR_ABOUT_MENU_ABOUT_OPENTTD :About 'OpenTTD'
-STR_ABOUT_MENU_SPRITE_ALIGNER :Sprite aligner
-STR_ABOUT_MENU_TOGGLE_BOUNDING_BOXES :Toggle bounding boxes
-STR_ABOUT_MENU_TOGGLE_DIRTY_BLOCKS :Toggle colouring of dirty blocks
-############ range ends here
-
-############ range for days starts (also used for the place in the highscore window)
-STR_ORDINAL_NUMBER_1ST :1st
-STR_ORDINAL_NUMBER_2ND :2nd
-STR_ORDINAL_NUMBER_3RD :3rd
-STR_ORDINAL_NUMBER_4TH :4th
-STR_ORDINAL_NUMBER_5TH :5th
-STR_ORDINAL_NUMBER_6TH :6th
-STR_ORDINAL_NUMBER_7TH :7th
-STR_ORDINAL_NUMBER_8TH :8th
-STR_ORDINAL_NUMBER_9TH :9th
-STR_ORDINAL_NUMBER_10TH :10th
-STR_ORDINAL_NUMBER_11TH :11th
-STR_ORDINAL_NUMBER_12TH :12th
-STR_ORDINAL_NUMBER_13TH :13th
-STR_ORDINAL_NUMBER_14TH :14th
-STR_ORDINAL_NUMBER_15TH :15th
-STR_ORDINAL_NUMBER_16TH :16th
-STR_ORDINAL_NUMBER_17TH :17th
-STR_ORDINAL_NUMBER_18TH :18th
-STR_ORDINAL_NUMBER_19TH :19th
-STR_ORDINAL_NUMBER_20TH :20th
-STR_ORDINAL_NUMBER_21ST :21st
-STR_ORDINAL_NUMBER_22ND :22nd
-STR_ORDINAL_NUMBER_23RD :23rd
-STR_ORDINAL_NUMBER_24TH :24th
-STR_ORDINAL_NUMBER_25TH :25th
-STR_ORDINAL_NUMBER_26TH :26th
-STR_ORDINAL_NUMBER_27TH :27th
-STR_ORDINAL_NUMBER_28TH :28th
-STR_ORDINAL_NUMBER_29TH :29th
-STR_ORDINAL_NUMBER_30TH :30th
-STR_ORDINAL_NUMBER_31ST :31st
-############ range for days ends
-
-############ range for months starts
-STR_MONTH_ABBREV_JAN :Jan
-STR_MONTH_ABBREV_FEB :Feb
-STR_MONTH_ABBREV_MAR :Mar
-STR_MONTH_ABBREV_APR :Apr
-STR_MONTH_ABBREV_MAY :May
-STR_MONTH_ABBREV_JUN :Jun
-STR_MONTH_ABBREV_JUL :Jul
-STR_MONTH_ABBREV_AUG :Aug
-STR_MONTH_ABBREV_SEP :Sep
-STR_MONTH_ABBREV_OCT :Oct
-STR_MONTH_ABBREV_NOV :Nov
-STR_MONTH_ABBREV_DEC :Dec
-
-STR_MONTH_JAN :January
-STR_MONTH_FEB :February
-STR_MONTH_MAR :March
-STR_MONTH_APR :April
-STR_MONTH_MAY :May
-STR_MONTH_JUN :June
-STR_MONTH_JUL :July
-STR_MONTH_AUG :August
-STR_MONTH_SEP :September
-STR_MONTH_OCT :October
-STR_MONTH_NOV :November
-STR_MONTH_DEC :December
-############ range for months ends
-
-# Graph window
-STR_GRAPH_KEY_BUTTON :{BLACK}Key
-STR_GRAPH_KEY_TOOLTIP :{BLACK}Show key to graphs
-STR_GRAPH_X_LABEL_MONTH :{TINY_FONT}{STRING}{} {STRING}
-STR_GRAPH_X_LABEL_MONTH_YEAR :{TINY_FONT}{STRING}{} {STRING}{}{NUM}
-STR_GRAPH_Y_LABEL :{TINY_FONT}{STRING2}
-STR_GRAPH_Y_LABEL_NUMBER :{TINY_FONT}{COMMA}
-
-STR_GRAPH_OPERATING_PROFIT_CAPTION :{WHITE}Operating Profit Graph
-STR_GRAPH_INCOME_CAPTION :{WHITE}Income Graph
-STR_GRAPH_CARGO_DELIVERED_CAPTION :{WHITE}Units of cargo delivered
-STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION :{WHITE}Company performance ratings (maximum rating=1000)
-STR_GRAPH_COMPANY_VALUES_CAPTION :{WHITE}Company values
-
-STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Cargo Payment Rates
-STR_GRAPH_CARGO_PAYMENT_RATES_X_LABEL :{TINY_FONT}{BLACK}Days in transit
-STR_GRAPH_CARGO_PAYMENT_RATES_TITLE :{TINY_FONT}{BLACK}Payment for delivering 10 units (or 10,000 litres) of cargo a distance of 20 squares
-STR_GRAPH_CARGO_ENABLE_ALL :{TINY_FONT}{BLACK}Enable all
-STR_GRAPH_CARGO_DISABLE_ALL :{TINY_FONT}{BLACK}Disable all
-STR_GRAPH_CARGO_TOOLTIP_ENABLE_ALL :{BLACK}Display all cargoes on the cargo payment rates graph
-STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL :{BLACK}Display no cargoes on the cargo payment rates graph
-STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO :{BLACK}Toggle graph for cargo type on/off
-STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLACK}{STRING}
-
-STR_GRAPH_PERFORMANCE_DETAIL_TOOLTIP :{BLACK}Show detailed performance ratings
-
-# Graph key window
-STR_GRAPH_KEY_CAPTION :{WHITE}Key to company graphs
-STR_GRAPH_KEY_COMPANY_SELECTION_TOOLTIP :{BLACK}Click here to toggle company's entry on graph on/off
-
-# Company league window
-STR_COMPANY_LEAGUE_TABLE_CAPTION :{WHITE}Company League Table
-STR_COMPANY_LEAGUE_COMPANY_NAME :{ORANGE}{COMPANY} {BLACK}{COMPANY_NUM} '{STRING}'
-STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_ENGINEER :Engineer
-STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_TRAFFIC_MANAGER :Traffic Manager
-STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_TRANSPORT_COORDINATOR :Transport Coordinator
-STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_ROUTE_SUPERVISOR :Route Supervisor
-STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_DIRECTOR :Director
-STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_CHIEF_EXECUTIVE :Chief Executive
-STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_CHAIRMAN :Chairman
-STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_PRESIDENT :President
-STR_COMPANY_LEAGUE_PERFORMANCE_TITLE_TYCOON :Tycoon
-
-# Performance detail window
-STR_PERFORMANCE_DETAIL :{WHITE}Detailed performance rating
-STR_PERFORMANCE_DETAIL_KEY :{BLACK}Detail
-STR_PERFORMANCE_DETAIL_AMOUNT_CURRENCY :{BLACK}({CURRENCY_SHORT}/{CURRENCY_SHORT})
-STR_PERFORMANCE_DETAIL_AMOUNT_INT :{BLACK}({COMMA}/{COMMA})
-STR_PERFORMANCE_DETAIL_PERCENT :{WHITE}{NUM}%
-STR_PERFORMANCE_DETAIL_SELECT_COMPANY_TOOLTIP :{BLACK}View details about this company
-############ Those following lines need to be in this order!!
-STR_PERFORMANCE_DETAIL_VEHICLES :{BLACK}Vehicles:
-STR_PERFORMANCE_DETAIL_STATIONS :{BLACK}Stations:
-STR_PERFORMANCE_DETAIL_MIN_PROFIT :{BLACK}Min. profit:
-STR_PERFORMANCE_DETAIL_MIN_INCOME :{BLACK}Min. income:
-STR_PERFORMANCE_DETAIL_MAX_INCOME :{BLACK}Max. income:
-STR_PERFORMANCE_DETAIL_DELIVERED :{BLACK}Delivered:
-STR_PERFORMANCE_DETAIL_CARGO :{BLACK}Cargo:
-STR_PERFORMANCE_DETAIL_MONEY :{BLACK}Money:
-STR_PERFORMANCE_DETAIL_LOAN :{BLACK}Loan:
-STR_PERFORMANCE_DETAIL_TOTAL :{BLACK}Total:
-############ End of order list
-STR_PERFORMANCE_DETAIL_VEHICLES_TOOLTIP :{BLACK}Number of vehicles that turned a profit last year. This includes road vehicles, trains, ships and aircraft
-STR_PERFORMANCE_DETAIL_STATIONS_TOOLTIP :{BLACK}Number of recently-serviced stations. Train stations, bus stops, airports and so on are counted separately even if they belong to the same station
-STR_PERFORMANCE_DETAIL_MIN_PROFIT_TOOLTIP :{BLACK}The profit of the vehicle with the lowest income (only vehicles older than two years are considered)
-STR_PERFORMANCE_DETAIL_MIN_INCOME_TOOLTIP :{BLACK}Amount of cash made in the quarter with the lowest profit of the last 12 quarters
-STR_PERFORMANCE_DETAIL_MAX_INCOME_TOOLTIP :{BLACK}Amount of cash made in the quarter with the highest profit of the last 12 quarters
-STR_PERFORMANCE_DETAIL_DELIVERED_TOOLTIP :{BLACK}Units of cargo delivered in the last four quarters
-STR_PERFORMANCE_DETAIL_CARGO_TOOLTIP :{BLACK}Number of types of cargo delivered in the last quarter
-STR_PERFORMANCE_DETAIL_MONEY_TOOLTIP :{BLACK}Amount of money this company has in the bank
-STR_PERFORMANCE_DETAIL_LOAN_TOOLTIP :{BLACK}The amount of money this company has taken on loan
-STR_PERFORMANCE_DETAIL_TOTAL_TOOLTIP :{BLACK}Total points out of possible points
-
-# Music window
-STR_MUSIC_JAZZ_JUKEBOX_CAPTION :{WHITE}Jazz Jukebox
-STR_MUSIC_PLAYLIST_ALL :{TINY_FONT}{BLACK}All
-STR_MUSIC_PLAYLIST_OLD_STYLE :{TINY_FONT}{BLACK}Old Style
-STR_MUSIC_PLAYLIST_NEW_STYLE :{TINY_FONT}{BLACK}New Style
-STR_MUSIC_PLAYLIST_EZY_STREET :{TINY_FONT}{BLACK}Ezy Street
-STR_MUSIC_PLAYLIST_CUSTOM_1 :{TINY_FONT}{BLACK}Custom 1
-STR_MUSIC_PLAYLIST_CUSTOM_2 :{TINY_FONT}{BLACK}Custom 2
-STR_MUSIC_MUSIC_VOLUME :{TINY_FONT}{BLACK}Music Volume
-STR_MUSIC_EFFECTS_VOLUME :{TINY_FONT}{BLACK}Effects Volume
-STR_MUSIC_RULER_MIN :{TINY_FONT}{BLACK}MIN
-STR_MUSIC_RULER_MAX :{TINY_FONT}{BLACK}MAX
-STR_MUSIC_RULER_MARKER :{TINY_FONT}{BLACK}'
-STR_MUSIC_TRACK_NONE :{TINY_FONT}{DKGREEN}--
-STR_MUSIC_TRACK_DIGIT :{TINY_FONT}{DKGREEN}{ZEROFILL_NUM}
-STR_MUSIC_TITLE_NONE :{TINY_FONT}{DKGREEN}------
-STR_MUSIC_TITLE_NAME :{TINY_FONT}{DKGREEN}"{RAW_STRING}"
-STR_MUSIC_TRACK :{TINY_FONT}{BLACK}Track
-STR_MUSIC_XTITLE :{TINY_FONT}{BLACK}Title
-STR_MUSIC_SHUFFLE :{TINY_FONT}{BLACK}Shuffle
-STR_MUSIC_PROGRAM :{TINY_FONT}{BLACK}Programme
-STR_MUSIC_TOOLTIP_SKIP_TO_PREVIOUS_TRACK :{BLACK}Skip to previous track in selection
-STR_MUSIC_TOOLTIP_SKIP_TO_NEXT_TRACK_IN_SELECTION :{BLACK}Skip to next track in selection
-STR_MUSIC_TOOLTIP_STOP_PLAYING_MUSIC :{BLACK}Stop playing music
-STR_MUSIC_TOOLTIP_START_PLAYING_MUSIC :{BLACK}Start playing music
-STR_MUSIC_TOOLTIP_DRAG_SLIDERS_TO_SET_MUSIC :{BLACK}Drag sliders to set music and sound effect volumes
-STR_MUSIC_TOOLTIP_SELECT_ALL_TRACKS_PROGRAM :{BLACK}Select 'all tracks' programme
-STR_MUSIC_TOOLTIP_SELECT_OLD_STYLE_MUSIC :{BLACK}Select 'old style music' programme
-STR_MUSIC_TOOLTIP_SELECT_NEW_STYLE_MUSIC :{BLACK}Select 'new style music' programme
-STR_MUSIC_TOOLTIP_SELECT_EZY_STREET_STYLE :{BLACK}Select 'Ezy Street style music' programme
-STR_MUSIC_TOOLTIP_SELECT_CUSTOM_1_USER_DEFINED :{BLACK}Select 'Custom 1' (user-defined) programme
-STR_MUSIC_TOOLTIP_SELECT_CUSTOM_2_USER_DEFINED :{BLACK}Select 'Custom 2' (user-defined) programme
-STR_MUSIC_TOOLTIP_TOGGLE_PROGRAM_SHUFFLE :{BLACK}Toggle programme shuffle on/off
-STR_MUSIC_TOOLTIP_SHOW_MUSIC_TRACK_SELECTION :{BLACK}Show music track selection window
-
-STR_ERROR_NO_SONGS :{WHITE}A music set without songs has been selected. No songs will be played
-
-# Playlist window
-STR_PLAYLIST_MUSIC_PROGRAM_SELECTION :{WHITE}Music Programme Selection
-STR_PLAYLIST_TRACK_NAME :{TINY_FONT}{LTBLUE}{ZEROFILL_NUM} "{RAW_STRING}"
-STR_PLAYLIST_TRACK_INDEX :{TINY_FONT}{BLACK}Track Index
-STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLACK}Programme - '{STRING}'
-STR_PLAYLIST_CLEAR :{TINY_FONT}{BLACK}Clear
-STR_PLAYLIST_TOOLTIP_CLEAR_CURRENT_PROGRAM_CUSTOM1 :{BLACK}Clear current programme (Custom1 or Custom2 only)
-STR_PLAYLIST_TOOLTIP_CLICK_TO_ADD_TRACK :{BLACK}Click on music track to add to current programme (Custom1 or Custom2 only)
-STR_PLAYLIST_TOOLTIP_CLICK_TO_REMOVE_TRACK :{BLACK}Click on music track to remove it from current programme (Custom1 or Custom2 only)
-
-# Highscore window
-STR_HIGHSCORE_TOP_COMPANIES_WHO_REACHED :{BIG_FONT}{BLACK}Top companies who reached {NUM}
-STR_HIGHSCORE_TOP_COMPANIES_NETWORK_GAME :{BIG_FONT}{BLACK}Company League Table in {NUM}
-STR_HIGHSCORE_POSITION :{BIG_FONT}{BLACK}{COMMA}.
-STR_HIGHSCORE_PERFORMANCE_TITLE_BUSINESSMAN :Businessman
-STR_HIGHSCORE_PERFORMANCE_TITLE_ENTREPRENEUR :Entrepreneur
-STR_HIGHSCORE_PERFORMANCE_TITLE_INDUSTRIALIST :Industrialist
-STR_HIGHSCORE_PERFORMANCE_TITLE_CAPITALIST :Capitalist
-STR_HIGHSCORE_PERFORMANCE_TITLE_MAGNATE :Magnate
-STR_HIGHSCORE_PERFORMANCE_TITLE_MOGUL :Mogul
-STR_HIGHSCORE_PERFORMANCE_TITLE_TYCOON_OF_THE_CENTURY :Tycoon of the Century
-STR_HIGHSCORE_NAME :{PRESIDENT_NAME}, {COMPANY}
-STR_HIGHSCORE_STATS :{BIG_FONT}'{STRING}' ({COMMA})
-STR_HIGHSCORE_COMPANY_ACHIEVES_STATUS :{BIG_FONT}{BLACK}{COMPANY} achieves '{STRING}' status!
-STR_HIGHSCORE_PRESIDENT_OF_COMPANY_ACHIEVES_STATUS :{BIG_FONT}{WHITE}{PRESIDENT_NAME} of {COMPANY} achieves '{STRING}' status!
-
-# Smallmap window
-STR_SMALLMAP_CAPTION :{WHITE}Map - {STRING}
-
-STR_SMALLMAP_TYPE_CONTOURS :Contours
-STR_SMALLMAP_TYPE_VEHICLES :Vehicles
-STR_SMALLMAP_TYPE_INDUSTRIES :Industries
-STR_SMALLMAP_TYPE_ROUTEMAP :Cargo Flow
-STR_SMALLMAP_TYPE_ROUTES :Routes
-STR_SMALLMAP_TYPE_VEGETATION :Vegetation
-STR_SMALLMAP_TYPE_OWNERS :Owners
-STR_SMALLMAP_TOOLTIP_SHOW_LAND_CONTOURS_ON_MAP :{BLACK}Show land contours on map
-STR_SMALLMAP_TOOLTIP_SHOW_VEHICLES_ON_MAP :{BLACK}Show vehicles on map
-STR_SMALLMAP_TOOLTIP_SHOW_INDUSTRIES_ON_MAP :{BLACK}Show industries on map
-STR_SMALLMAP_TOOLTIP_SHOW_LINK_STATS_ON_MAP :{BLACK}Show cargo flow on map
-STR_SMALLMAP_TOOLTIP_SHOW_TRANSPORT_ROUTES_ON :{BLACK}Show transport routes on map
-STR_SMALLMAP_TOOLTIP_SHOW_VEGETATION_ON_MAP :{BLACK}Show vegetation on map
-STR_SMALLMAP_TOOLTIP_SHOW_LAND_OWNERS_ON_MAP :{BLACK}Show land owners on map
-STR_SMALLMAP_TOOLTIP_INDUSTRY_SELECTION :{BLACK}Click on an industry type to toggle displaying it. Ctrl+Click disables all types except the selected one. Ctrl+Click on it again to enable all industry types
-STR_SMALLMAP_TOOLTIP_COMPANY_SELECTION :{BLACK}Click on a company to toggle displaying its property. Ctrl+Click disables all companies except the selected one. Ctrl+Click on it again to enable all companies
-STR_SMALLMAP_TOOLTIP_CARGO_SELECTION :{BLACK}Click on a cargo to toggle displaying its property. Ctrl+Click disables all cargoes except the selected one. Ctrl+Click on it again to enable all cargoes
-
-STR_SMALLMAP_LEGENDA_ROADS :{TINY_FONT}{BLACK}Roads
-STR_SMALLMAP_LEGENDA_RAILROADS :{TINY_FONT}{BLACK}Railways
-STR_SMALLMAP_LEGENDA_STATIONS_AIRPORTS_DOCKS :{TINY_FONT}{BLACK}Stations/Airports/Docks
-STR_SMALLMAP_LEGENDA_BUILDINGS_INDUSTRIES :{TINY_FONT}{BLACK}Buildings/Industries
-STR_SMALLMAP_LEGENDA_VEHICLES :{TINY_FONT}{BLACK}Vehicles
-STR_SMALLMAP_LEGENDA_TRAINS :{TINY_FONT}{BLACK}Trains
-STR_SMALLMAP_LEGENDA_ROAD_VEHICLES :{TINY_FONT}{BLACK}Road Vehicles
-STR_SMALLMAP_LEGENDA_SHIPS :{TINY_FONT}{BLACK}Ships
-STR_SMALLMAP_LEGENDA_AIRCRAFT :{TINY_FONT}{BLACK}Aircraft
-STR_SMALLMAP_LEGENDA_TRANSPORT_ROUTES :{TINY_FONT}{BLACK}Transport Routes
-STR_SMALLMAP_LEGENDA_FOREST :{TINY_FONT}{BLACK}Forest
-STR_SMALLMAP_LEGENDA_RAILROAD_STATION :{TINY_FONT}{BLACK}Railway Station
-STR_SMALLMAP_LEGENDA_TRUCK_LOADING_BAY :{TINY_FONT}{BLACK}Lorry Loading Bay
-STR_SMALLMAP_LEGENDA_BUS_STATION :{TINY_FONT}{BLACK}Bus Station
-STR_SMALLMAP_LEGENDA_AIRPORT_HELIPORT :{TINY_FONT}{BLACK}Airport/Heliport
-STR_SMALLMAP_LEGENDA_DOCK :{TINY_FONT}{BLACK}Dock
-STR_SMALLMAP_LEGENDA_ROUGH_LAND :{TINY_FONT}{BLACK}Rough Land
-STR_SMALLMAP_LEGENDA_GRASS_LAND :{TINY_FONT}{BLACK}Grass Land
-STR_SMALLMAP_LEGENDA_BARE_LAND :{TINY_FONT}{BLACK}Bare Land
-STR_SMALLMAP_LEGENDA_FIELDS :{TINY_FONT}{BLACK}Fields
-STR_SMALLMAP_LEGENDA_TREES :{TINY_FONT}{BLACK}Trees
-STR_SMALLMAP_LEGENDA_ROCKS :{TINY_FONT}{BLACK}Rocks
-STR_SMALLMAP_LEGENDA_WATER :{TINY_FONT}{BLACK}Water
-STR_SMALLMAP_LEGENDA_NO_OWNER :{TINY_FONT}{BLACK}No Owner
-STR_SMALLMAP_LEGENDA_TOWNS :{TINY_FONT}{BLACK}Towns
-STR_SMALLMAP_LEGENDA_INDUSTRIES :{TINY_FONT}{BLACK}Industries
-STR_SMALLMAP_LEGENDA_DESERT :{TINY_FONT}{BLACK}Desert
-STR_SMALLMAP_LEGENDA_SNOW :{TINY_FONT}{BLACK}Snow
-
-STR_SMALLMAP_TOOLTIP_TOGGLE_TOWN_NAMES_ON_OFF :{BLACK}Toggle town names on/off on map
-STR_SMALLMAP_CENTER :{BLACK}Centre the smallmap on the current position
-STR_SMALLMAP_INDUSTRY :{TINY_FONT}{STRING} ({NUM})
-STR_SMALLMAP_LINKSTATS :{TINY_FONT}{STRING}
-STR_SMALLMAP_COMPANY :{TINY_FONT}{COMPANY}
-STR_SMALLMAP_TOWN :{TINY_FONT}{WHITE}{TOWN}
-STR_SMALLMAP_DISABLE_ALL :{BLACK}Disable all
-STR_SMALLMAP_ENABLE_ALL :{BLACK}Enable all
-STR_SMALLMAP_SHOW_HEIGHT :{BLACK}Show height
-STR_SMALLMAP_TOOLTIP_DISABLE_ALL_INDUSTRIES :{BLACK}Display no industries on the map
-STR_SMALLMAP_TOOLTIP_ENABLE_ALL_INDUSTRIES :{BLACK}Display all industries on the map
-STR_SMALLMAP_TOOLTIP_SHOW_HEIGHT :{BLACK}Toggle display of heightmap
-STR_SMALLMAP_TOOLTIP_DISABLE_ALL_COMPANIES :{BLACK}Display no company property on the map
-STR_SMALLMAP_TOOLTIP_ENABLE_ALL_COMPANIES :{BLACK}Display all company property on the map
-STR_SMALLMAP_TOOLTIP_DISABLE_ALL_CARGOS :{BLACK}Display no cargoes on the map
-STR_SMALLMAP_TOOLTIP_ENABLE_ALL_CARGOS :{BLACK}Display all cargoes on the map
-
-# Status bar messages
-STR_STATUSBAR_TOOLTIP_SHOW_LAST_NEWS :{BLACK}Show last message or news report
-STR_STATUSBAR_COMPANY_NAME :{SILVER}- - {COMPANY} - -
-STR_STATUSBAR_PAUSED :{YELLOW}* * PAUSED * *
-STR_STATUSBAR_AUTOSAVE :{RED}AUTOSAVE
-STR_STATUSBAR_SAVING_GAME :{RED}* * SAVING GAME * *
-
-# News message history
-STR_MESSAGE_HISTORY :{WHITE}Message History
-STR_MESSAGE_HISTORY_TOOLTIP :{BLACK}A list of the recent news messages
-STR_MESSAGE_NEWS_FORMAT :{STRING} - {STRING5}
-
-STR_NEWS_MESSAGE_CAPTION :{WHITE}Message
-STR_NEWS_CUSTOM_ITEM :{BIG_FONT}{BLACK}{RAW_STRING}
-
-STR_NEWS_FIRST_TRAIN_ARRIVAL :{BIG_FONT}{BLACK}Citizens celebrate . . .{}First train arrives at {STATION}!
-STR_NEWS_FIRST_BUS_ARRIVAL :{BIG_FONT}{BLACK}Citizens celebrate . . .{}First bus arrives at {STATION}!
-STR_NEWS_FIRST_TRUCK_ARRIVAL :{BIG_FONT}{BLACK}Citizens celebrate . . .{}First truck arrives at {STATION}!
-STR_NEWS_FIRST_PASSENGER_TRAM_ARRIVAL :{BIG_FONT}{BLACK}Citizens celebrate . . .{}First passenger tram arrives at {STATION}!
-STR_NEWS_FIRST_CARGO_TRAM_ARRIVAL :{BIG_FONT}{BLACK}Citizens celebrate . . .{}First freight tram arrives at {STATION}!
-STR_NEWS_FIRST_SHIP_ARRIVAL :{BIG_FONT}{BLACK}Citizens celebrate . . .{}First ship arrives at {STATION}!
-STR_NEWS_FIRST_AIRCRAFT_ARRIVAL :{BIG_FONT}{BLACK}Citizens celebrate . . .{}First aircraft arrives at {STATION}!
-
-STR_NEWS_TRAIN_CRASH :{BIG_FONT}{BLACK}Train Crash!{}{COMMA} die in fireball after collision
-STR_NEWS_ROAD_VEHICLE_CRASH_DRIVER :{BIG_FONT}{BLACK}Road Vehicle Crash!{}Driver dies in fireball after collision with train
-STR_NEWS_ROAD_VEHICLE_CRASH :{BIG_FONT}{BLACK}Road Vehicle Crash!{}{COMMA} die in fireball after collision with train
-STR_NEWS_AIRCRAFT_CRASH :{BIG_FONT}{BLACK}Plane Crash!{}{COMMA} die in fireball at {STATION}
-STR_NEWS_PLANE_CRASH_OUT_OF_FUEL :{BIG_FONT}{BLACK}Plane Crash!{}Aircraft ran out of fuel, {COMMA} die in fireball
-
-STR_NEWS_DISASTER_ZEPPELIN :{BIG_FONT}{BLACK}Zeppelin disaster at {STATION}!
-STR_NEWS_DISASTER_SMALL_UFO :{BIG_FONT}{BLACK}Road vehicle destroyed in 'UFO' collision!
-STR_NEWS_DISASTER_AIRPLANE_OIL_REFINERY :{BIG_FONT}{BLACK}Oil refinery explosion near {TOWN}!
-STR_NEWS_DISASTER_HELICOPTER_FACTORY :{BIG_FONT}{BLACK}Factory destroyed in suspicious circumstances near {TOWN}!
-STR_NEWS_DISASTER_BIG_UFO :{BIG_FONT}{BLACK}'UFO' lands near {TOWN}!
-STR_NEWS_DISASTER_COAL_MINE_SUBSIDENCE :{BIG_FONT}{BLACK}Coal mine subsidence leaves trail of destruction near {TOWN}!
-STR_NEWS_DISASTER_FLOOD_VEHICLE :{BIG_FONT}{BLACK}Floods!{}At least {COMMA} missing, presumed dead after significant flooding!
-
-STR_NEWS_COMPANY_IN_TROUBLE_TITLE :{BIG_FONT}{BLACK}Transport company in trouble!
-STR_NEWS_COMPANY_IN_TROUBLE_DESCRIPTION :{BIG_FONT}{BLACK}{RAW_STRING} will be sold off or declared bankrupt unless performance increases soon!
-STR_NEWS_COMPANY_MERGER_TITLE :{BIG_FONT}{BLACK}Transport company merger!
-STR_NEWS_COMPANY_MERGER_DESCRIPTION :{BIG_FONT}{BLACK}{RAW_STRING} has been sold to {RAW_STRING} for {CURRENCY_LONG}!
-STR_NEWS_COMPANY_BANKRUPT_TITLE :{BIG_FONT}{BLACK}Bankrupt!
-STR_NEWS_COMPANY_BANKRUPT_DESCRIPTION :{BIG_FONT}{BLACK}{RAW_STRING} has been closed down by creditors and all assets sold off!
-STR_NEWS_COMPANY_LAUNCH_TITLE :{BIG_FONT}{BLACK}New transport company launched!
-STR_NEWS_COMPANY_LAUNCH_DESCRIPTION :{BIG_FONT}{BLACK}{RAW_STRING} starts construction near {TOWN}!
-STR_NEWS_MERGER_TAKEOVER_TITLE :{BIG_FONT}{BLACK}{RAW_STRING} has been taken over by {RAW_STRING}!
-STR_PRESIDENT_NAME_MANAGER :{BLACK}{PRESIDENT_NAME}{}(Manager)
-
-STR_NEWS_NEW_TOWN :{BLACK}{BIG_FONT}{RAW_STRING} sponsored construction of new town {TOWN}!
-
-STR_NEWS_INDUSTRY_CONSTRUCTION :{BIG_FONT}{BLACK}New {STRING} under construction near {TOWN}!
-STR_NEWS_INDUSTRY_PLANTED :{BIG_FONT}{BLACK}New {STRING} being planted near {TOWN}!
-
-STR_NEWS_INDUSTRY_CLOSURE_GENERAL :{BIG_FONT}{BLACK}{STRING2} announces imminent closure!
-STR_NEWS_INDUSTRY_CLOSURE_SUPPLY_PROBLEMS :{BIG_FONT}{BLACK}Supply problems cause {STRING2} to announce imminent closure!
-STR_NEWS_INDUSTRY_CLOSURE_LACK_OF_TREES :{BIG_FONT}{BLACK}Lack of nearby trees causes {STRING2} to announce imminent closure!
-
-STR_NEWS_EURO_INTRODUCTION :{BIG_FONT}{BLACK}European Monetary Union!{}{}The Euro is introduced as the sole currency for everyday transactions in your country!
-STR_NEWS_BEGIN_OF_RECESSION :{BIG_FONT}{BLACK}World Recession!{}{}Financial experts fear worst as economy slumps!
-STR_NEWS_END_OF_RECESSION :{BIG_FONT}{BLACK}Recession Over!{}{}Upturn in trade gives confidence to industries as economy strengthens!
-
-STR_NEWS_INDUSTRY_PRODUCTION_INCREASE_GENERAL :{BIG_FONT}{BLACK}{INDUSTRY} increases production!
-STR_NEWS_INDUSTRY_PRODUCTION_INCREASE_COAL :{BIG_FONT}{BLACK}New coal seam found at {INDUSTRY}!{}Production is expected to double!
-STR_NEWS_INDUSTRY_PRODUCTION_INCREASE_OIL :{BIG_FONT}{BLACK}New oil reserves found at {INDUSTRY}!{}Production is expected to double!
-STR_NEWS_INDUSTRY_PRODUCTION_INCREASE_FARM :{BIG_FONT}{BLACK}Improved farming methods at {INDUSTRY} are expected to double production!
-STR_NEWS_INDUSTRY_PRODUCTION_INCREASE_SMOOTH :{BIG_FONT}{BLACK}{STRING} production at {INDUSTRY} increases {COMMA}%!
-STR_NEWS_INDUSTRY_PRODUCTION_DECREASE_GENERAL :{BIG_FONT}{BLACK}{INDUSTRY} production down by 50%
-STR_NEWS_INDUSTRY_PRODUCTION_DECREASE_FARM :{BIG_FONT}{BLACK}Insect infestation causes havoc at {INDUSTRY}!{}Production down by 50%
-STR_NEWS_INDUSTRY_PRODUCTION_DECREASE_SMOOTH :{BIG_FONT}{BLACK}{STRING} production at {INDUSTRY} decreases {COMMA}%!
-
-STR_NEWS_TRAIN_IS_WAITING :{WHITE}{VEHICLE} is waiting in depot
-STR_NEWS_ROAD_VEHICLE_IS_WAITING :{WHITE}{VEHICLE} is waiting in depot
-STR_NEWS_SHIP_IS_WAITING :{WHITE}{VEHICLE} is waiting in depot
-STR_NEWS_AIRCRAFT_IS_WAITING :{WHITE}{VEHICLE} is waiting in the aircraft hangar
-
-# Start of order review system
-# DON'T ADD OR REMOVE LINES HERE
-STR_NEWS_VEHICLE_HAS_TOO_FEW_ORDERS :{WHITE}{VEHICLE} has too few orders in the schedule
-STR_NEWS_VEHICLE_HAS_VOID_ORDER :{WHITE}{VEHICLE} has a void order
-STR_NEWS_VEHICLE_HAS_DUPLICATE_ENTRY :{WHITE}{VEHICLE} has duplicate orders
-STR_NEWS_VEHICLE_HAS_INVALID_ENTRY :{WHITE}{VEHICLE} has an invalid station in its orders
-# end of order system
-
-STR_NEWS_VEHICLE_IS_GETTING_OLD :{WHITE}{VEHICLE} is getting old
-STR_NEWS_VEHICLE_IS_GETTING_VERY_OLD :{WHITE}{VEHICLE} is getting very old
-STR_NEWS_VEHICLE_IS_GETTING_VERY_OLD_AND :{WHITE}{VEHICLE} is getting very old and urgently needs replacing
-STR_NEWS_TRAIN_IS_STUCK :{WHITE}{VEHICLE} can't find a path to continue
-STR_NEWS_VEHICLE_IS_LOST :{WHITE}{VEHICLE} is lost
-STR_NEWS_VEHICLE_IS_UNPROFITABLE :{WHITE}{VEHICLE}'s profit last year was {CURRENCY_LONG}
-STR_NEWS_AIRCRAFT_DEST_TOO_FAR :{WHITE}{VEHICLE} can't get to the next destination because it is out of range
-
-STR_NEWS_ORDER_REFIT_FAILED :{WHITE}{VEHICLE} stopped because an ordered refit failed
-STR_NEWS_VEHICLE_AUTORENEW_FAILED :{WHITE}Autorenew failed on {VEHICLE}{}{STRING}
-
-STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE :{BIG_FONT}{BLACK}New {STRING} now available!
-STR_NEWS_NEW_VEHICLE_TYPE :{BIG_FONT}{BLACK}{ENGINE}
-STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE :{BLACK}New {STRING} now available! - {ENGINE}
-
-STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO :{WHITE}{STATION} no longer accepts {STRING}
-STR_NEWS_STATION_NO_LONGER_ACCEPTS_CARGO_OR_CARGO :{WHITE}{STATION} no longer accepts {STRING} or {STRING}
-STR_NEWS_STATION_NOW_ACCEPTS_CARGO :{WHITE}{STATION} now accepts {STRING}
-STR_NEWS_STATION_NOW_ACCEPTS_CARGO_AND_CARGO :{WHITE}{STATION} now accepts {STRING} and {STRING}
-
-STR_NEWS_OFFER_OF_SUBSIDY_EXPIRED :{BIG_FONT}{BLACK}Offer of subsidy expired:{}{}{STRING} from {STRING2} to {STRING2} will now not attract a subsidy
-STR_NEWS_SUBSIDY_WITHDRAWN_SERVICE :{BIG_FONT}{BLACK}Subsidy withdrawn:{}{}{STRING} service from {STRING2} to {STRING2} is no longer subsidised
-STR_NEWS_SERVICE_SUBSIDY_OFFERED :{BIG_FONT}{BLACK}Service subsidy offered:{}{}First {STRING} service from {STRING2} to {STRING2} will attract a year's subsidy from the local authority!
-STR_NEWS_SERVICE_SUBSIDY_AWARDED_HALF :{BIG_FONT}{BLACK}Service subsidy awarded to {RAW_STRING}!{}{}{STRING} service from {STRING2} to {STRING2} will pay 50% extra for the next year!
-STR_NEWS_SERVICE_SUBSIDY_AWARDED_DOUBLE :{BIG_FONT}{BLACK}Service subsidy awarded to {RAW_STRING}!{}{}{STRING} service from {STRING2} to {STRING2} will pay double rates for the next year!
-STR_NEWS_SERVICE_SUBSIDY_AWARDED_TRIPLE :{BIG_FONT}{BLACK}Service subsidy awarded to {RAW_STRING}!{}{}{STRING} service from {STRING2} to {STRING2} will pay triple rates for the next year!
-STR_NEWS_SERVICE_SUBSIDY_AWARDED_QUADRUPLE :{BIG_FONT}{BLACK}Service subsidy awarded to {RAW_STRING}!{}{}{STRING} service from {STRING2} to {STRING2} will pay quadruple rates for the next year!
-
-STR_NEWS_ROAD_REBUILDING :{BIG_FONT}{BLACK}Traffic chaos in {TOWN}!{}{}Road rebuilding programme funded by {RAW_STRING} brings 6 months of misery to motorists!
-STR_NEWS_EXCLUSIVE_RIGHTS_TITLE :{BIG_FONT}{BLACK}Transport monopoly!
-STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION :{BIG_FONT}{BLACK}Local authority of {TOWN} signs contract with {RAW_STRING} for one year of exclusive transport rights!
-
-# Extra view window
-STR_EXTRA_VIEW_PORT_TITLE :{WHITE}Viewport {COMMA}
-STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN :{BLACK}Copy to viewport
-STR_EXTRA_VIEW_MOVE_VIEW_TO_MAIN_TT :{BLACK}Copy the location of the main view to this viewport
-STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW :{BLACK}Paste from viewport
-STR_EXTRA_VIEW_MOVE_MAIN_TO_VIEW_TT :{BLACK}Paste the location of this viewport to the main view
-
-# Game options window
-STR_GAME_OPTIONS_CAPTION :{WHITE}Game Options
-STR_GAME_OPTIONS_CURRENCY_UNITS_FRAME :{BLACK}Currency units
-STR_GAME_OPTIONS_CURRENCY_UNITS_DROPDOWN_TOOLTIP :{BLACK}Currency units selection
-
-############ start of currency region
-STR_GAME_OPTIONS_CURRENCY_GBP :British Pound (GBP)
-STR_GAME_OPTIONS_CURRENCY_USD :American Dollar (USD)
-STR_GAME_OPTIONS_CURRENCY_EUR :Euro (EUR)
-STR_GAME_OPTIONS_CURRENCY_JPY :Japanese Yen (JPY)
-STR_GAME_OPTIONS_CURRENCY_ATS :Austrian Shilling (ATS)
-STR_GAME_OPTIONS_CURRENCY_BEF :Belgian Franc (BEF)
-STR_GAME_OPTIONS_CURRENCY_CHF :Swiss Franc (CHF)
-STR_GAME_OPTIONS_CURRENCY_CZK :Czech Koruna (CZK)
-STR_GAME_OPTIONS_CURRENCY_DEM :Deutschmark (DEM)
-STR_GAME_OPTIONS_CURRENCY_DKK :Danish Krone (DKK)
-STR_GAME_OPTIONS_CURRENCY_ESP :Spanish Peseta (ESP)
-STR_GAME_OPTIONS_CURRENCY_FIM :Finnish Markka (FIM)
-STR_GAME_OPTIONS_CURRENCY_FRF :French Franc (FRF)
-STR_GAME_OPTIONS_CURRENCY_GRD :Greek Drachma (GRD)
-STR_GAME_OPTIONS_CURRENCY_HUF :Hungarian Forint (HUF)
-STR_GAME_OPTIONS_CURRENCY_ISK :Icelandic Krona (ISK)
-STR_GAME_OPTIONS_CURRENCY_ITL :Italian Lira (ITL)
-STR_GAME_OPTIONS_CURRENCY_NLG :Dutch Guilder (NLG)
-STR_GAME_OPTIONS_CURRENCY_NOK :Norwegian Krone (NOK)
-STR_GAME_OPTIONS_CURRENCY_PLN :Polish Złoty (PLN)
-STR_GAME_OPTIONS_CURRENCY_RON :Romanian Leu (RON)
-STR_GAME_OPTIONS_CURRENCY_RUR :Russian Rubles (RUR)
-STR_GAME_OPTIONS_CURRENCY_SIT :Slovenian Tolar (SIT)
-STR_GAME_OPTIONS_CURRENCY_SEK :Swedish Krona (SEK)
-STR_GAME_OPTIONS_CURRENCY_TRY :Turkish Lira (TRY)
-STR_GAME_OPTIONS_CURRENCY_SKK :Slovak Koruna (SKK)
-STR_GAME_OPTIONS_CURRENCY_BRL :Brazilian Real (BRL)
-STR_GAME_OPTIONS_CURRENCY_EEK :Estonian Krooni (EEK)
-STR_GAME_OPTIONS_CURRENCY_LTL :Lithuanian Litas (LTL)
-STR_GAME_OPTIONS_CURRENCY_KRW :South Korean Won (KRW)
-STR_GAME_OPTIONS_CURRENCY_ZAR :South African Rand (ZAR)
-STR_GAME_OPTIONS_CURRENCY_CUSTOM :Custom...
-STR_GAME_OPTIONS_CURRENCY_GEL :Georgian Lari (GEL)
-STR_GAME_OPTIONS_CURRENCY_IRR :Iranian Rial (IRR)
-############ end of currency region
-
-
-############ start of measuring units region
-############ end of measuring units region
-
-STR_GAME_OPTIONS_ROAD_VEHICLES_FRAME :{BLACK}Road vehicles
-STR_GAME_OPTIONS_ROAD_VEHICLES_DROPDOWN_TOOLTIP :{BLACK}Select side of road for vehicles to drive on
-STR_GAME_OPTIONS_ROAD_VEHICLES_DROPDOWN_LEFT :Drive on left
-STR_GAME_OPTIONS_ROAD_VEHICLES_DROPDOWN_RIGHT :Drive on right
-
-STR_GAME_OPTIONS_TOWN_NAMES_FRAME :{BLACK}Town names
-STR_GAME_OPTIONS_TOWN_NAMES_DROPDOWN_TOOLTIP :{BLACK}Select style of town names
-
-############ start of townname region
-STR_GAME_OPTIONS_TOWN_NAME_ORIGINAL_ENGLISH :English (Original)
-STR_GAME_OPTIONS_TOWN_NAME_FRENCH :French
-STR_GAME_OPTIONS_TOWN_NAME_GERMAN :German
-STR_GAME_OPTIONS_TOWN_NAME_ADDITIONAL_ENGLISH :English (Additional)
-STR_GAME_OPTIONS_TOWN_NAME_LATIN_AMERICAN :Latin-American
-STR_GAME_OPTIONS_TOWN_NAME_SILLY :Silly
-STR_GAME_OPTIONS_TOWN_NAME_SWEDISH :Swedish
-STR_GAME_OPTIONS_TOWN_NAME_DUTCH :Dutch
-STR_GAME_OPTIONS_TOWN_NAME_FINNISH :Finnish
-STR_GAME_OPTIONS_TOWN_NAME_POLISH :Polish
-STR_GAME_OPTIONS_TOWN_NAME_SLOVAK :Slovak
-STR_GAME_OPTIONS_TOWN_NAME_NORWEGIAN :Norwegian
-STR_GAME_OPTIONS_TOWN_NAME_HUNGARIAN :Hungarian
-STR_GAME_OPTIONS_TOWN_NAME_AUSTRIAN :Austrian
-STR_GAME_OPTIONS_TOWN_NAME_ROMANIAN :Romanian
-STR_GAME_OPTIONS_TOWN_NAME_CZECH :Czech
-STR_GAME_OPTIONS_TOWN_NAME_SWISS :Swiss
-STR_GAME_OPTIONS_TOWN_NAME_DANISH :Danish
-STR_GAME_OPTIONS_TOWN_NAME_TURKISH :Turkish
-STR_GAME_OPTIONS_TOWN_NAME_ITALIAN :Italian
-STR_GAME_OPTIONS_TOWN_NAME_CATALAN :Catalan
-############ end of townname region
-
-STR_GAME_OPTIONS_AUTOSAVE_FRAME :{BLACK}Autosave
-STR_GAME_OPTIONS_AUTOSAVE_DROPDOWN_TOOLTIP :{BLACK}Select interval between automatic game saves
-
-STR_GAME_OPTIONS_AUTOSAVE_DROPDOWN_OFF :Off
-STR_GAME_OPTIONS_AUTOSAVE_DROPDOWN_EVERY_1_MONTH :Every month
-STR_GAME_OPTIONS_AUTOSAVE_DROPDOWN_EVERY_3_MONTHS :Every 3 months
-STR_GAME_OPTIONS_AUTOSAVE_DROPDOWN_EVERY_6_MONTHS :Every 6 months
-STR_GAME_OPTIONS_AUTOSAVE_DROPDOWN_EVERY_12_MONTHS :Every 12 months
-
-STR_GAME_OPTIONS_LANGUAGE :{BLACK}Language
-STR_GAME_OPTIONS_LANGUAGE_TOOLTIP :{BLACK}Select the interface language to use
-
-STR_GAME_OPTIONS_FULLSCREEN :{BLACK}Fullscreen
-STR_GAME_OPTIONS_FULLSCREEN_TOOLTIP :{BLACK}Check this box to play OpenTTD fullscreen mode
-
-STR_GAME_OPTIONS_RESOLUTION :{BLACK}Screen resolution
-STR_GAME_OPTIONS_RESOLUTION_TOOLTIP :{BLACK}Select the screen resolution to use
-STR_GAME_OPTIONS_RESOLUTION_OTHER :other
-
-STR_GAME_OPTIONS_SCREENSHOT_FORMAT :{BLACK}Screenshot format
-STR_GAME_OPTIONS_SCREENSHOT_FORMAT_TOOLTIP :{BLACK}Select the screenshot format to use
-
-STR_GAME_OPTIONS_BASE_GRF :{BLACK}Base graphics set
-STR_GAME_OPTIONS_BASE_GRF_TOOLTIP :{BLACK}Select the base graphics set to use
-STR_GAME_OPTIONS_BASE_GRF_STATUS :{RED}{NUM} missing/corrupted file{P "" s}
-STR_GAME_OPTIONS_BASE_GRF_DESCRIPTION_TOOLTIP :{BLACK}Additional information about the base graphics set
-
-STR_GAME_OPTIONS_BASE_SFX :{BLACK}Base sounds set
-STR_GAME_OPTIONS_BASE_SFX_TOOLTIP :{BLACK}Select the base sounds set to use
-STR_GAME_OPTIONS_BASE_SFX_DESCRIPTION_TOOLTIP :{BLACK}Additional information about the base sounds set
-
-STR_GAME_OPTIONS_BASE_MUSIC :{BLACK}Base music set
-STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Select the base music set to use
-STR_GAME_OPTIONS_BASE_MUSIC_STATUS :{RED}{NUM} corrupted file{P "" s}
-STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Additional information about the base music set
-
-STR_ERROR_FULLSCREEN_FAILED :{WHITE}Fullscreen mode failed
-STR_ERROR_RESET_WINDOWS :{WHITE}All windows have been reseted...
-STR_ERROR_AUTOMATIC_SIZING :{WHITE}Sizes of buttons and fonts have changed
-
-# Custom currency window
-
-STR_CURRENCY_WINDOW :{WHITE}Custom currency
-STR_CURRENCY_EXCHANGE_RATE :{LTBLUE}Exchange rate: {ORANGE}{CURRENCY_LONG} = £ {COMMA}
-STR_CURRENCY_DECREASE_EXCHANGE_RATE_TOOLTIP :{BLACK}Decrease the amount of your currency for one Pound (£)
-STR_CURRENCY_INCREASE_EXCHANGE_RATE_TOOLTIP :{BLACK}Increase the amount of your currency for one Pound (£)
-STR_CURRENCY_SET_EXCHANGE_RATE_TOOLTIP :{BLACK}Set the exchange rate of your currency for one Pound (£)
-
-STR_CURRENCY_SEPARATOR :{LTBLUE}Separator: {ORANGE}{RAW_STRING}
-STR_CURRENCY_SET_CUSTOM_CURRENCY_SEPARATOR_TOOLTIP :{BLACK}Set the separator for your currency
-
-STR_CURRENCY_PREFIX :{LTBLUE}Prefix: {ORANGE}{RAW_STRING}
-STR_CURRENCY_SET_CUSTOM_CURRENCY_PREFIX_TOOLTIP :{BLACK}Set the prefix string for your currency
-STR_CURRENCY_SUFFIX :{LTBLUE}Suffix: {ORANGE}{RAW_STRING}
-STR_CURRENCY_SET_CUSTOM_CURRENCY_SUFFIX_TOOLTIP :{BLACK}Set the suffix string for your currency
-
-STR_CURRENCY_SWITCH_TO_EURO :{LTBLUE}Switch to Euro: {ORANGE}{NUM}
-STR_CURRENCY_SWITCH_TO_EURO_NEVER :{LTBLUE}Switch to Euro: {ORANGE}never
-STR_CURRENCY_SET_CUSTOM_CURRENCY_TO_EURO_TOOLTIP :{BLACK}Set the year to switch to Euro
-STR_CURRENCY_DECREASE_CUSTOM_CURRENCY_TO_EURO_TOOLTIP :{BLACK}Switch to Euro earlier
-STR_CURRENCY_INCREASE_CUSTOM_CURRENCY_TO_EURO_TOOLTIP :{BLACK}Switch to Euro later
-
-STR_CURRENCY_PREVIEW :{LTBLUE}Preview: {ORANGE}{CURRENCY_LONG}
-STR_CURRENCY_CUSTOM_CURRENCY_PREVIEW_TOOLTIP :{BLACK}10000 Pound (£) in your currency
-STR_CURRENCY_CHANGE_PARAMETER :{BLACK}Change custom currency parameter
-
-STR_DIFFICULTY_LEVEL_SETTING_MAXIMUM_NO_COMPETITORS :{LTBLUE}Maximum no. competitors: {ORANGE}{COMMA}
-
-STR_NONE :None
-STR_FUNDING_ONLY :Funding only
-STR_MINIMAL :Minimal
-STR_NUM_VERY_LOW :Very Low
-STR_NUM_LOW :Low
-STR_NUM_NORMAL :Normal
-STR_NUM_HIGH :High
-STR_NUM_CUSTOM :Custom
-STR_NUM_CUSTOM_NUMBER :Custom ({NUM})
-
-STR_VARIETY_NONE :None
-STR_VARIETY_VERY_LOW :Very Low
-STR_VARIETY_LOW :Low
-STR_VARIETY_MEDIUM :Medium
-STR_VARIETY_HIGH :High
-STR_VARIETY_VERY_HIGH :Very High
-
-STR_AI_SPEED_VERY_SLOW :Very Slow
-STR_AI_SPEED_SLOW :Slow
-STR_AI_SPEED_MEDIUM :Medium
-STR_AI_SPEED_FAST :Fast
-STR_AI_SPEED_VERY_FAST :Very Fast
-
-STR_SEA_LEVEL_VERY_LOW :Very Low
-STR_SEA_LEVEL_LOW :Low
-STR_SEA_LEVEL_MEDIUM :Medium
-STR_SEA_LEVEL_HIGH :High
-STR_SEA_LEVEL_CUSTOM :Custom
-STR_SEA_LEVEL_CUSTOM_PERCENTAGE :Custom ({NUM}%)
-
-STR_RIVERS_NONE :None
-STR_RIVERS_FEW :Few
-STR_RIVERS_MODERATE :Medium
-STR_RIVERS_LOT :Many
-
-STR_DISASTER_NONE :None
-STR_DISASTER_REDUCED :Reduced
-STR_DISASTER_NORMAL :Normal
-
-STR_SUBSIDY_X1_5 :x1.5
-STR_SUBSIDY_X2 :x2
-STR_SUBSIDY_X3 :x3
-STR_SUBSIDY_X4 :x4
-
-STR_TERRAIN_TYPE_VERY_FLAT :Very Flat
-STR_TERRAIN_TYPE_FLAT :Flat
-STR_TERRAIN_TYPE_HILLY :Hilly
-STR_TERRAIN_TYPE_MOUNTAINOUS :Mountainous
-
-STR_CITY_APPROVAL_PERMISSIVE :Permissive
-STR_CITY_APPROVAL_TOLERANT :Tolerant
-STR_CITY_APPROVAL_HOSTILE :Hostile
-
-STR_WARNING_NO_SUITABLE_AI :{WHITE}No suitable AIs available...{}You can download several AIs via the 'Online Content' system
-
-# Advanced settings window
-STR_CONFIG_SETTING_CAPTION :{WHITE}Advanced Settings
-STR_CONFIG_SETTING_FILTER_TITLE :{BLACK}Filter string:
-STR_CONFIG_SETTING_EXPAND_ALL :{BLACK}Expand all
-STR_CONFIG_SETTING_COLLAPSE_ALL :{BLACK}Collapse all
-STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT :(no explanation available)
-STR_CONFIG_SETTING_DEFAULT_VALUE :{LTBLUE}Default value: {ORANGE}{STRING1}
-STR_CONFIG_SETTING_TYPE :{LTBLUE}Setting type: {ORANGE}{STRING}
-STR_CONFIG_SETTING_TYPE_CLIENT :Client setting (not stored in saves; affects all games)
-STR_CONFIG_SETTING_TYPE_GAME_MENU :Game setting (stored in saves; affects only new games)
-STR_CONFIG_SETTING_TYPE_GAME_INGAME :Game setting (stored in save; affects only current game)
-STR_CONFIG_SETTING_TYPE_COMPANY_MENU :Company setting (stored in saves; affects only new games)
-STR_CONFIG_SETTING_TYPE_COMPANY_INGAME :Company setting (stored in save; affects only current company)
-
-STR_CONFIG_SETTING_RESTRICT_CATEGORY :{BLACK}Category:
-STR_CONFIG_SETTING_RESTRICT_TYPE :{BLACK}Type:
-STR_CONFIG_SETTING_RESTRICT_DROPDOWN_HELPTEXT :{BLACK}Restricts the list below showing only changed settings
-STR_CONFIG_SETTING_RESTRICT_BASIC :Basic settings
-STR_CONFIG_SETTING_RESTRICT_ADVANCED :Advanced settings
-STR_CONFIG_SETTING_RESTRICT_ALL :Expert settings / all settings
-STR_CONFIG_SETTING_RESTRICT_CHANGED_AGAINST_DEFAULT :Settings with a different value than the default
-STR_CONFIG_SETTING_RESTRICT_CHANGED_AGAINST_NEW :Settings with a different value than your new-game settings
-
-STR_CONFIG_SETTING_TYPE_DROPDOWN_HELPTEXT :{BLACK}Restricts the list below to certain setting types
-STR_CONFIG_SETTING_TYPE_DROPDOWN_ALL :All setting types
-STR_CONFIG_SETTING_TYPE_DROPDOWN_CLIENT :Client settings (not stored in saves; affects all games)
-STR_CONFIG_SETTING_TYPE_DROPDOWN_GAME_MENU :Game settings (stored in saves; affects only new games)
-STR_CONFIG_SETTING_TYPE_DROPDOWN_GAME_INGAME :Game settings (stored in save; affects only current game)
-STR_CONFIG_SETTING_TYPE_DROPDOWN_COMPANY_MENU :Company settings (stored in saves; affects only new games)
-STR_CONFIG_SETTING_TYPE_DROPDOWN_COMPANY_INGAME :Company settings (stored in save; affects only current company)
-STR_CONFIG_SETTING_CATEGORY_HIDES :{BLACK}Show all search results by setting{}{SILVER}Category {BLACK}to {WHITE}{STRING}
-STR_CONFIG_SETTING_TYPE_HIDES :{BLACK}Show all search results by setting{}{SILVER}Type {BLACK}to {WHITE}All setting types
-STR_CONFIG_SETTING_CATEGORY_AND_TYPE_HIDES :{BLACK}Show all search results by setting{}{SILVER}Category {BLACK}to {WHITE}{STRING} {BLACK}and {SILVER}Type {BLACK}to {WHITE}All setting types
-STR_CONFIG_SETTINGS_NONE :{WHITE}- None -
-
-STR_CONFIG_SETTING_OFF :Off
-STR_CONFIG_SETTING_ON :On
-STR_CONFIG_SETTING_DISABLED :Disabled
-
-STR_CONFIG_SETTING_COMPANIES_OFF :Off
-STR_CONFIG_SETTING_COMPANIES_OWN :Own company
-STR_CONFIG_SETTING_COMPANIES_ALL :All companies
-
-STR_CONFIG_SETTING_NONE :None
-STR_CONFIG_SETTING_ORIGINAL :Original
-STR_CONFIG_SETTING_REALISTIC :Realistic
-
-STR_CONFIG_SETTING_HORIZONTAL_POS_LEFT :Left
-STR_CONFIG_SETTING_HORIZONTAL_POS_CENTER :Centre
-STR_CONFIG_SETTING_HORIZONTAL_POS_RIGHT :Right
-
-STR_CONFIG_SETTING_MAXIMUM_INITIAL_LOAN :Maximum initial loan: {STRING2}
-STR_CONFIG_SETTING_MAXIMUM_INITIAL_LOAN_HELPTEXT :Maximum amount a company can loan (without taking inflation into account)
-STR_CONFIG_SETTING_INTEREST_RATE :Interest rate: {STRING2}
-STR_CONFIG_SETTING_INTEREST_RATE_HELPTEXT :Loan interest rate; also controls inflation, if enabled
-STR_CONFIG_SETTING_RUNNING_COSTS :Running costs: {STRING2}
-STR_CONFIG_SETTING_RUNNING_COSTS_HELPTEXT :Set level of maintainance and running costs of vehicles and infrastructure
-STR_CONFIG_SETTING_CONSTRUCTION_SPEED :Construction speed: {STRING2}
-STR_CONFIG_SETTING_CONSTRUCTION_SPEED_HELPTEXT :Limit the amount of construction actions for AIs
-STR_CONFIG_SETTING_VEHICLE_BREAKDOWNS :Vehicle breakdowns: {STRING2}
-STR_CONFIG_SETTING_VEHICLE_BREAKDOWNS_HELPTEXT :Control how often inadequately serviced vehicles may break down
-STR_CONFIG_SETTING_SUBSIDY_MULTIPLIER :Subsidy multiplier: {STRING2}
-STR_CONFIG_SETTING_SUBSIDY_MULTIPLIER_HELPTEXT :Set how much is paid for subsidised connections
-STR_CONFIG_SETTING_CONSTRUCTION_COSTS :Construction costs: {STRING2}
-STR_CONFIG_SETTING_CONSTRUCTION_COSTS_HELPTEXT :Set level of construction and purchase costs
-STR_CONFIG_SETTING_RECESSIONS :Recessions: {STRING2}
-STR_CONFIG_SETTING_RECESSIONS_HELPTEXT :If enabled, recessions may occur every few years. During a recession all production is significantly lower (it returns to previous level when the recession is over)
-STR_CONFIG_SETTING_TRAIN_REVERSING :Disallow train reversing in stations: {STRING2}
-STR_CONFIG_SETTING_TRAIN_REVERSING_HELPTEXT :If enabled, trains will not reverse in non-terminus stations, even if there is a shorter path to their next destination when reversing
-STR_CONFIG_SETTING_DISASTERS :Disasters: {STRING2}
-STR_CONFIG_SETTING_DISASTERS_HELPTEXT :Toggle disasters which may occasionally block or destroy vehicles or infrastructure
-STR_CONFIG_SETTING_CITY_APPROVAL :City council's attitude towards area restructuring: {STRING2}
-STR_CONFIG_SETTING_CITY_APPROVAL_HELPTEXT :Choose how much noise and environmental damage by companies affect their town rating and further construction actions in their area
-
-STR_CONFIG_SETTING_BUILDONSLOPES :Allow building on slopes and coasts: {STRING2}
-STR_CONFIG_SETTING_BUILDONSLOPES_HELPTEXT :If enabled, tracks and stations can be build on most slopes. If disabled, they are only allowed on slopes which match the direction of the track and thus require no foundations
-STR_CONFIG_SETTING_AUTOSLOPE :Allow landscaping under buildings, tracks, etc. (autoslope): {STRING2}
-STR_CONFIG_SETTING_AUTOSLOPE_HELPTEXT :Allow landscaping under buildings and tracks without removing them
-STR_CONFIG_SETTING_CATCHMENT :Allow more realistically sized catchment areas: {STRING2}
-STR_CONFIG_SETTING_CATCHMENT_HELPTEXT :Have differently sized catchment areas for different types of stations and airports
-STR_CONFIG_SETTING_EXTRADYNAMITE :Allow removal of more town-owned roads, bridges and tunnels: {STRING2}
-STR_CONFIG_SETTING_EXTRADYNAMITE_HELPTEXT :Make it easier to remove town-owned infrastructure and buildings
-STR_CONFIG_SETTING_TRAIN_LENGTH :Maximum length of trains: {STRING2}
-STR_CONFIG_SETTING_TRAIN_LENGTH_HELPTEXT :Set the maximum length of trains
-STR_CONFIG_SETTING_TILE_LENGTH :{COMMA} tile{P 0 "" s}
-STR_CONFIG_SETTING_SMOKE_AMOUNT :Amount of vehicle smoke/sparks: {STRING2}
-STR_CONFIG_SETTING_SMOKE_AMOUNT_HELPTEXT :Set how much smoke or how many sparks are emitted by vehicles
-STR_CONFIG_SETTING_TRAIN_ACCELERATION_MODEL :Train acceleration model: {STRING2}
-STR_CONFIG_SETTING_TRAIN_ACCELERATION_MODEL_HELPTEXT :Select the physics model for train acceleration. The "original" model penalises slopes equally for all vehicles. The "realistic" model penalises slopes and curves depending on various properties of the consist, like length and tractive effort
-STR_CONFIG_SETTING_ROAD_VEHICLE_ACCELERATION_MODEL :Road vehicle acceleration model: {STRING2}
-STR_CONFIG_SETTING_ROAD_VEHICLE_ACCELERATION_MODEL_HELPTEXT :Select the physics model for road vehicle acceleration. The "original" model penalises slopes equally for all vehicles. The "realistic" model penalises slopes depending on various properties of the engine, for example 'tractive effort'
-STR_CONFIG_SETTING_TRAIN_SLOPE_STEEPNESS :Slope steepness for trains: {STRING2}
-STR_CONFIG_SETTING_TRAIN_SLOPE_STEEPNESS_HELPTEXT :Steepness of a sloped tile for a train. Higher values make it more difficult to climb a hill
-STR_CONFIG_SETTING_PERCENTAGE :{COMMA}%
-STR_CONFIG_SETTING_ROAD_VEHICLE_SLOPE_STEEPNESS :Slope steepness for road vehicles: {STRING2}
-STR_CONFIG_SETTING_ROAD_VEHICLE_SLOPE_STEEPNESS_HELPTEXT :Steepness of a sloped tile for a road vehicle. Higher values make it more difficult to climb a hill
-STR_CONFIG_SETTING_FORBID_90_DEG :Forbid trains and ships from making 90° turns: {STRING2}
-STR_CONFIG_SETTING_FORBID_90_DEG_HELPTEXT :90 degree turns occur when a horizontal track is directly followed by a vertical track piece on the adjacent tile, thus making the train turn by 90 degree when traversing the tile edge instead of the usual 45 degrees for other track combinations. This also applies to the turning radius of ships
-STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS :Allow to join stations not directly adjacent: {STRING2}
-STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS_HELPTEXT :Allow adding parts to a station without directly touching the existing parts. Needs Ctrl+Click while placing the new parts
-STR_CONFIG_SETTING_IMPROVEDLOAD :Use improved loading algorithm: {STRING2}
-STR_CONFIG_SETTING_IMPROVEDLOAD_HELPTEXT :If enabled, multiple vehicles waiting at a station are loaded sequentially. Loading of the next vehicle only starts when there is enough cargo waiting to completely fill the first vehicle
-STR_CONFIG_SETTING_GRADUAL_LOADING :Load vehicles gradually: {STRING2}
-STR_CONFIG_SETTING_GRADUAL_LOADING_HELPTEXT :Gradually load vehicles using vehicle specific loading durations, instead of loading everything at once with a fixed time depending only on the amount of cargo loaded
-STR_CONFIG_SETTING_INFLATION :Inflation: {STRING2}
-STR_CONFIG_SETTING_INFLATION_HELPTEXT :Enable inflation in the economy, where costs are slightly faster rising than payments
-STR_CONFIG_SETTING_SELECTGOODS :Deliver cargo to a station only when there is a demand: {STRING2}
-STR_CONFIG_SETTING_SELECTGOODS_HELPTEXT :Only deliver cargo to a station that was requested from a loading vehicle. This prevents bad ratings for cargoes that are not serviced at a station
-STR_CONFIG_SETTING_MAX_BRIDGE_LENGTH :Maximum bridge length: {STRING2}
-STR_CONFIG_SETTING_MAX_BRIDGE_LENGTH_HELPTEXT :Maximum length for building bridges
-STR_CONFIG_SETTING_MAX_TUNNEL_LENGTH :Maximum tunnel length: {STRING2}
-STR_CONFIG_SETTING_MAX_TUNNEL_LENGTH_HELPTEXT :Maximum length for building tunnels
-STR_CONFIG_SETTING_RAW_INDUSTRY_CONSTRUCTION_METHOD :Manual primary industry construction method: {STRING2}
-STR_CONFIG_SETTING_RAW_INDUSTRY_CONSTRUCTION_METHOD_HELPTEXT :Method of funding a primary industry. 'none' means it is not possible to fund any, 'prospecting' means funding is possible, but construction occurs in a random spot on the map and may as well fail, 'as other industries' means raw industries can be constructed by companies like processing industries in any position they like
-STR_CONFIG_SETTING_RAW_INDUSTRY_CONSTRUCTION_METHOD_NONE :None
-STR_CONFIG_SETTING_RAW_INDUSTRY_CONSTRUCTION_METHOD_NORMAL :As other industries
-STR_CONFIG_SETTING_RAW_INDUSTRY_CONSTRUCTION_METHOD_PROSPECTING :Prospecting
-STR_CONFIG_SETTING_INDUSTRY_PLATFORM :Flat area around industries: {STRING2}
-STR_CONFIG_SETTING_INDUSTRY_PLATFORM_HELPTEXT :Amount of flat space around an industry. This ensures empty space will remain available around an industry for building tracks, et cetera
-STR_CONFIG_SETTING_MULTIPINDTOWN :Allow multiple similar industries per town: {STRING2}
-STR_CONFIG_SETTING_MULTIPINDTOWN_HELPTEXT :Normally, a town does not want more than one industry of each type. With this setting, it will allow several industries of the same type in the same town
-STR_CONFIG_SETTING_SIGNALSIDE :Show signals: {STRING2}
-STR_CONFIG_SETTING_SIGNALSIDE_HELPTEXT :Select on which side of the track to place signals
-STR_CONFIG_SETTING_SIGNALSIDE_LEFT :On the left
-STR_CONFIG_SETTING_SIGNALSIDE_DRIVING_SIDE :On the driving side
-STR_CONFIG_SETTING_SIGNALSIDE_RIGHT :On the right
-STR_CONFIG_SETTING_SHOWFINANCES :Show finances window at the end of the year: {STRING2}
-STR_CONFIG_SETTING_SHOWFINANCES_HELPTEXT :If enabled, the finances window pops up at the end of each year to allow easy inspection of the financial status of the company
-STR_CONFIG_SETTING_NONSTOP_BY_DEFAULT :New orders are 'non-stop' by default: {STRING2}
-STR_CONFIG_SETTING_NONSTOP_BY_DEFAULT_HELPTEXT :Normally, a vehicle will stop at every station it passes. By enabling this setting, it will drive through all station on the way to its final destination without stopping. Note, that this setting only defines a default value for new orders. Individual orders can be set explicitly to either behaviour nevertheless
-STR_CONFIG_SETTING_STOP_LOCATION :New train orders stop by default at the {STRING2} of the platform
-STR_CONFIG_SETTING_STOP_LOCATION_HELPTEXT :Place where a train will stop at the platform by default. The 'near end' means close to the entry point, 'middle' means in the middle of the platform, and 'far end' means far away from the entry point. Note, that this setting only defines a default value for new orders. Individual orders can be set explicitly to either behaviour nevertheless
-STR_CONFIG_SETTING_STOP_LOCATION_NEAR_END :near end
-STR_CONFIG_SETTING_STOP_LOCATION_MIDDLE :middle
-STR_CONFIG_SETTING_STOP_LOCATION_FAR_END :far end
-STR_CONFIG_SETTING_ROAD_VEHICLE_QUEUEING :Road vehicle queueing (with quantum effects): {STRING2}
-STR_CONFIG_SETTING_ROAD_VEHICLE_QUEUEING_HELPTEXT :Make road vehicle wait in front of occupied road stops until they are cleared
-STR_CONFIG_SETTING_AUTOSCROLL :Pan window when mouse is at the edge: {STRING2}
-STR_CONFIG_SETTING_AUTOSCROLL_HELPTEXT :When enabled, viewports will start to scroll when the mouse is near the edge of the window
-STR_CONFIG_SETTING_AUTOSCROLL_DISABLED :Disabled
-STR_CONFIG_SETTING_AUTOSCROLL_MAIN_VIEWPORT_FULLSCREEN :Main viewport, full-screen only
-STR_CONFIG_SETTING_AUTOSCROLL_MAIN_VIEWPORT :Main viewport
-STR_CONFIG_SETTING_AUTOSCROLL_EVERY_VIEWPORT :Every viewport
-STR_CONFIG_SETTING_BRIBE :Allow bribing of the local authority: {STRING2}
-STR_CONFIG_SETTING_BRIBE_HELPTEXT :Allow companies to try bribing the local town authority. If the bribe is noticed by an inspector, the company will not be able to act in the town for six months
-STR_CONFIG_SETTING_ALLOW_EXCLUSIVE :Allow buying exclusive transport rights: {STRING2}
-STR_CONFIG_SETTING_ALLOW_EXCLUSIVE_HELPTEXT :If a company buys exclusive transport rights for a town, opponents' stations (passenger and cargo) won't receive any cargo for a whole year
-STR_CONFIG_SETTING_ALLOW_FUND_BUILDINGS :Allow funding buildings: {STRING2}
-STR_CONFIG_SETTING_ALLOW_FUND_BUILDINGS_HELPTEXT :Allow companies to give money to towns for funding new houses
-STR_CONFIG_SETTING_ALLOW_FUND_ROAD :Allow funding local road reconstruction: {STRING2}
-STR_CONFIG_SETTING_ALLOW_FUND_ROAD_HELPTEXT :Allow companies to give money to towns for road re-construction to sabotage road-based services in the town
-STR_CONFIG_SETTING_ALLOW_GIVE_MONEY :Allow sending money to other companies: {STRING2}
-STR_CONFIG_SETTING_ALLOW_GIVE_MONEY_HELPTEXT :Allow transfer of money between companies in multiplayer mode
-STR_CONFIG_SETTING_FREIGHT_TRAINS :Weight multiplier for freight to simulate heavy trains: {STRING2}
-STR_CONFIG_SETTING_FREIGHT_TRAINS_HELPTEXT :Set the impact of carrying freight in trains. A higher value makes carrying freight more demanding for trains, especially at hills
-STR_CONFIG_SETTING_PLANE_SPEED :Plane speed factor: {STRING2}
-STR_CONFIG_SETTING_PLANE_SPEED_HELPTEXT :Set the relative speed of planes compared to other vehicle types, to reduce the amount of income of transport by aircraft
-STR_CONFIG_SETTING_PLANE_SPEED_VALUE :1 / {COMMA}
-STR_CONFIG_SETTING_PLANE_CRASHES :Number of plane crashes: {STRING2}
-STR_CONFIG_SETTING_PLANE_CRASHES_HELPTEXT :Set the chance of an aircraft crash happening
-STR_CONFIG_SETTING_PLANE_CRASHES_NONE :None
-STR_CONFIG_SETTING_PLANE_CRASHES_REDUCED :Reduced
-STR_CONFIG_SETTING_PLANE_CRASHES_NORMAL :Normal
-STR_CONFIG_SETTING_STOP_ON_TOWN_ROAD :Allow drive-through road stops on town owned roads: {STRING}
-STR_CONFIG_SETTING_STOP_ON_TOWN_ROAD_HELPTEXT :Allow construction of drive-through road stops on town-owned roads
-STR_CONFIG_SETTING_STOP_ON_COMPETITOR_ROAD :Allow drive-through road stops on roads owned by competitors: {STRING2}
-STR_CONFIG_SETTING_STOP_ON_COMPETITOR_ROAD_HELPTEXT :Allow construction of drive-through road stops on roads owned by other companies
-STR_CONFIG_SETTING_ADJACENT_STATIONS :Allow building adjacent stations: {STRING2}
-STR_CONFIG_SETTING_ADJACENT_STATIONS_HELPTEXT :Allow different stations to touch each other
-STR_CONFIG_SETTING_DYNAMIC_ENGINES :Enable multiple NewGRF engine sets: {STRING2}
-STR_CONFIG_SETTING_DYNAMIC_ENGINES_HELPTEXT :Compatibility option for old NewGRFs. Do not disable this, unless you know exactly what you are doing!
-STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES :{WHITE}Changing this setting is not possible when there are vehicles
-STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE :Infrastructure maintenance: {STRING2}
-STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT :When enabled, infrastructure causes maintenance costs. The cost grows over-proportional with the network size, thus affecting bigger companies more than smaller ones
-
-STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Airports never expire: {STRING2}
-STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Enabling this setting makes each airport type stay available forever after its introduction
-
-STR_CONFIG_SETTING_WARN_LOST_VEHICLE :Warn if vehicle is lost: {STRING2}
-STR_CONFIG_SETTING_WARN_LOST_VEHICLE_HELPTEXT :Trigger messages about vehicles unable to find a path to their ordered destination
-STR_CONFIG_SETTING_ORDER_REVIEW :Review vehicles' orders: {STRING2}
-STR_CONFIG_SETTING_ORDER_REVIEW_HELPTEXT :When enabled, the orders of the vehicles are periodically checked, and some obvious issues are reported with a news message when detected
-STR_CONFIG_SETTING_ORDER_REVIEW_OFF :No
-STR_CONFIG_SETTING_ORDER_REVIEW_EXDEPOT :Yes, but exclude stopped vehicles
-STR_CONFIG_SETTING_ORDER_REVIEW_ON :Of all vehicles
-STR_CONFIG_SETTING_WARN_INCOME_LESS :Warn if a vehicle's income is negative: {STRING2}
-STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :When enabled, a news message gets sent when a vehicle has not made any profit within a calendar year
-STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Vehicles never expire: {STRING2}
-STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :When enabled, all vehicle models remain available forever after their introduction
-STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Autorenew vehicle when it gets old: {STRING2}
-STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :When enabled, a vehicle nearing its end of life gets automatically replaced when the renew conditions are fulfilled
-STR_CONFIG_SETTING_AUTORENEW_MONTHS :Autorenew when vehicle is {STRING2} max age
-STR_CONFIG_SETTING_AUTORENEW_MONTHS_HELPTEXT :Relative age when a vehicle should be considered for auto-renewing
-STR_CONFIG_SETTING_AUTORENEW_MONTHS_VALUE_BEFORE :{COMMA} month{P 0 "" s} before
-STR_CONFIG_SETTING_AUTORENEW_MONTHS_VALUE_AFTER :{COMMA} month{P 0 "" s} after
-STR_CONFIG_SETTING_AUTORENEW_MONEY :Autorenew minimum needed money for renew: {STRING2}
-STR_CONFIG_SETTING_AUTORENEW_MONEY_HELPTEXT :Minimal amount of money that must remain in the bank before considering auto-renewing vehicles
-STR_CONFIG_SETTING_ERRMSG_DURATION :Duration of error message: {STRING2}
-STR_CONFIG_SETTING_ERRMSG_DURATION_HELPTEXT :Duration for displaying error messages in a red window. Note that some (critical) error messages are not closed automatically after this time, but must be closed manually
-STR_CONFIG_SETTING_ERRMSG_DURATION_VALUE :{COMMA} second{P 0 "" s}
-STR_CONFIG_SETTING_HOVER_DELAY :Show tooltips: {STRING2}
-STR_CONFIG_SETTING_HOVER_DELAY_HELPTEXT :Delay before tooltips are displayed when hovering the mouse over some interface element. Alternatively tooltips can be bound to the right mouse button
-STR_CONFIG_SETTING_HOVER_DELAY_VALUE :Hover for {COMMA} second{P 0 "" s}
-STR_CONFIG_SETTING_HOVER_DELAY_DISABLED :Right click
-STR_CONFIG_SETTING_POPULATION_IN_LABEL :Show town population in the town name label: {STRING2}
-STR_CONFIG_SETTING_POPULATION_IN_LABEL_HELPTEXT :Display the population of towns in their label on the map
-STR_CONFIG_SETTING_GRAPH_LINE_THICKNESS :Thickness of lines in graphs: {STRING2}
-STR_CONFIG_SETTING_GRAPH_LINE_THICKNESS_HELPTEXT :Width of the line in the graphs. A thin line is more precisely readable, a thicker line is easier to see and colours are easier to distinguish
-
-STR_CONFIG_SETTING_LAND_GENERATOR :Land generator: {STRING2}
-STR_CONFIG_SETTING_LAND_GENERATOR_ORIGINAL :Original
-STR_CONFIG_SETTING_LAND_GENERATOR_TERRA_GENESIS :TerraGenesis
-STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE :Max distance from edge for Oil Refineries: {STRING2}
-STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE_HELPTEXT :Oil refineries are only constructed near the map border, that is at the coast for island maps
-STR_CONFIG_SETTING_SNOWLINE_HEIGHT :Snow line height: {STRING2}
-STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN :Roughness of terrain (TerraGenesis only) : {STRING2}
-STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN_VERY_SMOOTH :Very Smooth
-STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN_SMOOTH :Smooth
-STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN_ROUGH :Rough
-STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN_VERY_ROUGH :Very Rough
-STR_CONFIG_SETTING_TREE_PLACER :Tree placer algorithm: {STRING2}
-STR_CONFIG_SETTING_TREE_PLACER_NONE :None
-STR_CONFIG_SETTING_TREE_PLACER_ORIGINAL :Original
-STR_CONFIG_SETTING_TREE_PLACER_IMPROVED :Improved
-STR_CONFIG_SETTING_HEIGHTMAP_ROTATION :Heightmap rotation: {STRING2}
-STR_CONFIG_SETTING_HEIGHTMAP_ROTATION_COUNTER_CLOCKWISE :Counter clockwise
-STR_CONFIG_SETTING_HEIGHTMAP_ROTATION_CLOCKWISE :Clockwise
-STR_CONFIG_SETTING_SE_FLAT_WORLD_HEIGHT :The height level a flat scenario map gets: {STRING2}
-STR_CONFIG_SETTING_ENABLE_FREEFORM_EDGES :Enable landscaping the tiles at the map borders: {STRING2}
-STR_CONFIG_SETTING_ENABLE_FREEFORM_EDGES_HELPTEXT :If disabled, the map borders will always be ocean
-STR_CONFIG_SETTING_EDGES_NOT_EMPTY :{WHITE}One or more tiles at the northern edge are not empty
-STR_CONFIG_SETTING_EDGES_NOT_WATER :{WHITE}One or more tiles at one of the edges is not water
-
-STR_CONFIG_SETTING_STATION_SPREAD :Max station spread: {STRING2}
-STR_CONFIG_SETTING_STATION_SPREAD_HELPTEXT :Maximum area the parts of a single station may be spread out on. Note that high values will slow the game
-STR_CONFIG_SETTING_SERVICEATHELIPAD :Service helicopters at helipads automatically: {STRING2}
-STR_CONFIG_SETTING_SERVICEATHELIPAD_HELPTEXT :Service helicopters after every landing, even if there is no depot at the airport
-STR_CONFIG_SETTING_LINK_TERRAFORM_TOOLBAR :Link landscape toolbar to rail/road/water/airport toolbars: {STRING2}
-STR_CONFIG_SETTING_LINK_TERRAFORM_TOOLBAR_HELPTEXT :When opening a construction toolbar for a transport type, also open the toolbar for terraforming
-STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR :Land colour used at the smallmap: {STRING2}
-STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT :Colour of the terrain in the smallmap
-STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN :Green
-STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_DARK_GREEN :Dark green
-STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_VIOLET :Violet
-STR_CONFIG_SETTING_REVERSE_SCROLLING :Reverse scroll direction: {STRING2}
-STR_CONFIG_SETTING_REVERSE_SCROLLING_HELPTEXT :Behaviour when scrolling the map with the right mouse button. When disabled, the mouse moves the camera. When enabled, the mouse moves the map
-STR_CONFIG_SETTING_SMOOTH_SCROLLING :Smooth viewport scrolling: {STRING2}
-STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT :Control how the main view scrolls to a specific position when clicking on the smallmap or when issuing a command to scroll to a specific object on the map. If enabled, the viewport scrolls smoothly, if disabled it jumps directly to the targeted spot
-STR_CONFIG_SETTING_MEASURE_TOOLTIP :Show a measurement tooltip when using various build-tools: {STRING2}
-STR_CONFIG_SETTING_MEASURE_TOOLTIP_HELPTEXT :Display tile-distances and height differences when dragging during construction operations
-STR_CONFIG_SETTING_LIVERIES :Show company liveries: {STRING2}
-STR_CONFIG_SETTING_LIVERIES_HELPTEXT :Control usage of vehicle-type specific liveries for vehicles (in contrary to company specific)
-STR_CONFIG_SETTING_LIVERIES_NONE :None
-STR_CONFIG_SETTING_LIVERIES_OWN :Own company
-STR_CONFIG_SETTING_LIVERIES_ALL :All companies
-STR_CONFIG_SETTING_PREFER_TEAMCHAT :Prefer team chat with : {STRING2}
-STR_CONFIG_SETTING_PREFER_TEAMCHAT_HELPTEXT :Switch the binding of company-internal and public chat to resp.
-STR_CONFIG_SETTING_SCROLLWHEEL_SCROLLING :Function of scrollwheel: {STRING2}
-STR_CONFIG_SETTING_SCROLLWHEEL_SCROLLING_HELPTEXT :Enable scrolling with two-dimensional mouse-wheels
-STR_CONFIG_SETTING_SCROLLWHEEL_ZOOM :Zoom map
-STR_CONFIG_SETTING_SCROLLWHEEL_SCROLL :Scroll map
-STR_CONFIG_SETTING_SCROLLWHEEL_OFF :Off
-STR_CONFIG_SETTING_SCROLLWHEEL_MULTIPLIER :Map scrollwheel speed: {STRING2}
-STR_CONFIG_SETTING_SCROLLWHEEL_MULTIPLIER_HELPTEXT :Control the sensitivity of mouse-wheel scrolling
-STR_CONFIG_SETTING_OSK_ACTIVATION :On screen keyboard: {STRING2}
-STR_CONFIG_SETTING_OSK_ACTIVATION_HELPTEXT :Select the method to open the on screen keyboard for entering text into editboxes only using the pointing device. This is meant for small devices without actual keyboard
-STR_CONFIG_SETTING_OSK_ACTIVATION_DISABLED :Disabled
-STR_CONFIG_SETTING_OSK_ACTIVATION_DOUBLE_CLICK :Double click
-STR_CONFIG_SETTING_OSK_ACTIVATION_SINGLE_CLICK_FOCUS :Single click (when focussed)
-STR_CONFIG_SETTING_OSK_ACTIVATION_SINGLE_CLICK :Single click (immediately)
-
-STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU :Right-click emulation: {STRING2}
-STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_HELPTEXT :Select the method to emulate right mouse-button clicks
-STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND :Command+Click
-STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_CONTROL :Ctrl+Click
-STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Off
-
-STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :Left-click scrolling: {STRING2}
-STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING_HELPTEXT :Enable scrolling the map by dragging it with the left mouse button. This is especially useful when using a touch-screen for scrolling
-
-STR_CONFIG_SETTING_DATE_FORMAT_IN_SAVE_NAMES :Use the {STRING2} date format for savegame names
-STR_CONFIG_SETTING_DATE_FORMAT_IN_SAVE_NAMES_HELPTEXT :Format of the date in save game filenames
-STR_CONFIG_SETTING_DATE_FORMAT_IN_SAVE_NAMES_LONG :long (31st Dec 2008)
-STR_CONFIG_SETTING_DATE_FORMAT_IN_SAVE_NAMES_SHORT :short (31-12-2008)
-STR_CONFIG_SETTING_DATE_FORMAT_IN_SAVE_NAMES_ISO :ISO (2008-12-31)
-
-STR_CONFIG_SETTING_NEWGRF_DEFAULT_PALETTE :Default palette to assume for NewGRFs not specifying a palette: {STRING2}
-STR_CONFIG_SETTING_NEWGRF_DEFAULT_PALETTE_HELPTEXT :Default palette to use for NewGRFs that do not specify which one they need
-STR_CONFIG_SETTING_NEWGRF_DEFAULT_PALETTE_DOS :Default (D) palette
-STR_CONFIG_SETTING_NEWGRF_DEFAULT_PALETTE_WIN :Legacy (W) palette
-
-STR_CONFIG_SETTING_PAUSE_ON_NEW_GAME :Automatically pause when starting a new game: {STRING2}
-STR_CONFIG_SETTING_PAUSE_ON_NEW_GAME_HELPTEXT :When enabled, the game will automatically pause when starting a new game, allowing for closer study of the map
-STR_CONFIG_SETTING_COMMAND_PAUSE_LEVEL :When paused allow: {STRING2}
-STR_CONFIG_SETTING_COMMAND_PAUSE_LEVEL_HELPTEXT :Select what actions may be done while the game is paused
-STR_CONFIG_SETTING_COMMAND_PAUSE_LEVEL_NO_ACTIONS :No actions
-STR_CONFIG_SETTING_COMMAND_PAUSE_LEVEL_ALL_NON_CONSTRUCTION :All non-construction actions
-STR_CONFIG_SETTING_COMMAND_PAUSE_LEVEL_ALL_NON_LANDSCAPING :All but landscape modifying actions
-STR_CONFIG_SETTING_COMMAND_PAUSE_LEVEL_ALL_ACTIONS :All actions
-STR_CONFIG_SETTING_ADVANCED_VEHICLE_LISTS :Use the advanced vehicle list: {STRING2}
-STR_CONFIG_SETTING_ADVANCED_VEHICLE_LISTS_HELPTEXT :Enable usage of the advanced vehicle lists for grouping vehicles
-STR_CONFIG_SETTING_LOADING_INDICATORS :Use loading indicators: {STRING2}
-STR_CONFIG_SETTING_LOADING_INDICATORS_HELPTEXT :Select whether loading indicators are displayed above loading or unloading vehicles
-STR_CONFIG_SETTING_TIMETABLE_IN_TICKS :Show timetable in ticks rather than days: {STRING2}
-STR_CONFIG_SETTING_TIMETABLE_IN_TICKS_HELPTEXT :Show travel times in time tables in game ticks instead of days
-STR_CONFIG_SETTING_TIMETABLE_SHOW_ARRIVAL_DEPARTURE :Show arrival and departure in timetables: {STRING2}
-STR_CONFIG_SETTING_TIMETABLE_SHOW_ARRIVAL_DEPARTURE_HELPTEXT :Display anticipated arrival and departure times in timetables
-STR_CONFIG_SETTING_QUICKGOTO :Quick creation of vehicle orders: {STRING2}
-STR_CONFIG_SETTING_QUICKGOTO_HELPTEXT :Pre-select the 'goto cursor' when opening the orders window
-STR_CONFIG_SETTING_DEFAULT_RAIL_TYPE :Default rail type (after new game/game load): {STRING2}
-STR_CONFIG_SETTING_DEFAULT_RAIL_TYPE_HELPTEXT :Rail type to select after starting or loading a game. 'first available' selects the oldest type of tracks, 'last available' selects the newest type of tracks, and 'most used' selects the type which is currently most in use
-STR_CONFIG_SETTING_DEFAULT_RAIL_TYPE_FIRST :First available
-STR_CONFIG_SETTING_DEFAULT_RAIL_TYPE_LAST :Last available
-STR_CONFIG_SETTING_DEFAULT_RAIL_TYPE_MOST_USED :Most used
-STR_CONFIG_SETTING_SHOW_TRACK_RESERVATION :Show reserved tracks: {STRING2}
-STR_CONFIG_SETTING_SHOW_TRACK_RESERVATION_HELPTEXT :Give reserved tracks a different colour to assist in problems with trains refusing to enter path-based blocks
-STR_CONFIG_SETTING_PERSISTENT_BUILDINGTOOLS :Keep building tools active after usage: {STRING2}
-STR_CONFIG_SETTING_PERSISTENT_BUILDINGTOOLS_HELPTEXT :Keep the building tools for bridges, tunnels, etc. open after use
-STR_CONFIG_SETTING_EXPENSES_LAYOUT :Group expenses in company finance window: {STRING2}
-STR_CONFIG_SETTING_EXPENSES_LAYOUT_HELPTEXT :Define the layout for the company expenses window
-
-STR_CONFIG_SETTING_SOUND_TICKER :News ticker: {STRING2}
-STR_CONFIG_SETTING_SOUND_TICKER_HELPTEXT :Play sound for summarised news messages
-STR_CONFIG_SETTING_SOUND_NEWS :Newspaper: {STRING2}
-STR_CONFIG_SETTING_SOUND_NEWS_HELPTEXT :Play sound upon display of newspapers
-STR_CONFIG_SETTING_SOUND_NEW_YEAR :End of year: {STRING2}
-STR_CONFIG_SETTING_SOUND_NEW_YEAR_HELPTEXT :Play sound at the end of a year summarising the company's performance during the year compared to the previous year
-STR_CONFIG_SETTING_SOUND_CONFIRM :Construction: {STRING2}
-STR_CONFIG_SETTING_SOUND_CONFIRM_HELPTEXT :Play sound on successful constructions or other actions
-STR_CONFIG_SETTING_SOUND_CLICK :Button clicks: {STRING2}
-STR_CONFIG_SETTING_SOUND_CLICK_HELPTEXT :Beep when clicking buttons
-STR_CONFIG_SETTING_SOUND_DISASTER :Disasters/accidents: {STRING2}
-STR_CONFIG_SETTING_SOUND_DISASTER_HELPTEXT :Play sound effects of accidents and disasters
-STR_CONFIG_SETTING_SOUND_VEHICLE :Vehicles: {STRING2}
-STR_CONFIG_SETTING_SOUND_VEHICLE_HELPTEXT :Play sound effects of vehicles
-STR_CONFIG_SETTING_SOUND_AMBIENT :Ambient: {STRING2}
-STR_CONFIG_SETTING_SOUND_AMBIENT_HELPTEXT :Play ambient sounds of landscape, industries and towns
-
-STR_CONFIG_SETTING_DISABLE_UNSUITABLE_BUILDING :Disable infrastructure building when no suitable vehicles are available: {STRING2}
-STR_CONFIG_SETTING_DISABLE_UNSUITABLE_BUILDING_HELPTEXT :When enabled, infrastructure is only available if there are also vehicles available, preventing waste of time and money on unusable infrastructure
-STR_CONFIG_SETTING_MAX_TRAINS :Max trains per company: {STRING2}
-STR_CONFIG_SETTING_MAX_TRAINS_HELPTEXT :Maximum number of trains that a company can have
-STR_CONFIG_SETTING_MAX_ROAD_VEHICLES :Max road vehicles per company: {STRING2}
-STR_CONFIG_SETTING_MAX_ROAD_VEHICLES_HELPTEXT :Maximum number of road vehicles that a company can have
-STR_CONFIG_SETTING_MAX_AIRCRAFT :Max aircraft per company: {STRING2}
-STR_CONFIG_SETTING_MAX_AIRCRAFT_HELPTEXT :Maximum number of aircraft that a company can have
-STR_CONFIG_SETTING_MAX_SHIPS :Max ships per company: {STRING2}
-STR_CONFIG_SETTING_MAX_SHIPS_HELPTEXT :Maximum number of ships that a company can have
-
-STR_CONFIG_SETTING_AI_BUILDS_TRAINS :Disable trains for computer: {STRING2}
-STR_CONFIG_SETTING_AI_BUILDS_TRAINS_HELPTEXT :Enabling this setting makes building trains impossible for a computer player
-STR_CONFIG_SETTING_AI_BUILDS_ROAD_VEHICLES :Disable road vehicles for computer: {STRING2}
-STR_CONFIG_SETTING_AI_BUILDS_ROAD_VEHICLES_HELPTEXT :Enabling this setting makes building road vehicles impossible for a computer player
-STR_CONFIG_SETTING_AI_BUILDS_AIRCRAFT :Disable aircraft for computer: {STRING2}
-STR_CONFIG_SETTING_AI_BUILDS_AIRCRAFT_HELPTEXT :Enabling this setting makes building aircraft impossible for a computer player
-STR_CONFIG_SETTING_AI_BUILDS_SHIPS :Disable ships for computer: {STRING2}
-STR_CONFIG_SETTING_AI_BUILDS_SHIPS_HELPTEXT :Enabling this setting makes building ships impossible for a computer player
-
-STR_CONFIG_SETTING_AI_PROFILE :Default settings profile: {STRING2}
-STR_CONFIG_SETTING_AI_PROFILE_HELPTEXT :Choose which settings profile to use for random AIs or for initial values when adding a new AI or Game Script
-STR_CONFIG_SETTING_AI_PROFILE_EASY :Easy
-STR_CONFIG_SETTING_AI_PROFILE_MEDIUM :Medium
-STR_CONFIG_SETTING_AI_PROFILE_HARD :Hard
-
-STR_CONFIG_SETTING_AI_IN_MULTIPLAYER :Allow AIs in multiplayer: {STRING2}
-STR_CONFIG_SETTING_AI_IN_MULTIPLAYER_HELPTEXT :Allow AI computer players to participate in multiplayer games
-STR_CONFIG_SETTING_SCRIPT_MAX_OPCODES :#opcodes before scripts are suspended: {STRING2}
-STR_CONFIG_SETTING_SCRIPT_MAX_OPCODES_HELPTEXT :Maximum number of computation steps that a script can take in one turn
-
-STR_CONFIG_SETTING_SERVINT_ISPERCENT :Service intervals are in percents: {STRING2}
-STR_CONFIG_SETTING_SERVINT_ISPERCENT_HELPTEXT :Choose whether servicing of vehicles is triggered by the time passed since last service or by reliability dropping by a certain percentage of the maximum reliability
-STR_CONFIG_SETTING_SERVINT_TRAINS :Default service interval for trains: {STRING2}
-STR_CONFIG_SETTING_SERVINT_TRAINS_HELPTEXT :Set the default service interval for new rail vehicles, if no explicit service interval is set for the vehicle
-STR_CONFIG_SETTING_SERVINT_VALUE :{COMMA} day{P 0 "" s}/%
-STR_CONFIG_SETTING_SERVINT_DISABLED :Disabled
-STR_CONFIG_SETTING_SERVINT_ROAD_VEHICLES :Default service interval for road vehicles: {STRING2}
-STR_CONFIG_SETTING_SERVINT_ROAD_VEHICLES_HELPTEXT :Set the default service interval for new road vehicles, if no explicit service interval is set for the vehicle
-STR_CONFIG_SETTING_SERVINT_AIRCRAFT :Default service interval for aircraft: {STRING2}
-STR_CONFIG_SETTING_SERVINT_AIRCRAFT_HELPTEXT :Set the default service interval for new aircraft, if no explicit service interval is set for the vehicle
-STR_CONFIG_SETTING_SERVINT_SHIPS :Default service interval for ships: {STRING2}
-STR_CONFIG_SETTING_SERVINT_SHIPS_HELPTEXT :Set the default service interval for new ships, if no explicit service interval is set for the vehicle
-STR_CONFIG_SETTING_NOSERVICE :Disable servicing when breakdowns set to none: {STRING2}
-STR_CONFIG_SETTING_NOSERVICE_HELPTEXT :When enabled, vehicles do not get serviced if they cannot break down
-STR_CONFIG_SETTING_WAGONSPEEDLIMITS :Enable wagon speed limits: {STRING2}
-STR_CONFIG_SETTING_WAGONSPEEDLIMITS_HELPTEXT :When enabled, also use speed limits of wagons for deciding the maximum speed of a train
-STR_CONFIG_SETTING_DISABLE_ELRAILS :Disable electric rails: {STRING2}
-STR_CONFIG_SETTING_DISABLE_ELRAILS_HELPTEXT :Enabling this setting disables the requirement to electrify tracks to make electric engines run on them
-
-STR_CONFIG_SETTING_NEWS_ARRIVAL_FIRST_VEHICLE_OWN :Arrival of first vehicle at player's station: {STRING2}
-STR_CONFIG_SETTING_NEWS_ARRIVAL_FIRST_VEHICLE_OWN_HELPTEXT :Display a newspaper when the first vehicle arrives at a new player's station
-STR_CONFIG_SETTING_NEWS_ARRIVAL_FIRST_VEHICLE_OTHER :Arrival of first vehicle at competitor's station: {STRING2}
-STR_CONFIG_SETTING_NEWS_ARRIVAL_FIRST_VEHICLE_OTHER_HELPTEXT :Display a newspaper when the first vehicle arrives at a new competitor's station
-STR_CONFIG_SETTING_NEWS_ACCIDENTS_DISASTERS :Accidents / disasters: {STRING2}
-STR_CONFIG_SETTING_NEWS_ACCIDENTS_DISASTERS_HELPTEXT :Display a newspaper when accidents or disasters occur
-STR_CONFIG_SETTING_NEWS_COMPANY_INFORMATION :Company information: {STRING2}
-STR_CONFIG_SETTING_NEWS_COMPANY_INFORMATION_HELPTEXT :Display a newspaper when a new company starts, or when companies are risking to bankrupt
-STR_CONFIG_SETTING_NEWS_INDUSTRY_OPEN :Opening of industries: {STRING2}
-STR_CONFIG_SETTING_NEWS_INDUSTRY_OPEN_HELPTEXT :Display a newspaper when new industries open
-STR_CONFIG_SETTING_NEWS_INDUSTRY_CLOSE :Closing of industries: {STRING2}
-STR_CONFIG_SETTING_NEWS_INDUSTRY_CLOSE_HELPTEXT :Display a newspaper when industries close down
-STR_CONFIG_SETTING_NEWS_ECONOMY_CHANGES :Economy changes: {STRING2}
-STR_CONFIG_SETTING_NEWS_ECONOMY_CHANGES_HELPTEXT :Display a newspaper about global changes to economy
-STR_CONFIG_SETTING_NEWS_INDUSTRY_CHANGES_COMPANY :Production changes of industries served by the company: {STRING2}
-STR_CONFIG_SETTING_NEWS_INDUSTRY_CHANGES_COMPANY_HELPTEXT :Display a newspaper when the production level of industries change, which are served by the company
-STR_CONFIG_SETTING_NEWS_INDUSTRY_CHANGES_OTHER :Production changes of industries served by competitor(s): {STRING2}
-STR_CONFIG_SETTING_NEWS_INDUSTRY_CHANGES_OTHER_HELPTEXT :Display a newspaper when the production level of industries change, which are served by the competitors
-STR_CONFIG_SETTING_NEWS_INDUSTRY_CHANGES_UNSERVED :Other industry production changes: {STRING2}
-STR_CONFIG_SETTING_NEWS_INDUSTRY_CHANGES_UNSERVED_HELPTEXT :Display a newspaper when the production level of industries change, which are not served by the company or competitors
-STR_CONFIG_SETTING_NEWS_ADVICE :Advice / information on company's vehicles: {STRING2}
-STR_CONFIG_SETTING_NEWS_ADVICE_HELPTEXT :Display messages about vehicles needing attention
-STR_CONFIG_SETTING_NEWS_NEW_VEHICLES :New vehicles: {STRING2}
-STR_CONFIG_SETTING_NEWS_NEW_VEHICLES_HELPTEXT :Display a newspaper when a new vehicle type becomes available
-STR_CONFIG_SETTING_NEWS_CHANGES_ACCEPTANCE :Changes to cargo acceptance: {STRING2}
-STR_CONFIG_SETTING_NEWS_CHANGES_ACCEPTANCE_HELPTEXT :Display messages about stations changing acceptance of some cargoes
-STR_CONFIG_SETTING_NEWS_SUBSIDIES :Subsidies: {STRING2}
-STR_CONFIG_SETTING_NEWS_SUBSIDIES_HELPTEXT :Display a newspaper about subsidy related events
-STR_CONFIG_SETTING_NEWS_GENERAL_INFORMATION :General information: {STRING2}
-STR_CONFIG_SETTING_NEWS_GENERAL_INFORMATION_HELPTEXT :Display newspaper about general events, such as purchase of exclusive rights or funding of road reconstruction
-
-STR_CONFIG_SETTING_NEWS_MESSAGES_OFF :Off
-STR_CONFIG_SETTING_NEWS_MESSAGES_SUMMARY :Summary
-STR_CONFIG_SETTING_NEWS_MESSAGES_FULL :Full
-
-STR_CONFIG_SETTING_COLOURED_NEWS_YEAR :Coloured news appears in: {STRING2}
-STR_CONFIG_SETTING_COLOURED_NEWS_YEAR_HELPTEXT :Year that the newspaper announcements get printed in colour. Before this year, it uses monochrome black/white
-STR_CONFIG_SETTING_STARTING_YEAR :Starting year: {STRING2}
-STR_CONFIG_SETTING_SMOOTH_ECONOMY :Enable smooth economy (more, smaller changes): {STRING2}
-STR_CONFIG_SETTING_SMOOTH_ECONOMY_HELPTEXT :When enabled, industry production changes more often, and in smaller steps. This setting has usually no effect, if industry types are provided by a NewGRF
-STR_CONFIG_SETTING_ALLOW_SHARES :Allow buying shares from other companies: {STRING2}
-STR_CONFIG_SETTING_ALLOW_SHARES_HELPTEXT :When enabled, allow buying and selling of company shares. Shares will only be available for companies reaching a certain age
-STR_CONFIG_SETTING_FEEDER_PAYMENT_SHARE :Percentage of leg profit to pay in feeder systems: {STRING2}
-STR_CONFIG_SETTING_FEEDER_PAYMENT_SHARE_HELPTEXT :Percentage of income given to the intermediate legs in feeder systems, giving more control over the income
-STR_CONFIG_SETTING_DRAG_SIGNALS_DENSITY :When dragging, place signals every: {STRING2}
-STR_CONFIG_SETTING_DRAG_SIGNALS_DENSITY_HELPTEXT :Set the distance at which signals will be built on a track up to the next obstacle (signal, junction), if signals are dragged
-STR_CONFIG_SETTING_DRAG_SIGNALS_DENSITY_VALUE :{COMMA} tile{P 0 "" s}
-STR_CONFIG_SETTING_DRAG_SIGNALS_FIXED_DISTANCE :When dragging, keep fixed distance between signals: {STRING2}
-STR_CONFIG_SETTING_DRAG_SIGNALS_FIXED_DISTANCE_HELPTEXT :Select the behaviour of signal placement when Ctrl+dragging signals. If disabled, signals are placed around tunnels or bridges to avoid long stretches without signals. If enabled, signals are placed every n tiles, making alignment of signals at parallel tracks easier
-STR_CONFIG_SETTING_SEMAPHORE_BUILD_BEFORE_DATE :Automatically build semaphores before: {STRING2}
-STR_CONFIG_SETTING_SEMAPHORE_BUILD_BEFORE_DATE_HELPTEXT :Set the year when electric signals will be used for tracks. Before this year, non-electric signals will be used (which have the exact same function, but different looks)
-STR_CONFIG_SETTING_ENABLE_SIGNAL_GUI :Enable the signal GUI: {STRING2}
-STR_CONFIG_SETTING_ENABLE_SIGNAL_GUI_HELPTEXT :Display a window for choosing signal types to build, instead of only window-less signal-type rotation with Ctrl+clicking on build signals
-STR_CONFIG_SETTING_DEFAULT_SIGNAL_TYPE :Signal type to build by default: {STRING2}
-STR_CONFIG_SETTING_DEFAULT_SIGNAL_TYPE_HELPTEXT :Default signal type to use
-STR_CONFIG_SETTING_DEFAULT_SIGNAL_NORMAL :Block signals
-STR_CONFIG_SETTING_DEFAULT_SIGNAL_PBS :Path signals
-STR_CONFIG_SETTING_DEFAULT_SIGNAL_PBSOWAY :One-way path signals
-STR_CONFIG_SETTING_CYCLE_SIGNAL_TYPES :Cycle through signal types: {STRING2}
-STR_CONFIG_SETTING_CYCLE_SIGNAL_TYPES_HELPTEXT :Select which signal types to cycle through, when Ctrl+clicking on a build signal with the signal tool
-STR_CONFIG_SETTING_CYCLE_SIGNAL_NORMAL :Block signals only
-STR_CONFIG_SETTING_CYCLE_SIGNAL_PBS :Path signals only
-STR_CONFIG_SETTING_CYCLE_SIGNAL_ALL :All
-
-STR_CONFIG_SETTING_TOWN_LAYOUT :Road layout for new towns: {STRING2}
-STR_CONFIG_SETTING_TOWN_LAYOUT_HELPTEXT :Layout for the road network of towns
-STR_CONFIG_SETTING_TOWN_LAYOUT_DEFAULT :Original
-STR_CONFIG_SETTING_TOWN_LAYOUT_BETTER_ROADS :Better roads
-STR_CONFIG_SETTING_TOWN_LAYOUT_2X2_GRID :2x2 grid
-STR_CONFIG_SETTING_TOWN_LAYOUT_3X3_GRID :3x3 grid
-STR_CONFIG_SETTING_TOWN_LAYOUT_RANDOM :Random
-STR_CONFIG_SETTING_ALLOW_TOWN_ROADS :Towns are allowed to build roads: {STRING2}
-STR_CONFIG_SETTING_ALLOW_TOWN_ROADS_HELPTEXT :Allow towns to build roads for growth. Disable to prevent town authorities from building roads themselves
-STR_CONFIG_SETTING_ALLOW_TOWN_LEVEL_CROSSINGS :Towns are allowed to build level crossings: {STRING2}
-STR_CONFIG_SETTING_ALLOW_TOWN_LEVEL_CROSSINGS_HELPTEXT :Enabling this setting allows towns to build level crossings
-STR_CONFIG_SETTING_NOISE_LEVEL :Allow town controlled noise level for airports: {STRING2}
-STR_CONFIG_SETTING_NOISE_LEVEL_HELPTEXT :With this setting disabled, there can be two airports in each town. With this setting enabled, the number of airports in a city is limited by the noise acceptance of the town, which depends on population and airport size and distance
-STR_CONFIG_SETTING_TOWN_FOUNDING :Founding towns in game: {STRING2}
-STR_CONFIG_SETTING_TOWN_FOUNDING_HELPTEXT :Enabling this setting allows players to found new towns in the game
-STR_CONFIG_SETTING_TOWN_FOUNDING_FORBIDDEN :Forbidden
-STR_CONFIG_SETTING_TOWN_FOUNDING_ALLOWED :Allowed
-STR_CONFIG_SETTING_TOWN_FOUNDING_ALLOWED_CUSTOM_LAYOUT :Allowed, custom town layout
-
-STR_CONFIG_SETTING_EXTRA_TREE_PLACEMENT :In game placement of trees: {STRING2}
-STR_CONFIG_SETTING_EXTRA_TREE_PLACEMENT_HELPTEXT :Control random appearance of trees during the game. This might affect industries which rely on tree growth, for example lumber mills
-STR_CONFIG_SETTING_EXTRA_TREE_PLACEMENT_NONE :None {RED}(breaks lumber mill)
-STR_CONFIG_SETTING_EXTRA_TREE_PLACEMENT_RAINFOREST :Only in rain forests
-STR_CONFIG_SETTING_EXTRA_TREE_PLACEMENT_ALL :Everywhere
-
-STR_CONFIG_SETTING_TOOLBAR_POS :Position of main toolbar: {STRING2}
-STR_CONFIG_SETTING_TOOLBAR_POS_HELPTEXT :Horizontal position of the main toolbar at the top of the screen
-STR_CONFIG_SETTING_STATUSBAR_POS :Position of status bar: {STRING2}
-STR_CONFIG_SETTING_STATUSBAR_POS_HELPTEXT :Horizontal position of the status bar at the bottom of the screen
-STR_CONFIG_SETTING_SNAP_RADIUS :Window snap radius: {STRING2}
-STR_CONFIG_SETTING_SNAP_RADIUS_HELPTEXT :Distance between windows before the window being moved is automatically aligned to nearby windows
-STR_CONFIG_SETTING_SNAP_RADIUS_VALUE :{COMMA} pixel{P 0 "" s}
-STR_CONFIG_SETTING_SNAP_RADIUS_DISABLED :Disabled
-STR_CONFIG_SETTING_SOFT_LIMIT :Maximum number of non-sticky windows: {STRING2}
-STR_CONFIG_SETTING_SOFT_LIMIT_HELPTEXT :Number of non-sticky open windows before old windows get automatically closed to make room for new windows
-STR_CONFIG_SETTING_SOFT_LIMIT_VALUE :{COMMA}
-STR_CONFIG_SETTING_SOFT_LIMIT_DISABLED :disabled
-STR_CONFIG_SETTING_ZOOM_MIN :Maximum zoom in level: {STRING2}
-STR_CONFIG_SETTING_ZOOM_MIN_HELPTEXT :The maximum zoom-in level for viewports. Note that enabling higher zoom-in levels increases memory requirements
-STR_CONFIG_SETTING_ZOOM_MAX :Maximum zoom out level: {STRING2}
-STR_CONFIG_SETTING_ZOOM_MAX_HELPTEXT :The maximum zoom-out level for viewports. Higher zoom-out levels might cause lag when used
-STR_CONFIG_SETTING_ZOOM_LVL_MIN :4x
-STR_CONFIG_SETTING_ZOOM_LVL_IN_2X :2x
-STR_CONFIG_SETTING_ZOOM_LVL_NORMAL :Normal
-STR_CONFIG_SETTING_ZOOM_LVL_OUT_2X :2x
-STR_CONFIG_SETTING_ZOOM_LVL_OUT_4X :4x
-STR_CONFIG_SETTING_ZOOM_LVL_OUT_8X :8x
-STR_CONFIG_SETTING_TOWN_GROWTH :Town growth speed: {STRING2}
-STR_CONFIG_SETTING_TOWN_GROWTH_HELPTEXT :Speed of town growth
-STR_CONFIG_SETTING_TOWN_GROWTH_NONE :None
-STR_CONFIG_SETTING_TOWN_GROWTH_SLOW :Slow
-STR_CONFIG_SETTING_TOWN_GROWTH_NORMAL :Normal
-STR_CONFIG_SETTING_TOWN_GROWTH_FAST :Fast
-STR_CONFIG_SETTING_TOWN_GROWTH_VERY_FAST :Very fast
-STR_CONFIG_SETTING_LARGER_TOWNS :Proportion of towns that will become cities: {STRING2}
-STR_CONFIG_SETTING_LARGER_TOWNS_HELPTEXT :Amount of towns which will become a city, thus a town which starts out larger and grows faster
-STR_CONFIG_SETTING_LARGER_TOWNS_VALUE :1 in {COMMA}
-STR_CONFIG_SETTING_LARGER_TOWNS_DISABLED :None
-STR_CONFIG_SETTING_CITY_SIZE_MULTIPLIER :Initial city size multiplier: {STRING2}
-STR_CONFIG_SETTING_CITY_SIZE_MULTIPLIER_HELPTEXT :Average size of cities relative to normal towns at start of the game
-STR_CONFIG_SETTING_MODIFIED_ROAD_REBUILD :Remove absurd road-elements during the road construction: {STRING2}
-STR_CONFIG_SETTING_MODIFIED_ROAD_REBUILD_HELPTEXT :Remove dead road ends during funded road reconstruction
-
-STR_CONFIG_SETTING_LINKGRAPH_INTERVAL :Update distribution graph every {STRING2} day{P 0:2 "" s}
-STR_CONFIG_SETTING_LINKGRAPH_INTERVAL_HELPTEXT :Time between subsequent recalculations of the link graph. Each recalculation calculates the plans for one component of the graph. That means that a value X for this setting does not mean the whole graph will be updated every X days. Only some component will. The shorter you set it the more CPU time will be necessary to calculate it. The longer you set it the longer it will take until the cargo distribution starts on new routes.
-STR_CONFIG_SETTING_LINKGRAPH_TIME :Take {STRING2} day{P 0:2 "" s} for recalculation of distribution graph
-STR_CONFIG_SETTING_LINKGRAPH_TIME_HELPTEXT :Time taken for each recalculation of a link graph component. When a recalculation is started, a thread is spawned which is allowed to run for this number of days. The shorter you set this the more likely it is that the thread is not finished when it's supposed to. Then the game stops until it is ("lag"). The longer you set it the longer it takes for the distribution to be updated when routes change.
-STR_CONFIG_SETTING_DISTRIBUTION_MANUAL :manual
-STR_CONFIG_SETTING_DISTRIBUTION_ASYMMETRIC :asymmetric
-STR_CONFIG_SETTING_DISTRIBUTION_SYMMETRIC :symmetric
-STR_CONFIG_SETTING_DISTRIBUTION_PAX :Distribution mode for passengers: {STRING2}
-STR_CONFIG_SETTING_DISTRIBUTION_PAX_HELPTEXT :"symmetric" means that roughly the same number of passengers will go from a station A to a station B as from B to A. "asymmetric" means that arbitrary numbers of passengers can go in either direction. "manual" means that no automatic distribution will take place for passengers.
-STR_CONFIG_SETTING_DISTRIBUTION_MAIL :Distribution mode for mail: {STRING2}
-STR_CONFIG_SETTING_DISTRIBUTION_MAIL_HELPTEXT :"symmetric" means that roughly the same amount of mail will be sent from a station A to a station B as from B to A. "asymmetric" means that arbitrary amounts of mail can be sent in either direction. "manual" means that no automatic distribution will take place for mail.
-STR_CONFIG_SETTING_DISTRIBUTION_ARMOURED :Distribution mode for the ARMOURED cargo class: {STRING2}
-STR_CONFIG_SETTING_DISTRIBUTION_ARMOURED_HELPTEXT :The ARMOURED cargo class contains valuables in the temperate, diamonds in the subtropical or gold in subarctic climate. NewGRFs may change that. "symmetric" means that roughly the same amount of that cargo will be sent from a station A to a station B as from B to A. "asymmetric" means that arbitrary of that cargo can be sent in either direction. "manual" means that no automatic distribution will take place for that cargo. It is recommended to set this to asymmetric or manual when playing subarctic, as banks won't send any gold back to gold mines. For temperate and subtropical you can also choose symmetric as banks will send valuables back to the origin bank of some load of valuables.
-STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT :Distribution mode for other cargo classes: {STRING2}
-STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT_HELPTEXT :"asymmetric" means that arbitrary amounts of cargo can be sent in either direction. "manual" means that no automatic distribution will take place for those cargoes.
-STR_CONFIG_SETTING_LINKGRAPH_ACCURACY :Distribution accuracy: {STRING2}
-STR_CONFIG_SETTING_LINKGRAPH_ACCURACY_HELPTEXT :The higher you set this the more CPU time the calculation of the link graph will take. If it takes too long you may notice lag. If you set it to a low value, however, the distribution will be inaccurate, and you may notice cargo not being sent to the places you expect it to go.
-STR_CONFIG_SETTING_DEMAND_DISTANCE :Effect of distance on demands: {STRING2}
-STR_CONFIG_SETTING_DEMAND_DISTANCE_HELPTEXT :If you set this to a value higher than 0, the distance between the origin station A of some cargo and a possible destination B will have an effect on the amount of cargo sent from A to B. The further away B is from A the less cargo will be sent. The higher you set it, the less cargo will be sent to far away stations and the more cargo will be sent to near stations.
-STR_CONFIG_SETTING_DEMAND_SIZE :Amount of returning cargo for symmetric mode: {STRING2}
-STR_CONFIG_SETTING_DEMAND_SIZE_HELPTEXT :Setting this to less than 100% makes the symmetric distribution behave more like the asymmetric one. Less cargo will be forcibly sent back if a certain amount is sent to a station. If you set it to 0% the symmetric distribution behaves just like the asymmetric one.
-STR_CONFIG_SETTING_SHORT_PATH_SATURATION :Saturation of short paths before using high-capacity paths: {STRING2}
-STR_CONFIG_SETTING_SHORT_PATH_SATURATION_HELPTEXT :Frequently there are multiple paths between two given stations. Cargodist will saturate the shortest path first, then use the second shortest path until that is saturated and so on. Saturation is determined by an estimation of capacity and planned usage. Once it has saturated all paths, if there is still demand left, it will overload all paths, prefering the ones with high capacity. Most of the time the algorithm will not estimate the capacity accurately, though. This setting allows you to specify up to which percentage a shorter path must be saturated in the first pass before choosing the next longer one. Set it to less than 100% to avoid overcrowded stations in case of overestimated capacity.
-
-STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY :Speed units: {STRING2}
-STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY_HELPTEXT :Whenever a speed is shown in the user interface, show it in the selected units
-STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY_IMPERIAL :Imperial (mph)
-STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY_METRIC :Metric (km/h)
-STR_CONFIG_SETTING_LOCALISATION_UNITS_VELOCITY_SI :SI (m/s)
-
-STR_CONFIG_SETTING_LOCALISATION_UNITS_POWER :Vehicle power units: {STRING2}
-STR_CONFIG_SETTING_LOCALISATION_UNITS_POWER_HELPTEXT :Whenever a vehicle's power is shown in the user interface, show it in the selected units
-STR_CONFIG_SETTING_LOCALISATION_UNITS_POWER_IMPERIAL :Imperial (hp)
-STR_CONFIG_SETTING_LOCALISATION_UNITS_POWER_METRIC :Metric (hp)
-STR_CONFIG_SETTING_LOCALISATION_UNITS_POWER_SI :SI (kW)
-
-STR_CONFIG_SETTING_LOCALISATION_UNITS_WEIGHT :Weights units: {STRING2}
-STR_CONFIG_SETTING_LOCALISATION_UNITS_WEIGHT_HELPTEXT :Whenever weights are shown in the user interface, show it in the selected units
-STR_CONFIG_SETTING_LOCALISATION_UNITS_WEIGHT_IMPERIAL :Imperial (short t/ton)
-STR_CONFIG_SETTING_LOCALISATION_UNITS_WEIGHT_METRIC :Metric (t/tonne)
-STR_CONFIG_SETTING_LOCALISATION_UNITS_WEIGHT_SI :SI (kg)
-
-STR_CONFIG_SETTING_LOCALISATION_UNITS_VOLUME :Volumes units: {STRING2}
-STR_CONFIG_SETTING_LOCALISATION_UNITS_VOLUME_HELPTEXT :Whenever volumes are shown in the user interface, show it in the selected units
-STR_CONFIG_SETTING_LOCALISATION_UNITS_VOLUME_IMPERIAL :Imperial (gal)
-STR_CONFIG_SETTING_LOCALISATION_UNITS_VOLUME_METRIC :Metric (l)
-STR_CONFIG_SETTING_LOCALISATION_UNITS_VOLUME_SI :SI (m³)
-
-STR_CONFIG_SETTING_LOCALISATION_UNITS_FORCE :Tractive effort units: {STRING2}
-STR_CONFIG_SETTING_LOCALISATION_UNITS_FORCE_HELPTEXT :Whenever tractive effort, also known as tractive force, is shown in the user interface, show it in the selected units
-STR_CONFIG_SETTING_LOCALISATION_UNITS_FORCE_IMPERIAL :Imperial (lbf)
-STR_CONFIG_SETTING_LOCALISATION_UNITS_FORCE_METRIC :Metric (kgf)
-STR_CONFIG_SETTING_LOCALISATION_UNITS_FORCE_SI :SI (kN)
-
-STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT :Heights units: {STRING2}
-STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT_HELPTEXT :Whenever heights are shown in the user interface, show it in the selected units
-STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT_IMPERIAL :Imperial (ft)
-STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT_METRIC :Metric (m)
-STR_CONFIG_SETTING_LOCALISATION_UNITS_HEIGHT_SI :SI (m)
-
-STR_CONFIG_SETTING_GUI :{ORANGE}Interface
-STR_CONFIG_SETTING_LOCALISATION :{ORANGE}Localisation
-STR_CONFIG_SETTING_CONSTRUCTION :{ORANGE}Construction
-STR_CONFIG_SETTING_VEHICLES :{ORANGE}Vehicles
-STR_CONFIG_SETTING_STATIONS :{ORANGE}Stations
-STR_CONFIG_SETTING_ECONOMY :{ORANGE}Economy
-STR_CONFIG_SETTING_LINKGRAPH :{ORANGE}Cargo Distribution
-STR_CONFIG_SETTING_AI :{ORANGE}Competitors
-STR_CONFIG_SETTING_DISPLAY_OPTIONS :{ORANGE}Display options
-STR_CONFIG_SETTING_INTERACTION :{ORANGE}Interaction
-STR_CONFIG_SETTING_SOUND :{ORANGE}Sound effects
-STR_CONFIG_SETTING_NEWS :{ORANGE}News and messages
-STR_CONFIG_SETTING_CONSTRUCTION_SIGNALS :{ORANGE}Signals
-STR_CONFIG_SETTING_STATIONS_CARGOHANDLING :{ORANGE}Cargo handling
-STR_CONFIG_SETTING_AI_NPC :{ORANGE}Computer players
-STR_CONFIG_SETTING_VEHICLES_AUTORENEW :{ORANGE}Autorenew
-STR_CONFIG_SETTING_VEHICLES_SERVICING :{ORANGE}Servicing
-STR_CONFIG_SETTING_VEHICLES_ROUTING :{ORANGE}Routing
-STR_CONFIG_SETTING_VEHICLES_TRAINS :{ORANGE}Trains
-STR_CONFIG_SETTING_ECONOMY_TOWNS :{ORANGE}Towns
-STR_CONFIG_SETTING_ECONOMY_INDUSTRIES :{ORANGE}Industries
-
-STR_CONFIG_SETTING_PATHFINDER_OPF :Original
-STR_CONFIG_SETTING_PATHFINDER_NPF :NPF
-STR_CONFIG_SETTING_PATHFINDER_YAPF_RECOMMENDED :YAPF {BLUE}(Recommended)
-
-STR_CONFIG_SETTING_PATHFINDER_FOR_TRAINS :Pathfinder for trains: {STRING2}
-STR_CONFIG_SETTING_PATHFINDER_FOR_TRAINS_HELPTEXT :Path finder to use for trains
-STR_CONFIG_SETTING_PATHFINDER_FOR_ROAD_VEHICLES :Pathfinder for road vehicles: {STRING2}
-STR_CONFIG_SETTING_PATHFINDER_FOR_ROAD_VEHICLES_HELPTEXT :Path finder to use for road vehicles
-STR_CONFIG_SETTING_PATHFINDER_FOR_SHIPS :Pathfinder for ships: {STRING2}
-STR_CONFIG_SETTING_PATHFINDER_FOR_SHIPS_HELPTEXT :Path finder to use for ships
-STR_CONFIG_SETTING_REVERSE_AT_SIGNALS :Automatic reversing at signals: {STRING2}
-STR_CONFIG_SETTING_REVERSE_AT_SIGNALS_HELPTEXT :Allow trains to reverse on a signal, if they waited there a long time
-
-STR_CONFIG_SETTING_QUERY_CAPTION :{WHITE}Change setting value
-
-# Config errors
-STR_CONFIG_ERROR :{WHITE}Error with the configuration file...
-STR_CONFIG_ERROR_ARRAY :{WHITE}... error in array '{RAW_STRING}'
-STR_CONFIG_ERROR_INVALID_VALUE :{WHITE}... invalid value '{RAW_STRING}' for '{RAW_STRING}'
-STR_CONFIG_ERROR_TRAILING_CHARACTERS :{WHITE}... trailing characters at end of setting '{RAW_STRING}'
-STR_CONFIG_ERROR_DUPLICATE_GRFID :{WHITE}... ignoring NewGRF '{RAW_STRING}': duplicate GRF ID with '{RAW_STRING}'
-STR_CONFIG_ERROR_INVALID_GRF :{WHITE}... ignoring invalid NewGRF '{RAW_STRING}': {STRING}
-STR_CONFIG_ERROR_INVALID_GRF_NOT_FOUND :not found
-STR_CONFIG_ERROR_INVALID_GRF_UNSAFE :unsafe for static use
-STR_CONFIG_ERROR_INVALID_GRF_SYSTEM :system NewGRF
-STR_CONFIG_ERROR_INVALID_GRF_INCOMPATIBLE :incompatible to this version of OpenTTD
-STR_CONFIG_ERROR_INVALID_GRF_UNKNOWN :unknown
-STR_CONFIG_ERROR_INVALID_SAVEGAME_COMPRESSION_LEVEL :{WHITE}... compression level '{RAW_STRING}' is not valid
-STR_CONFIG_ERROR_INVALID_SAVEGAME_COMPRESSION_ALGORITHM :{WHITE}... savegame format '{RAW_STRING}' is not available. Reverting to '{RAW_STRING}'
-STR_CONFIG_ERROR_INVALID_BASE_GRAPHICS_NOT_FOUND :{WHITE}... ignoring Base Graphics set '{RAW_STRING}': not found
-STR_CONFIG_ERROR_INVALID_BASE_SOUNDS_NOT_FOUND :{WHITE}... ignoring Base Sounds set '{RAW_STRING}': not found
-STR_CONFIG_ERROR_INVALID_BASE_MUSIC_NOT_FOUND :{WHITE}... ignoring Base Music set '{RAW_STRING}': not found
-STR_CONFIG_ERROR_OUT_OF_MEMORY :{WHITE}Out of memory
-STR_CONFIG_ERROR_SPRITECACHE_TOO_BIG :{WHITE}Allocating {BYTES} of spritecache failed. The spritecache was reduced to {BYTES}. This will reduce the performance of OpenTTD. To reduce memory requirements you can try to disable 32bpp graphics and/or zoom-in levels
-
-# Intro window
-STR_INTRO_CAPTION :{WHITE}OpenTTD {REV}
-
-STR_INTRO_NEW_GAME :{BLACK}New Game
-STR_INTRO_LOAD_GAME :{BLACK}Load Game
-STR_INTRO_PLAY_SCENARIO :{BLACK}Play Scenario
-STR_INTRO_PLAY_HEIGHTMAP :{BLACK}Play Heightmap
-STR_INTRO_SCENARIO_EDITOR :{BLACK}Scenario Editor
-STR_INTRO_MULTIPLAYER :{BLACK}Multiplayer
-
-STR_INTRO_GAME_OPTIONS :{BLACK}Game Options
-STR_INTRO_HIGHSCORE :{BLACK}Highscore Table
-STR_INTRO_ADVANCED_SETTINGS :{BLACK}Advanced Settings
-STR_INTRO_NEWGRF_SETTINGS :{BLACK}NewGRF Settings
-STR_INTRO_ONLINE_CONTENT :{BLACK}Check Online Content
-STR_INTRO_SCRIPT_SETTINGS :{BLACK}AI/Game Script Settings
-STR_INTRO_QUIT :{BLACK}Exit
-
-STR_INTRO_TOOLTIP_NEW_GAME :{BLACK}Start a new game. Ctrl+Click skips map configuration
-STR_INTRO_TOOLTIP_LOAD_GAME :{BLACK}Load a saved game
-STR_INTRO_TOOLTIP_PLAY_HEIGHTMAP :{BLACK}Start a new game, using a heightmap as landscape
-STR_INTRO_TOOLTIP_PLAY_SCENARIO :{BLACK}Start a new game, using a customised scenario
-STR_INTRO_TOOLTIP_SCENARIO_EDITOR :{BLACK}Create a customised game world/scenario
-STR_INTRO_TOOLTIP_MULTIPLAYER :{BLACK}Start a multiplayer game
-
-STR_INTRO_TOOLTIP_TEMPERATE :{BLACK}Select 'temperate' landscape style
-STR_INTRO_TOOLTIP_SUB_ARCTIC_LANDSCAPE :{BLACK}Select 'sub-arctic' landscape style
-STR_INTRO_TOOLTIP_SUB_TROPICAL_LANDSCAPE :{BLACK}Select 'sub-tropical' landscape style
-STR_INTRO_TOOLTIP_TOYLAND_LANDSCAPE :{BLACK}Select 'toyland' landscape style
-
-STR_INTRO_TOOLTIP_GAME_OPTIONS :{BLACK}Display game options
-STR_INTRO_TOOLTIP_HIGHSCORE :{BLACK}Display highscore table
-STR_INTRO_TOOLTIP_ADVANCED_SETTINGS :{BLACK}Display advanced settings
-STR_INTRO_TOOLTIP_NEWGRF_SETTINGS :{BLACK}Display NewGRF settings
-STR_INTRO_TOOLTIP_ONLINE_CONTENT :{BLACK}Check for new and updated content to download
-STR_INTRO_TOOLTIP_SCRIPT_SETTINGS :{BLACK}Display AI/Game script settings
-STR_INTRO_TOOLTIP_QUIT :{BLACK}Exit 'OpenTTD'
-
-STR_INTRO_TRANSLATION :{BLACK}This translation misses {NUM} string{P "" s}. Please help make OpenTTD better by signing up as translator. See readme.txt for details.
-
-# Quit window
-STR_QUIT_CAPTION :{WHITE}Exit
-STR_QUIT_ARE_YOU_SURE_YOU_WANT_TO_EXIT_OPENTTD :{YELLOW}Are you sure you want to exit OpenTTD and return to {STRING}?
-STR_QUIT_YES :{BLACK}Yes
-STR_QUIT_NO :{BLACK}No
-
-# Supported OSes
-STR_OSNAME_WINDOWS :Windows
-STR_OSNAME_DOS :DOS
-STR_OSNAME_UNIX :Unix
-STR_OSNAME_OSX :OS{NBSP}X
-STR_OSNAME_BEOS :BeOS
-STR_OSNAME_HAIKU :Haiku
-STR_OSNAME_MORPHOS :MorphOS
-STR_OSNAME_AMIGAOS :AmigaOS
-STR_OSNAME_OS2 :OS/2
-STR_OSNAME_SUNOS :SunOS
-
-# Abandon game
-STR_ABANDON_GAME_CAPTION :{WHITE}Abandon Game
-STR_ABANDON_GAME_QUERY :{YELLOW}Are you sure you want to abandon this game?
-STR_ABANDON_SCENARIO_QUERY :{YELLOW}Are you sure you want to abandon this scenario?
-
-# Cheat window
-STR_CHEATS :{WHITE}Cheats
-STR_CHEATS_TOOLTIP :{BLACK}Checkboxes indicate if you have used this cheat before
-STR_CHEATS_WARNING :{BLACK}Warning! You are about to betray your fellow competitors. Keep in mind that such a disgrace will be remembered for eternity
-STR_CHEAT_MONEY :{LTBLUE}Increase money by {CURRENCY_LONG}
-STR_CHEAT_CHANGE_COMPANY :{LTBLUE}Playing as company: {ORANGE}{COMMA}
-STR_CHEAT_EXTRA_DYNAMITE :{LTBLUE}Magic bulldozer (remove industries, unmovable objects): {ORANGE}{STRING1}
-STR_CHEAT_CROSSINGTUNNELS :{LTBLUE}Tunnels may cross each other: {ORANGE}{STRING1}
-STR_CHEAT_NO_JETCRASH :{LTBLUE}Jetplanes will not crash (frequently) on small airports: {ORANGE}{STRING}
-STR_CHEAT_SWITCH_CLIMATE_TEMPERATE_LANDSCAPE :Temperate landscape
-STR_CHEAT_SWITCH_CLIMATE_SUB_ARCTIC_LANDSCAPE :Sub-arctic landscape
-STR_CHEAT_SWITCH_CLIMATE_SUB_TROPICAL_LANDSCAPE :Sub-tropical landscape
-STR_CHEAT_SWITCH_CLIMATE_TOYLAND_LANDSCAPE :Toyland landscape
-STR_CHEAT_CHANGE_DATE :{LTBLUE}Change date: {ORANGE}{DATE_SHORT}
-STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Change current year
-STR_CHEAT_SETUP_PROD :{LTBLUE}Enable modifying production values: {ORANGE}{STRING1}
-
-# Livery window
-STR_LIVERY_CAPTION :{WHITE}New Colour Scheme
-
-STR_LIVERY_GENERAL_TOOLTIP :{BLACK}Show general colour schemes
-STR_LIVERY_TRAIN_TOOLTIP :{BLACK}Show train colour schemes
-STR_LIVERY_ROAD_VEHICLE_TOOLTIP :{BLACK}Show road vehicle colour schemes
-STR_LIVERY_SHIP_TOOLTIP :{BLACK}Show ship colour schemes
-STR_LIVERY_AIRCRAFT_TOOLTIP :{BLACK}Show aircraft colour schemes
-STR_LIVERY_PRIMARY_TOOLTIP :{BLACK}Choose the primary colour for the selected scheme. Ctrl+Click will set this colour for every scheme
-STR_LIVERY_SECONDARY_TOOLTIP :{BLACK}Choose the secondary colour for the selected scheme. Ctrl+Click will set this colour for every scheme
-STR_LIVERY_PANEL_TOOLTIP :{BLACK}Select a colour scheme to change, or multiple schemes with Ctrl+Click. Click on the box to toggle use of the scheme
-
-STR_LIVERY_DEFAULT :Standard Livery
-STR_LIVERY_STEAM :Steam Engine
-STR_LIVERY_DIESEL :Diesel Engine
-STR_LIVERY_ELECTRIC :Electric Engine
-STR_LIVERY_MONORAIL :Monorail Engine
-STR_LIVERY_MAGLEV :Maglev Engine
-STR_LIVERY_DMU :DMU
-STR_LIVERY_EMU :EMU
-STR_LIVERY_PASSENGER_WAGON_STEAM :Passenger Coach (Steam)
-STR_LIVERY_PASSENGER_WAGON_DIESEL :Passenger Coach (Diesel)
-STR_LIVERY_PASSENGER_WAGON_ELECTRIC :Passenger Coach (Electric)
-STR_LIVERY_PASSENGER_WAGON_MONORAIL :Passenger Coach (Monorail)
-STR_LIVERY_PASSENGER_WAGON_MAGLEV :Passenger Coach (Maglev)
-STR_LIVERY_FREIGHT_WAGON :Freight Wagon
-STR_LIVERY_BUS :Bus
-STR_LIVERY_TRUCK :Lorry
-STR_LIVERY_PASSENGER_SHIP :Passenger Ferry
-STR_LIVERY_FREIGHT_SHIP :Freight Ship
-STR_LIVERY_HELICOPTER :Helicopter
-STR_LIVERY_SMALL_PLANE :Small Aeroplane
-STR_LIVERY_LARGE_PLANE :Large Aeroplane
-STR_LIVERY_PASSENGER_TRAM :Passenger Tram
-STR_LIVERY_FREIGHT_TRAM :Freight Tram
-
-# Face selection window
-STR_FACE_CAPTION :{WHITE}Face Selection
-STR_FACE_CANCEL_TOOLTIP :{BLACK}Cancel new face selection
-STR_FACE_OK_TOOLTIP :{BLACK}Accept new face selection
-
-STR_FACE_MALE_BUTTON :{BLACK}Male
-STR_FACE_MALE_TOOLTIP :{BLACK}Select male faces
-STR_FACE_FEMALE_BUTTON :{BLACK}Female
-STR_FACE_FEMALE_TOOLTIP :{BLACK}Select female faces
-STR_FACE_NEW_FACE_BUTTON :{BLACK}New Face
-STR_FACE_NEW_FACE_TOOLTIP :{BLACK}Generate random new face
-STR_FACE_ADVANCED :{BLACK}Advanced
-STR_FACE_ADVANCED_TOOLTIP :{BLACK}Advanced face selection
-STR_FACE_SIMPLE :{BLACK}Simple
-STR_FACE_SIMPLE_TOOLTIP :{BLACK}Simple face selection
-STR_FACE_LOAD :{BLACK}Load
-STR_FACE_LOAD_TOOLTIP :{BLACK}Load favourite face
-STR_FACE_LOAD_DONE :{WHITE}Your favourite face has been loaded from the OpenTTD configuration file
-STR_FACE_FACECODE :{BLACK}Player face no.
-STR_FACE_FACECODE_TOOLTIP :{BLACK}View and/or set face number of the company president
-STR_FACE_FACECODE_CAPTION :{WHITE}View and/or set president face number
-STR_FACE_FACECODE_SET :{WHITE}New face number code has been set
-STR_FACE_FACECODE_ERR :{WHITE}Couldn't set president face number - must be a number between 0 and 4,294,967,295!
-STR_FACE_SAVE :{BLACK}Save
-STR_FACE_SAVE_TOOLTIP :{BLACK}Save favourite face
-STR_FACE_SAVE_DONE :{WHITE}This face will be saved as your favourite in the OpenTTD configuration file
-STR_FACE_EUROPEAN :{BLACK}European
-STR_FACE_SELECT_EUROPEAN :{BLACK}Select European faces
-STR_FACE_AFRICAN :{BLACK}African
-STR_FACE_SELECT_AFRICAN :{BLACK}Select African faces
-STR_FACE_YES :Yes
-STR_FACE_NO :No
-STR_FACE_MOUSTACHE_EARRING_TOOLTIP :{BLACK}Enable moustache or earring
-STR_FACE_HAIR :Hair:
-STR_FACE_HAIR_TOOLTIP :{BLACK}Change hair
-STR_FACE_EYEBROWS :Eyebrows:
-STR_FACE_EYEBROWS_TOOLTIP :{BLACK}Change eyebrows
-STR_FACE_EYECOLOUR :Eye colour:
-STR_FACE_EYECOLOUR_TOOLTIP :{BLACK}Change eye colour
-STR_FACE_GLASSES :Glasses:
-STR_FACE_GLASSES_TOOLTIP :{BLACK}Enable glasses
-STR_FACE_GLASSES_TOOLTIP_2 :{BLACK}Change glasses
-STR_FACE_NOSE :Nose:
-STR_FACE_NOSE_TOOLTIP :{BLACK}Change nose
-STR_FACE_LIPS :Lips:
-STR_FACE_MOUSTACHE :Moustache:
-STR_FACE_LIPS_MOUSTACHE_TOOLTIP :{BLACK}Change lips or moustache
-STR_FACE_CHIN :Chin:
-STR_FACE_CHIN_TOOLTIP :{BLACK}Change chin
-STR_FACE_JACKET :Jacket:
-STR_FACE_JACKET_TOOLTIP :{BLACK}Change jacket
-STR_FACE_COLLAR :Collar:
-STR_FACE_COLLAR_TOOLTIP :{BLACK}Change collar
-STR_FACE_TIE :Tie:
-STR_FACE_EARRING :Earring:
-STR_FACE_TIE_EARRING_TOOLTIP :{BLACK}Change tie or earring
-
-# Network server list
-STR_NETWORK_SERVER_LIST_CAPTION :{WHITE}Multiplayer
-STR_NETWORK_SERVER_LIST_ADVERTISED :{BLACK}Advertised
-STR_NETWORK_SERVER_LIST_ADVERTISED_TOOLTIP :{BLACK}Choose between an advertised (internet) and a not advertised (Local Area Network, LAN) game
-STR_NETWORK_SERVER_LIST_ADVERTISED_NO :No
-STR_NETWORK_SERVER_LIST_ADVERTISED_YES :Yes
-STR_NETWORK_SERVER_LIST_PLAYER_NAME :{BLACK}Player name:
-STR_NETWORK_SERVER_LIST_ENTER_NAME_TOOLTIP :{BLACK}This is the name other players will identify you by
-
-STR_NETWORK_SERVER_LIST_GAME_NAME :{BLACK}Name
-STR_NETWORK_SERVER_LIST_GAME_NAME_TOOLTIP :{BLACK}Name of the game
-STR_NETWORK_SERVER_LIST_GENERAL_ONLINE :{BLACK}{COMMA}/{COMMA} - {COMMA}/{COMMA}
-STR_NETWORK_SERVER_LIST_CLIENTS_CAPTION :{BLACK}Clients
-STR_NETWORK_SERVER_LIST_CLIENTS_CAPTION_TOOLTIP :{BLACK}Clients online / clients max{}Companies online / companies max
-STR_NETWORK_SERVER_LIST_MAP_SIZE_SHORT :{BLACK}{COMMA}x{COMMA}
-STR_NETWORK_SERVER_LIST_MAP_SIZE_CAPTION :{BLACK}Map size
-STR_NETWORK_SERVER_LIST_MAP_SIZE_CAPTION_TOOLTIP :{BLACK}Map size of the game{}Click to sort by area
-STR_NETWORK_SERVER_LIST_DATE_CAPTION :{BLACK}Date
-STR_NETWORK_SERVER_LIST_DATE_CAPTION_TOOLTIP :{BLACK}Current date
-STR_NETWORK_SERVER_LIST_YEARS_CAPTION :{BLACK}Years
-STR_NETWORK_SERVER_LIST_YEARS_CAPTION_TOOLTIP :{BLACK}Number of years{}the game is running
-STR_NETWORK_SERVER_LIST_INFO_ICONS_TOOLTIP :{BLACK}Language, server version, etc.
-
-STR_NETWORK_SERVER_LIST_CLICK_GAME_TO_SELECT :{BLACK}Click a game from the list to select it
-STR_NETWORK_SERVER_LIST_LAST_JOINED_SERVER :{BLACK}The server you joined last time:
-STR_NETWORK_SERVER_LIST_CLICK_TO_SELECT_LAST :{BLACK}Click to select the server you played last time
-
-STR_NETWORK_SERVER_LIST_GAME_INFO :{SILVER}GAME INFO
-STR_NETWORK_SERVER_LIST_CLIENTS :{SILVER}Clients: {WHITE}{COMMA} / {COMMA} - {COMMA} / {COMMA}
-STR_NETWORK_SERVER_LIST_LANGUAGE :{SILVER}Language: {WHITE}{STRING}
-STR_NETWORK_SERVER_LIST_LANDSCAPE :{SILVER}Landscape: {WHITE}{STRING}
-STR_NETWORK_SERVER_LIST_MAP_SIZE :{SILVER}Map size: {WHITE}{COMMA}x{COMMA}
-STR_NETWORK_SERVER_LIST_SERVER_VERSION :{SILVER}Server version: {WHITE}{RAW_STRING}
-STR_NETWORK_SERVER_LIST_SERVER_ADDRESS :{SILVER}Server address: {WHITE}{RAW_STRING}
-STR_NETWORK_SERVER_LIST_START_DATE :{SILVER}Start date: {WHITE}{DATE_SHORT}
-STR_NETWORK_SERVER_LIST_CURRENT_DATE :{SILVER}Current date: {WHITE}{DATE_SHORT}
-STR_NETWORK_SERVER_LIST_PASSWORD :{SILVER}Password protected!
-STR_NETWORK_SERVER_LIST_SERVER_OFFLINE :{SILVER}SERVER OFFLINE
-STR_NETWORK_SERVER_LIST_SERVER_FULL :{SILVER}SERVER FULL
-STR_NETWORK_SERVER_LIST_VERSION_MISMATCH :{SILVER}VERSION MISMATCH
-STR_NETWORK_SERVER_LIST_GRF_MISMATCH :{SILVER}NEWGRF MISMATCH
-
-STR_NETWORK_SERVER_LIST_JOIN_GAME :{BLACK}Join game
-STR_NETWORK_SERVER_LIST_REFRESH :{BLACK}Refresh server
-STR_NETWORK_SERVER_LIST_REFRESH_TOOLTIP :{BLACK}Refresh the server info
-
-STR_NETWORK_SERVER_LIST_FIND_SERVER :{BLACK}Find server
-STR_NETWORK_SERVER_LIST_FIND_SERVER_TOOLTIP :{BLACK}Search network for a server
-STR_NETWORK_SERVER_LIST_ADD_SERVER :{BLACK}Add server
-STR_NETWORK_SERVER_LIST_ADD_SERVER_TOOLTIP :{BLACK}Adds a server to the list which will always be checked for running games
-STR_NETWORK_SERVER_LIST_START_SERVER :{BLACK}Start server
-STR_NETWORK_SERVER_LIST_START_SERVER_TOOLTIP :{BLACK}Start your own server
-
-STR_NETWORK_SERVER_LIST_PLAYER_NAME_OSKTITLE :{BLACK}Enter your name
-STR_NETWORK_SERVER_LIST_ENTER_IP :{BLACK}Enter the address of the host
-
-# Start new multiplayer server
-STR_NETWORK_START_SERVER_CAPTION :{WHITE}Start new multiplayer game
-
-STR_NETWORK_START_SERVER_NEW_GAME_NAME :{BLACK}Game name:
-STR_NETWORK_START_SERVER_NEW_GAME_NAME_TOOLTIP :{BLACK}The game name will be displayed to other players in the multiplayer game selection menu
-STR_NETWORK_START_SERVER_SET_PASSWORD :{BLACK}Set password
-STR_NETWORK_START_SERVER_PASSWORD_TOOLTIP :{BLACK}Protect your game with a password if you don't want it to be publicly accessible
-
-STR_NETWORK_START_SERVER_UNADVERTISED :No
-STR_NETWORK_START_SERVER_ADVERTISED :Yes
-STR_NETWORK_START_SERVER_CLIENTS_SELECT :{BLACK}{NUM} client{P "" s}
-STR_NETWORK_START_SERVER_NUMBER_OF_CLIENTS :{BLACK}Max clients:
-STR_NETWORK_START_SERVER_NUMBER_OF_CLIENTS_TOOLTIP :{BLACK}Choose the maximum number of clients. Not all slots need to be filled
-STR_NETWORK_START_SERVER_COMPANIES_SELECT :{BLACK}{NUM} compan{P y ies}
-STR_NETWORK_START_SERVER_NUMBER_OF_COMPANIES :{BLACK}Max companies:
-STR_NETWORK_START_SERVER_NUMBER_OF_COMPANIES_TOOLTIP :{BLACK}Limit the server to a certain amount of companies
-STR_NETWORK_START_SERVER_SPECTATORS_SELECT :{BLACK}{NUM} spectator{P "" s}
-STR_NETWORK_START_SERVER_NUMBER_OF_SPECTATORS :{BLACK}Max spectators:
-STR_NETWORK_START_SERVER_NUMBER_OF_SPECTATORS_TOOLTIP :{BLACK}Limit the server to a certain amount of spectators
-STR_NETWORK_START_SERVER_LANGUAGE_SPOKEN :{BLACK}Language spoken:
-STR_NETWORK_START_SERVER_LANGUAGE_TOOLTIP :{BLACK}Other players will know which language is spoken on the server
-
-STR_NETWORK_START_SERVER_NEW_GAME_NAME_OSKTITLE :{BLACK}Enter a name for the network game
-
-# Network game languages
-############ Leave those lines in this order!!
-STR_NETWORK_LANG_ANY :Any
-STR_NETWORK_LANG_ENGLISH :English
-STR_NETWORK_LANG_GERMAN :German
-STR_NETWORK_LANG_FRENCH :French
-STR_NETWORK_LANG_BRAZILIAN :Brazilian
-STR_NETWORK_LANG_BULGARIAN :Bulgarian
-STR_NETWORK_LANG_CHINESE :Chinese
-STR_NETWORK_LANG_CZECH :Czech
-STR_NETWORK_LANG_DANISH :Danish
-STR_NETWORK_LANG_DUTCH :Dutch
-STR_NETWORK_LANG_ESPERANTO :Esperanto
-STR_NETWORK_LANG_FINNISH :Finnish
-STR_NETWORK_LANG_HUNGARIAN :Hungarian
-STR_NETWORK_LANG_ICELANDIC :Icelandic
-STR_NETWORK_LANG_ITALIAN :Italian
-STR_NETWORK_LANG_JAPANESE :Japanese
-STR_NETWORK_LANG_KOREAN :Korean
-STR_NETWORK_LANG_LITHUANIAN :Lithuanian
-STR_NETWORK_LANG_NORWEGIAN :Norwegian
-STR_NETWORK_LANG_POLISH :Polish
-STR_NETWORK_LANG_PORTUGUESE :Portuguese
-STR_NETWORK_LANG_ROMANIAN :Romanian
-STR_NETWORK_LANG_RUSSIAN :Russian
-STR_NETWORK_LANG_SLOVAK :Slovak
-STR_NETWORK_LANG_SLOVENIAN :Slovenian
-STR_NETWORK_LANG_SPANISH :Spanish
-STR_NETWORK_LANG_SWEDISH :Swedish
-STR_NETWORK_LANG_TURKISH :Turkish
-STR_NETWORK_LANG_UKRAINIAN :Ukrainian
-STR_NETWORK_LANG_AFRIKAANS :Afrikaans
-STR_NETWORK_LANG_CROATIAN :Croatian
-STR_NETWORK_LANG_CATALAN :Catalan
-STR_NETWORK_LANG_ESTONIAN :Estonian
-STR_NETWORK_LANG_GALICIAN :Galician
-STR_NETWORK_LANG_GREEK :Greek
-STR_NETWORK_LANG_LATVIAN :Latvian
-############ End of leave-in-this-order
-
-# Network game lobby
-STR_NETWORK_GAME_LOBBY_CAPTION :{WHITE}Multiplayer game lobby
-
-STR_NETWORK_GAME_LOBBY_PREPARE_TO_JOIN :{BLACK}Preparing to join: {ORANGE}{RAW_STRING}
-STR_NETWORK_GAME_LOBBY_COMPANY_LIST_TOOLTIP :{BLACK}A list of all companies currently in this game. You can either join one or start a new one if there is a free company slot
-
-STR_NETWORK_GAME_LOBBY_COMPANY_INFO :{SILVER}COMPANY INFO
-STR_NETWORK_GAME_LOBBY_COMPANY_NAME :{SILVER}Company name: {WHITE}{RAW_STRING}
-STR_NETWORK_GAME_LOBBY_INAUGURATION_YEAR :{SILVER}Inauguration: {WHITE}{NUM}
-STR_NETWORK_GAME_LOBBY_VALUE :{SILVER}Company value: {WHITE}{CURRENCY_LONG}
-STR_NETWORK_GAME_LOBBY_CURRENT_BALANCE :{SILVER}Current balance: {WHITE}{CURRENCY_LONG}
-STR_NETWORK_GAME_LOBBY_LAST_YEARS_INCOME :{SILVER}Last year's income: {WHITE}{CURRENCY_LONG}
-STR_NETWORK_GAME_LOBBY_PERFORMANCE :{SILVER}Performance: {WHITE}{NUM}
-
-STR_NETWORK_GAME_LOBBY_VEHICLES :{SILVER}Vehicles: {WHITE}{NUM} {TRAIN}, {NUM} {LORRY}, {NUM} {BUS}, {NUM} {SHIP}, {NUM} {PLANE}
-STR_NETWORK_GAME_LOBBY_STATIONS :{SILVER}Stations: {WHITE}{NUM} {TRAIN}, {NUM} {LORRY}, {NUM} {BUS}, {NUM} {SHIP}, {NUM} {PLANE}
-STR_NETWORK_GAME_LOBBY_PLAYERS :{SILVER}Players: {WHITE}{RAW_STRING}
-
-STR_NETWORK_GAME_LOBBY_NEW_COMPANY :{BLACK}New company
-STR_NETWORK_GAME_LOBBY_NEW_COMPANY_TOOLTIP :{BLACK}Create a new company
-STR_NETWORK_GAME_LOBBY_SPECTATE_GAME :{BLACK}Spectate game
-STR_NETWORK_GAME_LOBBY_SPECTATE_GAME_TOOLTIP :{BLACK}Watch the game as a spectator
-STR_NETWORK_GAME_LOBBY_JOIN_COMPANY :{BLACK}Join company
-STR_NETWORK_GAME_LOBBY_JOIN_COMPANY_TOOLTIP :{BLACK}Help manage this company
-
-# Network connecting window
-STR_NETWORK_CONNECTING_CAPTION :{WHITE}Connecting...
-
-############ Leave those lines in this order!!
-STR_NETWORK_CONNECTING_1 :{BLACK}(1/6) Connecting...
-STR_NETWORK_CONNECTING_2 :{BLACK}(2/6) Authorising...
-STR_NETWORK_CONNECTING_3 :{BLACK}(3/6) Waiting...
-STR_NETWORK_CONNECTING_4 :{BLACK}(4/6) Downloading map...
-STR_NETWORK_CONNECTING_5 :{BLACK}(5/6) Processing data...
-STR_NETWORK_CONNECTING_6 :{BLACK}(6/6) Registering...
-
-STR_NETWORK_CONNECTING_SPECIAL_1 :{BLACK}Fetching game info...
-STR_NETWORK_CONNECTING_SPECIAL_2 :{BLACK}Fetching company info...
-############ End of leave-in-this-order
-STR_NETWORK_CONNECTING_WAITING :{BLACK}{NUM} client{P "" s} in front of you
-STR_NETWORK_CONNECTING_DOWNLOADING_1 :{BLACK}{BYTES} downloaded so far
-STR_NETWORK_CONNECTING_DOWNLOADING_2 :{BLACK}{BYTES} / {BYTES} downloaded so far
-
-STR_NETWORK_CONNECTION_DISCONNECT :{BLACK}Disconnect
-
-STR_NETWORK_NEED_GAME_PASSWORD_CAPTION :{WHITE}Server is protected. Enter password
-STR_NETWORK_NEED_COMPANY_PASSWORD_CAPTION :{WHITE}Company is protected. Enter password
-
-# Network company list added strings
-STR_NETWORK_COMPANY_LIST_CLIENT_LIST :{WHITE}Client list
-STR_NETWORK_COMPANY_LIST_SPECTATE :{WHITE}Spectate
-STR_NETWORK_COMPANY_LIST_NEW_COMPANY :{WHITE}New company
-
-# Network client list
-STR_NETWORK_CLIENTLIST_KICK :Kick
-STR_NETWORK_CLIENTLIST_BAN :Ban
-STR_NETWORK_CLIENTLIST_GIVE_MONEY :Give money
-STR_NETWORK_CLIENTLIST_SPEAK_TO_ALL :Speak to all
-STR_NETWORK_CLIENTLIST_SPEAK_TO_COMPANY :Speak to company
-STR_NETWORK_CLIENTLIST_SPEAK_TO_CLIENT :Private message
-
-STR_NETWORK_SERVER :Server
-STR_NETWORK_CLIENT :Client
-STR_NETWORK_SPECTATORS :Spectators
-
-STR_NETWORK_GIVE_MONEY_CAPTION :{WHITE}Enter the amount of money you want to give
-STR_NETWORK_TOOLBAR_LIST_SPECTATOR :{BLACK}Spectator
-
-# Network set password
-STR_COMPANY_PASSWORD_CANCEL :{BLACK}Do not save the entered password
-STR_COMPANY_PASSWORD_OK :{BLACK}Give the company the new password
-STR_COMPANY_PASSWORD_CAPTION :{WHITE}Company password
-STR_COMPANY_PASSWORD_MAKE_DEFAULT :{BLACK}Default company password
-STR_COMPANY_PASSWORD_MAKE_DEFAULT_TOOLTIP :{BLACK}Use this company password as default for new companies
-
-# Network company info join/password
-STR_COMPANY_VIEW_JOIN :{BLACK}Join
-STR_COMPANY_VIEW_JOIN_TOOLTIP :{BLACK}Join and play as this company
-STR_COMPANY_VIEW_PASSWORD :{BLACK}Password
-STR_COMPANY_VIEW_PASSWORD_TOOLTIP :{BLACK}Password-protect your company to prevent unauthorised users from joining
-STR_COMPANY_VIEW_SET_PASSWORD :{BLACK}Set company password
-
-# Network chat
-STR_NETWORK_CHAT_SEND :{BLACK}Send
-STR_NETWORK_CHAT_COMPANY_CAPTION :[Team] :
-STR_NETWORK_CHAT_CLIENT_CAPTION :[Private] {RAW_STRING}:
-STR_NETWORK_CHAT_ALL_CAPTION :[All] :
-
-STR_NETWORK_CHAT_COMPANY :[Team] {RAW_STRING}: {WHITE}{RAW_STRING}
-STR_NETWORK_CHAT_TO_COMPANY :[Team] To {RAW_STRING}: {WHITE}{RAW_STRING}
-STR_NETWORK_CHAT_CLIENT :[Private] {RAW_STRING}: {WHITE}{RAW_STRING}
-STR_NETWORK_CHAT_TO_CLIENT :[Private] To {RAW_STRING}: {WHITE}{RAW_STRING}
-STR_NETWORK_CHAT_ALL :[All] {RAW_STRING}: {WHITE}{RAW_STRING}
-STR_NETWORK_CHAT_OSKTITLE :{BLACK}Enter text for network chat
-
-# Network messages
-STR_NETWORK_ERROR_NOTAVAILABLE :{WHITE}No network devices found or compiled without ENABLE_NETWORK
-STR_NETWORK_ERROR_NOSERVER :{WHITE}Could not find any network games
-STR_NETWORK_ERROR_NOCONNECTION :{WHITE}The server didn't answer the request
-STR_NETWORK_ERROR_NEWGRF_MISMATCH :{WHITE}Could not connect due to NewGRF mismatch
-STR_NETWORK_ERROR_DESYNC :{WHITE}Network-Game synchronisation failed
-STR_NETWORK_ERROR_LOSTCONNECTION :{WHITE}Network-Game connection lost
-STR_NETWORK_ERROR_SAVEGAMEERROR :{WHITE}Could not load savegame
-STR_NETWORK_ERROR_SERVER_START :{WHITE}Could not start the server
-STR_NETWORK_ERROR_CLIENT_START :{WHITE}Could not connect
-STR_NETWORK_ERROR_TIMEOUT :{WHITE}Connection #{NUM} timed out
-STR_NETWORK_ERROR_SERVER_ERROR :{WHITE}A protocol error was detected and the connection was closed
-STR_NETWORK_ERROR_WRONG_REVISION :{WHITE}The revision of this client does not match the server's revision
-STR_NETWORK_ERROR_WRONG_PASSWORD :{WHITE}Wrong password
-STR_NETWORK_ERROR_SERVER_FULL :{WHITE}The server is full
-STR_NETWORK_ERROR_SERVER_BANNED :{WHITE}You are banned from this server
-STR_NETWORK_ERROR_KICKED :{WHITE}You were kicked out of the game
-STR_NETWORK_ERROR_CHEATER :{WHITE}Cheating is not allowed on this server
-STR_NETWORK_ERROR_TOO_MANY_COMMANDS :{WHITE}You were sending too many commands to the server
-STR_NETWORK_ERROR_TIMEOUT_PASSWORD :{WHITE}You took too long to enter the password
-STR_NETWORK_ERROR_TIMEOUT_COMPUTER :{WHITE}Your computer is too slow to keep up with the server
-STR_NETWORK_ERROR_TIMEOUT_MAP :{WHITE}Your computer took too long to download the map
-STR_NETWORK_ERROR_TIMEOUT_JOIN :{WHITE}Your computer took too long to join the server
-
-############ Leave those lines in this order!!
-STR_NETWORK_ERROR_CLIENT_GENERAL :general error
-STR_NETWORK_ERROR_CLIENT_DESYNC :desync error
-STR_NETWORK_ERROR_CLIENT_SAVEGAME :could not load map
-STR_NETWORK_ERROR_CLIENT_CONNECTION_LOST :connection lost
-STR_NETWORK_ERROR_CLIENT_PROTOCOL_ERROR :protocol error
-STR_NETWORK_ERROR_CLIENT_NEWGRF_MISMATCH :NewGRF mismatch
-STR_NETWORK_ERROR_CLIENT_NOT_AUTHORIZED :not authorized
-STR_NETWORK_ERROR_CLIENT_NOT_EXPECTED :received invalid or unexpected packet
-STR_NETWORK_ERROR_CLIENT_WRONG_REVISION :wrong revision
-STR_NETWORK_ERROR_CLIENT_NAME_IN_USE :name already in use
-STR_NETWORK_ERROR_CLIENT_WRONG_PASSWORD :wrong password
-STR_NETWORK_ERROR_CLIENT_COMPANY_MISMATCH :wrong company in DoCommand
-STR_NETWORK_ERROR_CLIENT_KICKED :kicked by server
-STR_NETWORK_ERROR_CLIENT_CHEATER :was trying to use a cheat
-STR_NETWORK_ERROR_CLIENT_SERVER_FULL :server full
-STR_NETWORK_ERROR_CLIENT_TOO_MANY_COMMANDS :was sending too many commands
-STR_NETWORK_ERROR_CLIENT_TIMEOUT_PASSWORD :received no password in time
-STR_NETWORK_ERROR_CLIENT_TIMEOUT_COMPUTER :general timeout
-STR_NETWORK_ERROR_CLIENT_TIMEOUT_MAP :downloading map took too long
-STR_NETWORK_ERROR_CLIENT_TIMEOUT_JOIN :processing map took too long
-############ End of leave-in-this-order
-
-STR_NETWORK_ERROR_CLIENT_GUI_LOST_CONNECTION_CAPTION :{WHITE}Possible connection loss
-STR_NETWORK_ERROR_CLIENT_GUI_LOST_CONNECTION :{WHITE}The last {NUM} second{P "" s} no data has arrived from the server
-
-# Network related errors
-STR_NETWORK_SERVER_MESSAGE :*** {1:RAW_STRING}
-############ Leave those lines in this order!!
-STR_NETWORK_SERVER_MESSAGE_GAME_PAUSED :Game paused ({STRING})
-STR_NETWORK_SERVER_MESSAGE_GAME_STILL_PAUSED_1 :Game still paused ({STRING})
-STR_NETWORK_SERVER_MESSAGE_GAME_STILL_PAUSED_2 :Game still paused ({STRING}, {STRING})
-STR_NETWORK_SERVER_MESSAGE_GAME_STILL_PAUSED_3 :Game still paused ({STRING}, {STRING}, {STRING})
-STR_NETWORK_SERVER_MESSAGE_GAME_STILL_PAUSED_4 :Game still paused ({STRING}, {STRING}, {STRING}, {STRING})
-STR_NETWORK_SERVER_MESSAGE_GAME_UNPAUSED :Game unpaused ({STRING})
-STR_NETWORK_SERVER_MESSAGE_GAME_REASON_NOT_ENOUGH_PLAYERS :number of players
-STR_NETWORK_SERVER_MESSAGE_GAME_REASON_CONNECTING_CLIENTS :connecting clients
-STR_NETWORK_SERVER_MESSAGE_GAME_REASON_MANUAL :manual
-STR_NETWORK_SERVER_MESSAGE_GAME_REASON_GAME_SCRIPT :game script
-############ End of leave-in-this-order
-STR_NETWORK_MESSAGE_CLIENT_LEAVING :leaving
-STR_NETWORK_MESSAGE_CLIENT_JOINED :*** {RAW_STRING} has joined the game
-STR_NETWORK_MESSAGE_CLIENT_JOINED_ID :*** {RAW_STRING} has joined the game (Client #{2:NUM})
-STR_NETWORK_MESSAGE_CLIENT_COMPANY_JOIN :*** {RAW_STRING} has joined company #{2:NUM}
-STR_NETWORK_MESSAGE_CLIENT_COMPANY_SPECTATE :*** {RAW_STRING} has joined spectators
-STR_NETWORK_MESSAGE_CLIENT_COMPANY_NEW :*** {RAW_STRING} has started a new company (#{2:NUM})
-STR_NETWORK_MESSAGE_CLIENT_LEFT :*** {RAW_STRING} has left the game ({2:STRING})
-STR_NETWORK_MESSAGE_NAME_CHANGE :*** {RAW_STRING} has changed his/her name to {RAW_STRING}
-STR_NETWORK_MESSAGE_GIVE_MONEY :*** {RAW_STRING} gave your company {2:CURRENCY_LONG}
-STR_NETWORK_MESSAGE_GAVE_MONEY_AWAY :*** You gave {1:RAW_STRING} {2:CURRENCY_LONG}
-STR_NETWORK_MESSAGE_SERVER_SHUTDOWN :{WHITE}The server closed the session
-STR_NETWORK_MESSAGE_SERVER_REBOOT :{WHITE}The server is restarting...{}Please wait...
-
-# Content downloading window
-STR_CONTENT_TITLE :{WHITE}Content downloading
-STR_CONTENT_TYPE_CAPTION :{BLACK}Type
-STR_CONTENT_TYPE_CAPTION_TOOLTIP :{BLACK}Type of the content
-STR_CONTENT_NAME_CAPTION :{BLACK}Name
-STR_CONTENT_NAME_CAPTION_TOOLTIP :{BLACK}Name of the content
-STR_CONTENT_MATRIX_TOOLTIP :{BLACK}Click on a line to see the details{}Click on the checkbox to select it for downloading
-STR_CONTENT_SELECT_ALL_CAPTION :{BLACK}Select all
-STR_CONTENT_SELECT_ALL_CAPTION_TOOLTIP :{BLACK}Mark all content to be downloaded
-STR_CONTENT_SELECT_UPDATES_CAPTION :{BLACK}Select upgrades
-STR_CONTENT_SELECT_UPDATES_CAPTION_TOOLTIP :{BLACK}Mark all content that is an upgrade for existing content to be downloaded
-STR_CONTENT_UNSELECT_ALL_CAPTION :{BLACK}Unselect all
-STR_CONTENT_UNSELECT_ALL_CAPTION_TOOLTIP :{BLACK}Mark all content to be not downloaded
-STR_CONTENT_SEARCH_EXTERNAL :{BLACK}Search external websites
-STR_CONTENT_SEARCH_EXTERNAL_TOOLTIP :{BLACK}Search content not available on OpenTTD's content service on websites not associated to OpenTTD
-STR_CONTENT_SEARCH_EXTERNAL_DISCLAIMER_CAPTION :{WHITE}You are leaving OpenTTD!
-STR_CONTENT_SEARCH_EXTERNAL_DISCLAIMER :{WHITE}The terms and conditions for downloading content from external websites vary.{}You will have to refer to the external sites for instructions how to install the content into OpenTTD.{}Do you want to continue?
-STR_CONTENT_FILTER_TITLE :{BLACK}Tag/name filter:
-STR_CONTENT_OPEN_URL :{BLACK}Visit website
-STR_CONTENT_OPEN_URL_TOOLTIP :{BLACK}Visit the website for this content
-STR_CONTENT_DOWNLOAD_CAPTION :{BLACK}Download
-STR_CONTENT_DOWNLOAD_CAPTION_TOOLTIP :{BLACK}Start downloading the selected content
-STR_CONTENT_TOTAL_DOWNLOAD_SIZE :{SILVER}Total download size: {WHITE}{BYTES}
-STR_CONTENT_DETAIL_TITLE :{SILVER}CONTENT INFO
-STR_CONTENT_DETAIL_SUBTITLE_UNSELECTED :{SILVER}You have not selected this to be downloaded
-STR_CONTENT_DETAIL_SUBTITLE_SELECTED :{SILVER}You have selected this to be downloaded
-STR_CONTENT_DETAIL_SUBTITLE_AUTOSELECTED :{SILVER}This dependency has been selected to be downloaded
-STR_CONTENT_DETAIL_SUBTITLE_ALREADY_HERE :{SILVER}You already have this
-STR_CONTENT_DETAIL_SUBTITLE_DOES_NOT_EXIST :{SILVER}This content is unknown and can't be downloaded in OpenTTD
-STR_CONTENT_DETAIL_UPDATE :{SILVER}This is a replacement for an existing {STRING}
-STR_CONTENT_DETAIL_NAME :{SILVER}Name: {WHITE}{RAW_STRING}
-STR_CONTENT_DETAIL_VERSION :{SILVER}Version: {WHITE}{RAW_STRING}
-STR_CONTENT_DETAIL_DESCRIPTION :{SILVER}Description: {WHITE}{RAW_STRING}
-STR_CONTENT_DETAIL_URL :{SILVER}URL: {WHITE}{RAW_STRING}
-STR_CONTENT_DETAIL_TYPE :{SILVER}Type: {WHITE}{STRING}
-STR_CONTENT_DETAIL_FILESIZE :{SILVER}Download size: {WHITE}{BYTES}
-STR_CONTENT_DETAIL_SELECTED_BECAUSE_OF :{SILVER}Selected because of: {WHITE}{RAW_STRING}
-STR_CONTENT_DETAIL_DEPENDENCIES :{SILVER}Dependencies: {WHITE}{RAW_STRING}
-STR_CONTENT_DETAIL_TAGS :{SILVER}Tags: {WHITE}{RAW_STRING}
-STR_CONTENT_NO_ZLIB :{WHITE}OpenTTD is built without "zlib" support...
-STR_CONTENT_NO_ZLIB_SUB :{WHITE}... downloading content is not possible!
-
-# Order of these is important!
-STR_CONTENT_TYPE_BASE_GRAPHICS :Base graphics
-STR_CONTENT_TYPE_NEWGRF :NewGRF
-STR_CONTENT_TYPE_AI :AI
-STR_CONTENT_TYPE_AI_LIBRARY :AI library
-STR_CONTENT_TYPE_SCENARIO :Scenario
-STR_CONTENT_TYPE_HEIGHTMAP :Heightmap
-STR_CONTENT_TYPE_BASE_SOUNDS :Base sounds
-STR_CONTENT_TYPE_BASE_MUSIC :Base music
-STR_CONTENT_TYPE_GAME_SCRIPT :Game script
-STR_CONTENT_TYPE_GS_LIBRARY :GS library
-
-# Content downloading progress window
-STR_CONTENT_DOWNLOAD_TITLE :{WHITE}Downloading content...
-STR_CONTENT_DOWNLOAD_INITIALISE :{WHITE}Requesting files...
-STR_CONTENT_DOWNLOAD_FILE :{WHITE}Currently downloading {RAW_STRING} ({NUM} of {NUM})
-STR_CONTENT_DOWNLOAD_COMPLETE :{WHITE}Download complete
-STR_CONTENT_DOWNLOAD_PROGRESS_SIZE :{WHITE}{BYTES} of {BYTES} downloaded ({NUM} %)
-
-# Content downloading error messages
-STR_CONTENT_ERROR_COULD_NOT_CONNECT :{WHITE}Could not connect to the content server...
-STR_CONTENT_ERROR_COULD_NOT_DOWNLOAD :{WHITE}Downloading failed...
-STR_CONTENT_ERROR_COULD_NOT_DOWNLOAD_CONNECTION_LOST :{WHITE}... connection lost
-STR_CONTENT_ERROR_COULD_NOT_DOWNLOAD_FILE_NOT_WRITABLE :{WHITE}... file not writable
-STR_CONTENT_ERROR_COULD_NOT_EXTRACT :{WHITE}Could not decompress the downloaded file
-
-STR_MISSING_GRAPHICS_SET_CAPTION :{WHITE}Missing graphics
-STR_MISSING_GRAPHICS_SET_MESSAGE :{BLACK}OpenTTD requires graphics to function but none could be found. Do you allow OpenTTD to download and install these graphics?
-STR_MISSING_GRAPHICS_YES_DOWNLOAD :{BLACK}Yes, download the graphics
-STR_MISSING_GRAPHICS_NO_QUIT :{BLACK}No, exit OpenTTD
-
-# Transparency settings window
-STR_TRANSPARENCY_CAPTION :{WHITE}Transparency Options
-STR_TRANSPARENT_SIGNS_TOOLTIP :{BLACK}Toggle transparency for signs. Ctrl+Click to lock
-STR_TRANSPARENT_TREES_TOOLTIP :{BLACK}Toggle transparency for trees. Ctrl+Click to lock
-STR_TRANSPARENT_HOUSES_TOOLTIP :{BLACK}Toggle transparency for houses. Ctrl+Click to lock
-STR_TRANSPARENT_INDUSTRIES_TOOLTIP :{BLACK}Toggle transparency for industries. Ctrl+Click to lock
-STR_TRANSPARENT_BUILDINGS_TOOLTIP :{BLACK}Toggle transparency for buildables like stations, depots and waypoints. Ctrl+Click to lock
-STR_TRANSPARENT_BRIDGES_TOOLTIP :{BLACK}Toggle transparency for bridges. Ctrl+Click to lock
-STR_TRANSPARENT_STRUCTURES_TOOLTIP :{BLACK}Toggle transparency for structures like lighthouses and antennas. Ctrl+Click to lock
-STR_TRANSPARENT_CATENARY_TOOLTIP :{BLACK}Toggle transparency for catenary. Ctrl+Click to lock
-STR_TRANSPARENT_LOADING_TOOLTIP :{BLACK}Toggle transparency for loading indicators. Ctrl+Click to lock
-STR_TRANSPARENT_INVISIBLE_TOOLTIP :{BLACK}Set objects invisible instead of transparent
-
-# Linkgraph legend window
-STR_LINKGRAPH_LEGEND_CAPTION :{BLACK}Cargo Flow Legend
-STR_LINKGRAPH_LEGEND_ALL :{BLACK}All
-STR_LINKGRAPH_LEGEND_NONE :{BLACK}None
-STR_LINKGRAPH_LEGEND_SELECT_COMPANIES :{BLACK}Select companies to be displayed
-
-# Linkgraph legend window and linkgraph legend in smallmap
-STR_LINKGRAPH_LEGEND_UNUSED :{TINY_FONT}{BLACK}unused
-STR_LINKGRAPH_LEGEND_SATURATED :{TINY_FONT}{BLACK}saturated
-STR_LINKGRAPH_LEGEND_OVERLOADED :{TINY_FONT}{BLACK}overloaded
-
-# Base for station construction window(s)
-STR_STATION_BUILD_COVERAGE_AREA_TITLE :{BLACK}Coverage area highlight
-STR_STATION_BUILD_COVERAGE_OFF :{BLACK}Off
-STR_STATION_BUILD_COVERAGE_ON :{BLACK}On
-STR_STATION_BUILD_COVERAGE_AREA_OFF_TOOLTIP :{BLACK}Don't highlight coverage area of proposed site
-STR_STATION_BUILD_COVERAGE_AREA_ON_TOOLTIP :{BLACK}Highlight coverage area of proposed site
-STR_STATION_BUILD_ACCEPTS_CARGO :{BLACK}Accepts: {GOLD}{CARGO_LIST}
-STR_STATION_BUILD_SUPPLIES_CARGO :{BLACK}Supplies: {GOLD}{CARGO_LIST}
-
-# Join station window
-STR_JOIN_STATION_CAPTION :{WHITE}Join station
-STR_JOIN_STATION_CREATE_SPLITTED_STATION :{YELLOW}Build a separate station
-
-STR_JOIN_WAYPOINT_CAPTION :{WHITE}Join waypoint
-STR_JOIN_WAYPOINT_CREATE_SPLITTED_WAYPOINT :{YELLOW}Build a separate waypoint
-
-# Rail construction toolbar
-STR_RAIL_TOOLBAR_RAILROAD_CONSTRUCTION_CAPTION :Railway Construction
-STR_RAIL_TOOLBAR_ELRAIL_CONSTRUCTION_CAPTION :Electrified Railway Construction
-STR_RAIL_TOOLBAR_MONORAIL_CONSTRUCTION_CAPTION :Monorail Construction
-STR_RAIL_TOOLBAR_MAGLEV_CONSTRUCTION_CAPTION :Maglev Construction
-
-STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}Build railway track. Ctrl toggles build/remove for railway construction. Shift toggles building/showing cost estimate
-STR_RAIL_TOOLBAR_TOOLTIP_BUILD_AUTORAIL :{BLACK}Build railway track using the Autorail mode. Ctrl toggles build/remove for railway construction. Shift toggles building/showing cost estimate
-STR_RAIL_TOOLBAR_TOOLTIP_BUILD_TRAIN_DEPOT_FOR_BUILDING :{BLACK}Build train depot (for buying and servicing trains). Shift toggles building/showing cost estimate
-STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL_TO_WAYPOINT :{BLACK}Convert rail to waypoint. Ctrl enables joining waypoints. Shift toggles building/showing cost estimate
-STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_STATION :{BLACK}Build railway station. Ctrl enables joining stations. Shift toggles building/showing cost estimate
-STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_SIGNALS :{BLACK}Build railway signals. Ctrl toggles semaphore/light signals{}Dragging builds signals along a straight stretch of rail. Ctrl builds signals till the next junction{}Ctrl+Click toggles opening the signal selection window. Shift toggles building/showing cost estimate
-STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_BRIDGE :{BLACK}Build railway bridge. Shift toggles building/showing cost estimate
-STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TUNNEL :{BLACK}Build railway tunnel. Shift toggles building/showing cost estimate
-STR_RAIL_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR :{BLACK}Toggle build/remove for railway track, signals, waypoints and stations. Hold Ctrl to also remove the rail of waypoints and stations
-STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL :{BLACK}Convert/Upgrade the type of rail. Shift toggles building/showing cost estimate
-
-STR_RAIL_NAME_RAILROAD :Railway
-STR_RAIL_NAME_ELRAIL :Electrified railway
-STR_RAIL_NAME_MONORAIL :Monorail
-STR_RAIL_NAME_MAGLEV :Maglev
-
-# Rail depot construction window
-STR_BUILD_DEPOT_TRAIN_ORIENTATION_CAPTION :{WHITE}Train Depot Orientation
-STR_BUILD_DEPOT_TRAIN_ORIENTATION_TOOLTIP :{BLACK}Select railway depot orientation
-
-# Rail waypoint construction window
-STR_WAYPOINT_CAPTION :{WHITE}Waypoint
-STR_WAYPOINT_GRAPHICS_TOOLTIP :{BLACK}Select waypoint type
-
-# Rail station construction window
-STR_STATION_BUILD_RAIL_CAPTION :{WHITE}Rail Station Selection
-STR_STATION_BUILD_ORIENTATION :{BLACK}Orientation
-STR_STATION_BUILD_RAILROAD_ORIENTATION_TOOLTIP :{BLACK}Select railway station orientation
-STR_STATION_BUILD_NUMBER_OF_TRACKS :{BLACK}Number of tracks
-STR_STATION_BUILD_NUMBER_OF_TRACKS_TOOLTIP :{BLACK}Select number of platforms for railway station
-STR_STATION_BUILD_PLATFORM_LENGTH :{BLACK}Platform length
-STR_STATION_BUILD_PLATFORM_LENGTH_TOOLTIP :{BLACK}Select length of railway station
-STR_STATION_BUILD_DRAG_DROP :{BLACK}Drag & Drop
-STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Build a station using drag & drop
-
-STR_STATION_BUILD_STATION_CLASS_TOOLTIP :{BLACK}Select a station class to display
-STR_STATION_BUILD_STATION_TYPE_TOOLTIP :{BLACK}Select the station type to build
-
-STR_STATION_CLASS_DFLT :Default station
-STR_STATION_CLASS_WAYP :Waypoints
-
-# Signal window
-STR_BUILD_SIGNAL_CAPTION :{WHITE}Signal Selection
-STR_BUILD_SIGNAL_SEMAPHORE_NORM_TOOLTIP :{BLACK}Block Signal (semaphore){}This is the most basic type of signal, allowing only one train to be in the same block at the same time
-STR_BUILD_SIGNAL_SEMAPHORE_ENTRY_TOOLTIP :{BLACK}Entry Signal (semaphore){}Green as long as there is one or more green exit-signal from the following section of track. Otherwise it shows red
-STR_BUILD_SIGNAL_SEMAPHORE_EXIT_TOOLTIP :{BLACK}Exit Signal (semaphore){}Behaves in the same way as a block signal but is necessary to trigger the correct colour on entry & combo pre-signals
-STR_BUILD_SIGNAL_SEMAPHORE_COMBO_TOOLTIP :{BLACK}Combo Signal (semaphore){}The combo signal simply acts as both an entry and exit signal. This allows you to build large "trees" of pre-signals
-STR_BUILD_SIGNAL_SEMAPHORE_PBS_TOOLTIP :{BLACK}Path Signal (semaphore){}A path signal allows more than one train to enter a signal block at the same time, if the train can reserve a path to a safe stopping point. Standard path signals can be passed from the back side
-STR_BUILD_SIGNAL_SEMAPHORE_PBS_OWAY_TOOLTIP :{BLACK}One-way Path Signal (semaphore){}A path signal allows more than one train to enter a signal block at the same time, if the train can reserve a path to a safe stopping point. One-way path signals can't be passed from the back side
-STR_BUILD_SIGNAL_ELECTRIC_NORM_TOOLTIP :{BLACK}Block Signal (electric){}This is the most basic type of signal, allowing only one train to be in the same block at the same time
-STR_BUILD_SIGNAL_ELECTRIC_ENTRY_TOOLTIP :{BLACK}Entry Signal (electric){}Green as long as there is one or more green exit-signal from the following section of track. Otherwise it shows red
-STR_BUILD_SIGNAL_ELECTRIC_EXIT_TOOLTIP :{BLACK}Exit Signal (electric){}Behaves in the same way as a block signal but is necessary to trigger the correct colour on entry & combo pre-signals
-STR_BUILD_SIGNAL_ELECTRIC_COMBO_TOOLTIP :{BLACK}Combo Signal (electric){}The combo signal simply acts as both an entry and exit signal. This allows you to build large "trees" of pre-signals
-STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP :{BLACK}Path Signal (electric){}A path signal allows more than one train to enter a signal block at the same time, if the train can reserve a path to a safe stopping point. Standard path signals can be passed from the back side
-STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP :{BLACK}One-way Path Signal (electric){}A path signal allows more than one train to enter a signal block at the same time, if the train can reserve a path to a safe stopping point. One-way path signals can't be passed from the back side
-STR_BUILD_SIGNAL_CONVERT_TOOLTIP :{BLACK}Signal Convert{}When selected, clicking an existing signal will convert it to the selected signal type and variant. Ctrl+Click will toggle the existing variant. Shift+Click shows estimated conversion cost
-STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP :{BLACK}Dragging signal density
-STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP :{BLACK}Decrease dragging signal density
-STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP :{BLACK}Increase dragging signal density
-
-# Bridge selection window
-STR_SELECT_RAIL_BRIDGE_CAPTION :{WHITE}Select Rail Bridge
-STR_SELECT_ROAD_BRIDGE_CAPTION :{WHITE}Select Road Bridge
-STR_SELECT_BRIDGE_SELECTION_TOOLTIP :{BLACK}Bridge selection - click on your preferred bridge to build it
-STR_SELECT_BRIDGE_INFO :{GOLD}{STRING},{} {VELOCITY} {WHITE}{CURRENCY_LONG}
-STR_SELECT_BRIDGE_SCENEDIT_INFO :{GOLD}{STRING},{} {VELOCITY}
-STR_BRIDGE_NAME_SUSPENSION_STEEL :Suspension, Steel
-STR_BRIDGE_NAME_GIRDER_STEEL :Girder, Steel
-STR_BRIDGE_NAME_CANTILEVER_STEEL :Cantilever, Steel
-STR_BRIDGE_NAME_SUSPENSION_CONCRETE :Suspension, Concrete
-STR_BRIDGE_NAME_WOODEN :Wooden
-STR_BRIDGE_NAME_CONCRETE :Concrete
-STR_BRIDGE_NAME_TUBULAR_STEEL :Tubular, Steel
-STR_BRIDGE_TUBULAR_SILICON :Tubular, Silicon
-
-
-# Road construction toolbar
-STR_ROAD_TOOLBAR_ROAD_CONSTRUCTION_CAPTION :{WHITE}Road Construction
-STR_ROAD_TOOLBAR_TRAM_CONSTRUCTION_CAPTION :{WHITE}Tramway Construction
-STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_SECTION :{BLACK}Build road section. Ctrl toggles build/remove for road construction. Shift toggles building/showing cost estimate
-STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_SECTION :{BLACK}Build tramway section. Ctrl toggles build/remove for tramway construction. Shift toggles building/showing cost estimate
-STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOROAD :{BLACK}Build road section using the Autoroad mode. Ctrl toggles build/remove for road construction. Shift toggles building/showing cost estimate
-STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOTRAM :{BLACK}Build tramway section using the Autotram mode. Ctrl toggles build/remove for tramway construction. Shift toggles building/showing cost estimate
-STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_VEHICLE_DEPOT :{BLACK}Build road vehicle depot (for buying and servicing vehicles). Shift toggles building/showing cost estimate
-STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAM_VEHICLE_DEPOT :{BLACK}Build tram vehicle depot (for buying and servicing vehicles). Shift toggles building/showing cost estimate
-STR_ROAD_TOOLBAR_TOOLTIP_BUILD_BUS_STATION :{BLACK}Build bus station. Ctrl enables joining stations. Shift toggles building/showing cost estimate
-STR_ROAD_TOOLBAR_TOOLTIP_BUILD_PASSENGER_TRAM_STATION :{BLACK}Build passenger tram station. Ctrl enables joining stations. Shift toggles building/showing cost estimate
-STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRUCK_LOADING_BAY :{BLACK}Build lorry loading bay. Ctrl enables joining stations. Shift toggles building/showing cost estimate
-STR_ROAD_TOOLBAR_TOOLTIP_BUILD_CARGO_TRAM_STATION :{BLACK}Build freight tram station. Ctrl enables joining stations. Shift toggles building/showing cost estimate
-STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_ONE_WAY_ROAD :{BLACK}Activate/Deactivate one way roads
-STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_BRIDGE :{BLACK}Build road bridge. Shift toggles building/showing cost estimate
-STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_BRIDGE :{BLACK}Build tramway bridge. Shift toggles building/showing cost estimate
-STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_TUNNEL :{BLACK}Build road tunnel. Shift toggles building/showing cost estimate
-STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_TUNNEL :{BLACK}Build tramway tunnel. Shift toggles building/showing cost estimate
-STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_ROAD :{BLACK}Toggle build/remove for road construction
-STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_TRAMWAYS :{BLACK}Toggle build/remove for tramway construction
-
-# Road depot construction window
-STR_BUILD_DEPOT_ROAD_ORIENTATION_CAPTION :{WHITE}Road Depot Orientation
-STR_BUILD_DEPOT_ROAD_ORIENTATION_SELECT_TOOLTIP :{BLACK}Select road vehicle depot orientation
-STR_BUILD_DEPOT_TRAM_ORIENTATION_CAPTION :{WHITE}Tram Depot Orientation
-STR_BUILD_DEPOT_TRAM_ORIENTATION_SELECT_TOOLTIP :{BLACK}Select tram vehicle depot orientation
-
-# Road vehicle station construction window
-STR_STATION_BUILD_BUS_ORIENTATION :{WHITE}Bus Station Orientation
-STR_STATION_BUILD_BUS_ORIENTATION_TOOLTIP :{BLACK}Select bus station orientation
-STR_STATION_BUILD_TRUCK_ORIENTATION :{WHITE}Lorry Station Orientation
-STR_STATION_BUILD_TRUCK_ORIENTATION_TOOLTIP :{BLACK}Select lorry loading bay orientation
-STR_STATION_BUILD_PASSENGER_TRAM_ORIENTATION :{WHITE}Passenger Tram Station Orientation
-STR_STATION_BUILD_PASSENGER_TRAM_ORIENTATION_TOOLTIP :{BLACK}Select passenger tram station orientation
-STR_STATION_BUILD_CARGO_TRAM_ORIENTATION :{WHITE}Freight Tram Station Orientation
-STR_STATION_BUILD_CARGO_TRAM_ORIENTATION_TOOLTIP :{BLACK}Select freight tram station orientation
-
-# Waterways toolbar (last two for SE only)
-STR_WATERWAYS_TOOLBAR_CAPTION :{WHITE}Waterways Construction
-STR_WATERWAYS_TOOLBAR_CAPTION_SE :{WHITE}Waterways
-STR_WATERWAYS_TOOLBAR_BUILD_CANALS_TOOLTIP :{BLACK}Build canals. Shift toggles building/showing cost estimate
-STR_WATERWAYS_TOOLBAR_BUILD_LOCKS_TOOLTIP :{BLACK}Build locks. Shift toggles building/showing cost estimate
-STR_WATERWAYS_TOOLBAR_BUILD_DEPOT_TOOLTIP :{BLACK}Build ship depot (for buying and servicing ships). Shift toggles building/showing cost estimate
-STR_WATERWAYS_TOOLBAR_BUILD_DOCK_TOOLTIP :{BLACK}Build ship dock. Ctrl enables joining stations. Shift toggles building/showing cost estimate
-STR_WATERWAYS_TOOLBAR_BUOY_TOOLTIP :{BLACK}Place a buoy which can be used as a waypoint. Shift toggles building/showing cost estimate
-STR_WATERWAYS_TOOLBAR_BUILD_AQUEDUCT_TOOLTIP :{BLACK}Build aqueduct. Shift toggles building/showing cost estimate
-STR_WATERWAYS_TOOLBAR_CREATE_LAKE_TOOLTIP :{BLACK}Define water area.{}Make a canal, unless Ctrl is held down at sea level, when it will flood the surroundings instead
-STR_WATERWAYS_TOOLBAR_CREATE_RIVER_TOOLTIP :{BLACK}Place rivers
-
-# Ship depot construction window
-STR_DEPOT_BUILD_SHIP_CAPTION :{WHITE}Ship Depot Orientation
-STR_DEPOT_BUILD_SHIP_ORIENTATION_TOOLTIP :{BLACK}Select ship depot orientation
-
-# Dock construction window
-STR_STATION_BUILD_DOCK_CAPTION :{WHITE}Dock
-
-# Airport toolbar
-STR_TOOLBAR_AIRCRAFT_CAPTION :{WHITE}Airports
-STR_TOOLBAR_AIRCRAFT_BUILD_AIRPORT_TOOLTIP :{BLACK}Build airport. Ctrl enables joining stations. Shift toggles building/showing cost estimate
-
-# Airport construction window
-STR_STATION_BUILD_AIRPORT_CAPTION :{WHITE}Airport Selection
-STR_STATION_BUILD_AIRPORT_TOOLTIP :{BLACK}Select size/type of airport
-STR_STATION_BUILD_AIRPORT_CLASS_LABEL :{BLACK}Airport class
-STR_STATION_BUILD_AIRPORT_LAYOUT_NAME :{BLACK}Layout {NUM}
-
-STR_AIRPORT_SMALL :Small
-STR_AIRPORT_CITY :City
-STR_AIRPORT_METRO :Metropolitan
-STR_AIRPORT_INTERNATIONAL :International
-STR_AIRPORT_COMMUTER :Commuter
-STR_AIRPORT_INTERCONTINENTAL :Intercontinental
-STR_AIRPORT_HELIPORT :Heliport
-STR_AIRPORT_HELIDEPOT :Helidepot
-STR_AIRPORT_HELISTATION :Helistation
-
-STR_AIRPORT_CLASS_SMALL :Small airports
-STR_AIRPORT_CLASS_LARGE :Large airports
-STR_AIRPORT_CLASS_HUB :Hub airports
-STR_AIRPORT_CLASS_HELIPORTS :Helicopter airports
-
-STR_STATION_BUILD_NOISE :{BLACK}Noise generated: {GOLD}{COMMA}
-
-# Landscaping toolbar
-STR_LANDSCAPING_TOOLBAR :{WHITE}Landscaping
-STR_LANDSCAPING_TOOLTIP_LOWER_A_CORNER_OF_LAND :{BLACK}Lower a corner of land. Dragging lowers the first selected corner and levels the selected area to the new corner height. Ctrl selects the area diagonally. Shift toggles building/showing cost estimate
-STR_LANDSCAPING_TOOLTIP_RAISE_A_CORNER_OF_LAND :{BLACK}Raise a corner of land. Dragging raises the first selected corner and levels the selected area to the new corner height. Ctrl selects the area diagonally. Shift toggles building/showing cost estimate
-STR_LANDSCAPING_LEVEL_LAND_TOOLTIP :{BLACK}Level an area of land to the height of the first selected corner. Ctrl selects the area diagonally. Shift toggles building/showing cost estimate
-STR_LANDSCAPING_TOOLTIP_PURCHASE_LAND :{BLACK}Purchase land for future use. Shift toggles building/showing cost estimate
-
-# Object construction window
-STR_OBJECT_BUILD_CAPTION :{WHITE}Object Selection
-STR_OBJECT_BUILD_TOOLTIP :{BLACK}Select object to build. Shift toggles building/showing cost estimate
-STR_OBJECT_BUILD_CLASS_TOOLTIP :{BLACK}Select class of the object to build
-STR_OBJECT_BUILD_PREVIEW_TOOLTIP :{BLACK}Preview of the object
-STR_OBJECT_BUILD_SIZE :{BLACK}Size: {GOLD}{NUM} x {NUM} tiles
-
-STR_OBJECT_CLASS_LTHS :Lighthouses
-STR_OBJECT_CLASS_TRNS :Transmitters
-
-# Tree planting window (last two for SE only)
-STR_PLANT_TREE_CAPTION :{WHITE}Trees
-STR_PLANT_TREE_TOOLTIP :{BLACK}Select tree type to plant. If the tile already has a tree, this will add more trees of mixed types independent of the selected type
-STR_TREES_RANDOM_TYPE :{BLACK}Trees of random type
-STR_TREES_RANDOM_TYPE_TOOLTIP :{BLACK}Place trees of random type. Shift toggles building/showing cost estimate
-STR_TREES_RANDOM_TREES_BUTTON :{BLACK}Random Trees
-STR_TREES_RANDOM_TREES_TOOLTIP :{BLACK}Plant trees randomly throughout the landscape
-
-# Land generation window (SE)
-STR_TERRAFORM_TOOLBAR_LAND_GENERATION_CAPTION :{WHITE}Land Generation
-STR_TERRAFORM_TOOLTIP_PLACE_ROCKY_AREAS_ON_LANDSCAPE :{BLACK}Place rocky areas on landscape
-STR_TERRAFORM_TOOLTIP_DEFINE_DESERT_AREA :{BLACK}Define desert area.{}Hold Ctrl to remove it
-STR_TERRAFORM_TOOLTIP_INCREASE_SIZE_OF_LAND_AREA :{BLACK}Increase area of land to lower/raise
-STR_TERRAFORM_TOOLTIP_DECREASE_SIZE_OF_LAND_AREA :{BLACK}Decrease area of land to lower/raise
-STR_TERRAFORM_TOOLTIP_GENERATE_RANDOM_LAND :{BLACK}Generate random land
-STR_TERRAFORM_SE_NEW_WORLD :{BLACK}Create new scenario
-STR_TERRAFORM_RESET_LANDSCAPE :{BLACK}Reset landscape
-STR_TERRAFORM_RESET_LANDSCAPE_TOOLTIP :{BLACK}Remove all company-owned property from the map
-
-STR_QUERY_RESET_LANDSCAPE_CAPTION :{WHITE}Reset Landscape
-STR_RESET_LANDSCAPE_CONFIRMATION_TEXT :{WHITE}Are you sure you want to remove all company-owned property?
-
-# Town generation window (SE)
-STR_FOUND_TOWN_CAPTION :{WHITE}Town Generation
-STR_FOUND_TOWN_NEW_TOWN_BUTTON :{BLACK}New Town
-STR_FOUND_TOWN_NEW_TOWN_TOOLTIP :{BLACK}Found new town. Shift+Click shows only estimated cost
-STR_FOUND_TOWN_RANDOM_TOWN_BUTTON :{BLACK}Random Town
-STR_FOUND_TOWN_RANDOM_TOWN_TOOLTIP :{BLACK}Found town in random location
-STR_FOUND_TOWN_MANY_RANDOM_TOWNS :{BLACK}Many random towns
-STR_FOUND_TOWN_RANDOM_TOWNS_TOOLTIP :{BLACK}Cover the map with randomly placed towns
-
-STR_FOUND_TOWN_NAME_TITLE :{YELLOW}Town name:
-STR_FOUND_TOWN_NAME_EDITOR_TITLE :{BLACK}Enter town name
-STR_FOUND_TOWN_NAME_EDITOR_HELP :{BLACK}Click to enter town name
-STR_FOUND_TOWN_NAME_RANDOM_BUTTON :{BLACK}Random name
-STR_FOUND_TOWN_NAME_RANDOM_TOOLTIP :{BLACK}Generate new random name
-
-STR_FOUND_TOWN_INITIAL_SIZE_TITLE :{YELLOW}Town size:
-STR_FOUND_TOWN_INITIAL_SIZE_SMALL_BUTTON :{BLACK}Small
-STR_FOUND_TOWN_INITIAL_SIZE_MEDIUM_BUTTON :{BLACK}Medium
-STR_FOUND_TOWN_INITIAL_SIZE_LARGE_BUTTON :{BLACK}Large
-STR_FOUND_TOWN_SIZE_RANDOM :{BLACK}Random
-STR_FOUND_TOWN_INITIAL_SIZE_TOOLTIP :{BLACK}Select town size
-STR_FOUND_TOWN_CITY :{BLACK}City
-STR_FOUND_TOWN_CITY_TOOLTIP :{BLACK}Cities grow faster than regular towns{}Depending on settings, they are bigger when founded
-
-STR_FOUND_TOWN_ROAD_LAYOUT :{YELLOW}Town road layout:
-STR_FOUND_TOWN_SELECT_TOWN_ROAD_LAYOUT :{BLACK}Select road layout used for this town
-STR_FOUND_TOWN_SELECT_LAYOUT_ORIGINAL :{BLACK}Original
-STR_FOUND_TOWN_SELECT_LAYOUT_BETTER_ROADS :{BLACK}Better roads
-STR_FOUND_TOWN_SELECT_LAYOUT_2X2_GRID :{BLACK}2x2 grid
-STR_FOUND_TOWN_SELECT_LAYOUT_3X3_GRID :{BLACK}3x3 grid
-STR_FOUND_TOWN_SELECT_LAYOUT_RANDOM :{BLACK}Random
-
-# Fund new industry window
-STR_FUND_INDUSTRY_CAPTION :{WHITE}Fund new industry
-STR_FUND_INDUSTRY_SELECTION_TOOLTIP :{BLACK}Choose the appropriate industry from this list
-STR_FUND_INDUSTRY_MANY_RANDOM_INDUSTRIES :Many random industries
-STR_FUND_INDUSTRY_MANY_RANDOM_INDUSTRIES_TOOLTIP :{BLACK}Cover the map with randomly placed industries
-STR_FUND_INDUSTRY_INDUSTRY_BUILD_COST :{BLACK}Cost: {YELLOW}{CURRENCY_LONG}
-STR_FUND_INDUSTRY_PROSPECT_NEW_INDUSTRY :{BLACK}Prospect
-STR_FUND_INDUSTRY_BUILD_NEW_INDUSTRY :{BLACK}Build
-STR_FUND_INDUSTRY_FUND_NEW_INDUSTRY :{BLACK}Fund
-
-# Industry cargoes window
-STR_INDUSTRY_CARGOES_INDUSTRY_CAPTION :{WHITE}Industry chain for {STRING} industry
-STR_INDUSTRY_CARGOES_CARGO_CAPTION :{WHITE}Industry chain for {STRING} cargo
-STR_INDUSTRY_CARGOES_PRODUCERS :{WHITE}Producing industries
-STR_INDUSTRY_CARGOES_CUSTOMERS :{WHITE}Accepting industries
-STR_INDUSTRY_CARGOES_HOUSES :{WHITE}Houses
-STR_INDUSTRY_CARGOES_INDUSTRY_TOOLTIP :{BLACK}Click at the industry to see its suppliers and customers
-STR_INDUSTRY_CARGOES_CARGO_TOOLTIP :{BLACK}{STRING}{}Click at the cargo to see its suppliers and customers
-STR_INDUSTRY_DISPLAY_CHAIN :{BLACK}Display chain
-STR_INDUSTRY_DISPLAY_CHAIN_TOOLTIP :{BLACK}Display cargo supplying and accepting industries
-STR_INDUSTRY_CARGOES_NOTIFY_SMALLMAP :{BLACK}Link to smallmap
-STR_INDUSTRY_CARGOES_NOTIFY_SMALLMAP_TOOLTIP :{BLACK}Select the displayed industries at the smallmap as well
-STR_INDUSTRY_CARGOES_SELECT_CARGO :{BLACK}Select cargo
-STR_INDUSTRY_CARGOES_SELECT_CARGO_TOOLTIP :{BLACK}Select the cargo you want to display
-STR_INDUSTRY_CARGOES_SELECT_INDUSTRY :{BLACK}Select industry
-STR_INDUSTRY_CARGOES_SELECT_INDUSTRY_TOOLTIP :{BLACK}Select the industry you want to display
-
-# Land area window
-STR_LAND_AREA_INFORMATION_CAPTION :{WHITE}Land Area Information
-STR_LAND_AREA_INFORMATION_COST_TO_CLEAR_N_A :{BLACK}Cost to clear: {LTBLUE}N/A
-STR_LAND_AREA_INFORMATION_COST_TO_CLEAR :{BLACK}Cost to clear: {RED}{CURRENCY_LONG}
-STR_LAND_AREA_INFORMATION_REVENUE_WHEN_CLEARED :{BLACK}Revenue when cleared: {LTBLUE}{CURRENCY_LONG}
-STR_LAND_AREA_INFORMATION_OWNER_N_A :N/A
-STR_LAND_AREA_INFORMATION_OWNER :{BLACK}Owner: {LTBLUE}{STRING1}
-STR_LAND_AREA_INFORMATION_ROAD_OWNER :{BLACK}Road owner: {LTBLUE}{STRING1}
-STR_LAND_AREA_INFORMATION_TRAM_OWNER :{BLACK}Tramway owner: {LTBLUE}{STRING1}
-STR_LAND_AREA_INFORMATION_RAIL_OWNER :{BLACK}Railway owner: {LTBLUE}{STRING1}
-STR_LAND_AREA_INFORMATION_LOCAL_AUTHORITY :{BLACK}Local authority: {LTBLUE}{STRING1}
-STR_LAND_AREA_INFORMATION_LOCAL_AUTHORITY_NONE :None
-STR_LAND_AREA_INFORMATION_LANDINFO_COORDS :{BLACK}Coordinates: {LTBLUE}{NUM} x {NUM} x {NUM} ({RAW_STRING})
-STR_LAND_AREA_INFORMATION_BUILD_DATE :{BLACK}Built: {LTBLUE}{DATE_LONG}
-STR_LAND_AREA_INFORMATION_STATION_CLASS :{BLACK}Station class: {LTBLUE}{STRING}
-STR_LAND_AREA_INFORMATION_STATION_TYPE :{BLACK}Station type: {LTBLUE}{STRING}
-STR_LAND_AREA_INFORMATION_AIRPORT_CLASS :{BLACK}Airport class: {LTBLUE}{STRING}
-STR_LAND_AREA_INFORMATION_AIRPORT_NAME :{BLACK}Airport name: {LTBLUE}{STRING}
-STR_LAND_AREA_INFORMATION_AIRPORTTILE_NAME :{BLACK}Airport tile name: {LTBLUE}{STRING}
-STR_LAND_AREA_INFORMATION_NEWGRF_NAME :{BLACK}NewGRF: {LTBLUE}{RAW_STRING}
-STR_LAND_AREA_INFORMATION_CARGO_ACCEPTED :{BLACK}Cargo accepted: {LTBLUE}
-STR_LAND_AREA_INFORMATION_CARGO_EIGHTS :({COMMA}/8 {STRING})
-STR_LANG_AREA_INFORMATION_RAIL_SPEED_LIMIT :{BLACK}Rail speed limit: {LTBLUE}{VELOCITY}
-STR_LANG_AREA_INFORMATION_ROAD_SPEED_LIMIT :{BLACK}Road speed limit: {LTBLUE}{VELOCITY}
-
-# Description of land area of different tiles
-STR_LAI_CLEAR_DESCRIPTION_ROCKS :Rocks
-STR_LAI_CLEAR_DESCRIPTION_ROUGH_LAND :Rough land
-STR_LAI_CLEAR_DESCRIPTION_BARE_LAND :Bare land
-STR_LAI_CLEAR_DESCRIPTION_GRASS :Grass
-STR_LAI_CLEAR_DESCRIPTION_FIELDS :Fields
-STR_LAI_CLEAR_DESCRIPTION_SNOW_COVERED_LAND :Snow-covered land
-STR_LAI_CLEAR_DESCRIPTION_DESERT :Desert
-
-STR_LAI_RAIL_DESCRIPTION_TRACK :{STRING} track
-STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_SIGNALS :{STRING} track with block signals
-STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRESIGNALS :{STRING} track with pre-signals
-STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXITSIGNALS :{STRING} track with exit-signals
-STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBOSIGNALS :{STRING} track with combo-signals
-STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBSSIGNALS :{STRING} track with path signals
-STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NOENTRYSIGNALS :{STRING} track with one-way path signals
-STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PRESIGNALS :{STRING} track with block and pre-signals
-STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_EXITSIGNALS :{STRING} track with block and exit-signals
-STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_COMBOSIGNALS :{STRING} track with block and combo-signals
-STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_PBSSIGNALS :{STRING} track with block and path signals
-STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_NORMAL_NOENTRYSIGNALS :{STRING} track with block and one-way path signals
-STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_EXITSIGNALS :{STRING} track with pre- and exit-signals
-STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_COMBOSIGNALS :{STRING} track with pre- and combo-signals
-STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_PBSSIGNALS :{STRING} track with pre- and path signals
-STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PRE_NOENTRYSIGNALS :{STRING} track with pre- and one-way path signals
-STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_COMBOSIGNALS :{STRING} track with exit- and combo-signals
-STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_PBSSIGNALS :{STRING} track with exit- and path signals
-STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_EXIT_NOENTRYSIGNALS :{STRING} track with exit- and one-way path signals
-STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_PBSSIGNALS :{STRING} track with combo- and path signals
-STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_COMBO_NOENTRYSIGNALS :{STRING} track with combo- and one-way path signals
-STR_LAI_RAIL_DESCRIPTION_TRACK_WITH_PBS_NOENTRYSIGNALS :{STRING} track with path and one-way path signals
-STR_LAI_RAIL_DESCRIPTION_TRAIN_DEPOT :{STRING} train depot
-
-STR_LAI_ROAD_DESCRIPTION_ROAD :Road
-STR_LAI_ROAD_DESCRIPTION_ROAD_WITH_STREETLIGHTS :Road with street lights
-STR_LAI_ROAD_DESCRIPTION_TREE_LINED_ROAD :Tree-lined road
-STR_LAI_ROAD_DESCRIPTION_ROAD_VEHICLE_DEPOT :Road vehicle depot
-STR_LAI_ROAD_DESCRIPTION_ROAD_RAIL_LEVEL_CROSSING :Road/rail level crossing
-STR_LAI_ROAD_DESCRIPTION_TRAMWAY :Tramway
-
-# Houses come directly from their building names
-STR_LAI_TOWN_INDUSTRY_DESCRIPTION_UNDER_CONSTRUCTION :{STRING} (under construction)
-
-STR_LAI_TREE_NAME_TREES :Trees
-STR_LAI_TREE_NAME_RAINFOREST :Rainforest
-STR_LAI_TREE_NAME_CACTUS_PLANTS :Cactus plants
-
-STR_LAI_STATION_DESCRIPTION_RAILROAD_STATION :Railway station
-STR_LAI_STATION_DESCRIPTION_AIRCRAFT_HANGAR :Aircraft hangar
-STR_LAI_STATION_DESCRIPTION_AIRPORT :Airport
-STR_LAI_STATION_DESCRIPTION_TRUCK_LOADING_AREA :Lorry loading area
-STR_LAI_STATION_DESCRIPTION_BUS_STATION :Bus station
-STR_LAI_STATION_DESCRIPTION_SHIP_DOCK :Ship dock
-STR_LAI_STATION_DESCRIPTION_BUOY :Buoy
-STR_LAI_STATION_DESCRIPTION_WAYPOINT :Waypoint
-
-STR_LAI_WATER_DESCRIPTION_WATER :Water
-STR_LAI_WATER_DESCRIPTION_CANAL :Canal
-STR_LAI_WATER_DESCRIPTION_LOCK :Lock
-STR_LAI_WATER_DESCRIPTION_RIVER :River
-STR_LAI_WATER_DESCRIPTION_COAST_OR_RIVERBANK :Coast or riverbank
-STR_LAI_WATER_DESCRIPTION_SHIP_DEPOT :Ship depot
-
-# Industries come directly from their industry names
-
-STR_LAI_TUNNEL_DESCRIPTION_RAILROAD :Railway tunnel
-STR_LAI_TUNNEL_DESCRIPTION_ROAD :Road tunnel
-
-STR_LAI_BRIDGE_DESCRIPTION_RAIL_SUSPENSION_STEEL :Steel suspension rail bridge
-STR_LAI_BRIDGE_DESCRIPTION_RAIL_GIRDER_STEEL :Steel girder rail bridge
-STR_LAI_BRIDGE_DESCRIPTION_RAIL_CANTILEVER_STEEL :Steel cantilever rail bridge
-STR_LAI_BRIDGE_DESCRIPTION_RAIL_SUSPENSION_CONCRETE :Reinforced concrete suspension rail bridge
-STR_LAI_BRIDGE_DESCRIPTION_RAIL_WOODEN :Wooden rail bridge
-STR_LAI_BRIDGE_DESCRIPTION_RAIL_CONCRETE :Concrete rail bridge
-STR_LAI_BRIDGE_DESCRIPTION_RAIL_TUBULAR_STEEL :Tubular rail bridge
-
-STR_LAI_BRIDGE_DESCRIPTION_ROAD_SUSPENSION_STEEL :Steel suspension road bridge
-STR_LAI_BRIDGE_DESCRIPTION_ROAD_GIRDER_STEEL :Steel girder road bridge
-STR_LAI_BRIDGE_DESCRIPTION_ROAD_CANTILEVER_STEEL :Steel cantilever road bridge
-STR_LAI_BRIDGE_DESCRIPTION_ROAD_SUSPENSION_CONCRETE :Reinforced concrete suspension road bridge
-STR_LAI_BRIDGE_DESCRIPTION_ROAD_WOODEN :Wooden road bridge
-STR_LAI_BRIDGE_DESCRIPTION_ROAD_CONCRETE :Concrete road bridge
-STR_LAI_BRIDGE_DESCRIPTION_ROAD_TUBULAR_STEEL :Tubular road bridge
-
-STR_LAI_BRIDGE_DESCRIPTION_AQUEDUCT :Aqueduct
-
-STR_LAI_OBJECT_DESCRIPTION_TRANSMITTER :Transmitter
-STR_LAI_OBJECT_DESCRIPTION_LIGHTHOUSE :Lighthouse
-STR_LAI_OBJECT_DESCRIPTION_COMPANY_HEADQUARTERS :Company headquarters
-STR_LAI_OBJECT_DESCRIPTION_COMPANY_OWNED_LAND :Company-owned land
-
-# About OpenTTD window
-STR_ABOUT_OPENTTD :{WHITE}About OpenTTD
-STR_ABOUT_ORIGINAL_COPYRIGHT :{BLACK}Original copyright {COPYRIGHT} 1995 Chris Sawyer, All rights reserved
-STR_ABOUT_VERSION :{BLACK}OpenTTD version {REV}
-STR_ABOUT_COPYRIGHT_OPENTTD :{BLACK}OpenTTD {COPYRIGHT} 2002-2014 The OpenTTD team
-
-# Save/load game/scenario
-STR_SAVELOAD_SAVE_CAPTION :{WHITE}Save Game
-STR_SAVELOAD_LOAD_CAPTION :{WHITE}Load Game
-STR_SAVELOAD_SAVE_SCENARIO :{WHITE}Save Scenario
-STR_SAVELOAD_LOAD_SCENARIO :{WHITE}Load Scenario
-STR_SAVELOAD_LOAD_HEIGHTMAP :{WHITE}Load Heightmap
-STR_SAVELOAD_SAVE_HEIGHTMAP :{WHITE}Save Heightmap
-STR_SAVELOAD_HOME_BUTTON :{BLACK}Click here to jump to the current default save/load directory
-STR_SAVELOAD_BYTES_FREE :{BLACK}{BYTES} free
-STR_SAVELOAD_LIST_TOOLTIP :{BLACK}List of drives, directories and saved-game files
-STR_SAVELOAD_EDITBOX_TOOLTIP :{BLACK}Currently selected name for saved-game
-STR_SAVELOAD_DELETE_BUTTON :{BLACK}Delete
-STR_SAVELOAD_DELETE_TOOLTIP :{BLACK}Delete the currently selected saved-game
-STR_SAVELOAD_SAVE_BUTTON :{BLACK}Save
-STR_SAVELOAD_SAVE_TOOLTIP :{BLACK}Save the current game, using the selected name
-STR_SAVELOAD_LOAD_BUTTON :{BLACK}Load
-STR_SAVELOAD_LOAD_TOOLTIP :{BLACK}Load the selected game
-STR_SAVELOAD_DETAIL_CAPTION :{BLACK}Game Details
-STR_SAVELOAD_DETAIL_NOT_AVAILABLE :{BLACK}No information available
-STR_SAVELOAD_DETAIL_COMPANY_INDEX :{SILVER}{COMMA}: {WHITE}{STRING1}
-STR_SAVELOAD_DETAIL_GRFSTATUS :{SILVER}NewGRF: {WHITE}{STRING}
-
-STR_SAVELOAD_OSKTITLE :{BLACK}Enter a name for the savegame
-
-# World generation
-STR_MAPGEN_WORLD_GENERATION_CAPTION :{WHITE}World Generation
-STR_MAPGEN_MAPSIZE :{BLACK}Map size:
-STR_MAPGEN_MAPSIZE_TOOLTIP :{BLACK}Select the size of the map in tiles. The number of available tiles will be slightly smaller
-STR_MAPGEN_BY :{BLACK}*
-STR_MAPGEN_NUMBER_OF_TOWNS :{BLACK}No. of towns:
-STR_MAPGEN_DATE :{BLACK}Date:
-STR_MAPGEN_NUMBER_OF_INDUSTRIES :{BLACK}No. of industries:
-STR_MAPGEN_SNOW_LINE_HEIGHT :{BLACK}Snow line height:
-STR_MAPGEN_SNOW_LINE_UP :{BLACK}Move the snow line height one up
-STR_MAPGEN_SNOW_LINE_DOWN :{BLACK}Move the snow line height one down
-STR_MAPGEN_RANDOM_SEED :{BLACK}Random seed:
-STR_MAPGEN_RANDOM_SEED_HELP :{BLACK}Click to enter a random seed
-STR_MAPGEN_RANDOM :{BLACK}Randomise
-STR_MAPGEN_RANDOM_HELP :{BLACK}Change the random seed used for Terrain Generation
-STR_MAPGEN_LAND_GENERATOR :{BLACK}Land generator:
-STR_MAPGEN_TREE_PLACER :{BLACK}Tree algorithm:
-STR_MAPGEN_TERRAIN_TYPE :{BLACK}Terrain type:
-STR_MAPGEN_QUANTITY_OF_SEA_LAKES :{BLACK}Sea level:
-STR_MAPGEN_QUANTITY_OF_RIVERS :{BLACK}Rivers:
-STR_MAPGEN_SMOOTHNESS :{BLACK}Smoothness:
-STR_MAPGEN_VARIETY :{BLACK}Variety distribution:
-STR_MAPGEN_GENERATE :{WHITE}Generate
-
-# Strings for map borders at game generation
-STR_MAPGEN_BORDER_TYPE :{BLACK}Map edges:
-STR_MAPGEN_NORTHWEST :{BLACK}Northwest
-STR_MAPGEN_NORTHEAST :{BLACK}Northeast
-STR_MAPGEN_SOUTHEAST :{BLACK}Southeast
-STR_MAPGEN_SOUTHWEST :{BLACK}Southwest
-STR_MAPGEN_BORDER_FREEFORM :{BLACK}Freeform
-STR_MAPGEN_BORDER_WATER :{BLACK}Water
-STR_MAPGEN_BORDER_RANDOM :{BLACK}Random
-STR_MAPGEN_BORDER_RANDOMIZE :{BLACK}Random
-STR_MAPGEN_BORDER_MANUAL :{BLACK}Manual
-
-STR_MAPGEN_HEIGHTMAP_ROTATION :{BLACK}Heightmap rotation:
-STR_MAPGEN_HEIGHTMAP_NAME :{BLACK}Heightmap name:
-STR_MAPGEN_HEIGHTMAP_SIZE_LABEL :{BLACK}Size:
-STR_MAPGEN_HEIGHTMAP_SIZE :{ORANGE}{NUM} x {NUM}
-
-STR_MAPGEN_RANDOM_SEED_OSKTITLE :{BLACK}Enter a random seed
-STR_MAPGEN_SNOW_LINE_QUERY_CAPT :{WHITE}Change snow line height
-STR_MAPGEN_START_DATE_QUERY_CAPT :{WHITE}Change starting year
-
-# SE Map generation
-STR_SE_MAPGEN_CAPTION :{WHITE}Scenario Type
-STR_SE_MAPGEN_FLAT_WORLD :{WHITE}Flat land
-STR_SE_MAPGEN_FLAT_WORLD_TOOLTIP :{BLACK}Generate a flat land
-STR_SE_MAPGEN_RANDOM_LAND :{WHITE}Random land
-STR_SE_MAPGEN_FLAT_WORLD_HEIGHT :{BLACK}Height of flat land:
-STR_SE_MAPGEN_FLAT_WORLD_HEIGHT_DOWN :{BLACK}Move the height of flat land one down
-STR_SE_MAPGEN_FLAT_WORLD_HEIGHT_UP :{BLACK}Move the height of flat land one up
-
-STR_SE_MAPGEN_FLAT_WORLD_HEIGHT_QUERY_CAPT :{WHITE}Change height of flat land
-
-# Map generation progress
-STR_GENERATION_WORLD :{WHITE}Generating World...
-STR_GENERATION_ABORT :{BLACK}Abort
-STR_GENERATION_ABORT_CAPTION :{WHITE}Abort World Generation
-STR_GENERATION_ABORT_MESSAGE :{YELLOW}Do you really want to abort the generation?
-STR_GENERATION_PROGRESS :{WHITE}{NUM}% complete
-STR_GENERATION_PROGRESS_NUM :{BLACK}{NUM} / {NUM}
-STR_GENERATION_WORLD_GENERATION :{BLACK}World generation
-STR_GENERATION_RIVER_GENERATION :{BLACK}River generation
-STR_GENERATION_TREE_GENERATION :{BLACK}Tree generation
-STR_GENERATION_OBJECT_GENERATION :{BLACK}Object generation
-STR_GENERATION_CLEARING_TILES :{BLACK}Rough and rocky area generation
-STR_GENERATION_SETTINGUP_GAME :{BLACK}Setting up game
-STR_GENERATION_PREPARING_TILELOOP :{BLACK}Running tile-loop
-STR_GENERATION_PREPARING_SCRIPT :{BLACK}Running script
-STR_GENERATION_PREPARING_GAME :{BLACK}Preparing game
-
-# NewGRF settings
-STR_NEWGRF_SETTINGS_CAPTION :{WHITE}NewGRF Settings
-STR_NEWGRF_SETTINGS_INFO_TITLE :{WHITE}Detailed NewGRF information
-STR_NEWGRF_SETTINGS_ACTIVE_LIST :{WHITE}Active NewGRF files
-STR_NEWGRF_SETTINGS_INACTIVE_LIST :{WHITE}Inactive NewGRF files
-STR_NEWGRF_SETTINGS_SELECT_PRESET :{ORANGE}Select preset:
-STR_NEWGRF_FILTER_TITLE :{ORANGE}Filter string:
-STR_NEWGRF_SETTINGS_PRESET_LIST_TOOLTIP :{BLACK}Load the selected preset
-STR_NEWGRF_SETTINGS_PRESET_SAVE :{BLACK}Save preset
-STR_NEWGRF_SETTINGS_PRESET_SAVE_TOOLTIP :{BLACK}Save the current list as a preset
-STR_NEWGRF_SETTINGS_PRESET_SAVE_QUERY :{BLACK}Enter name for preset
-STR_NEWGRF_SETTINGS_PRESET_DELETE :{BLACK}Delete preset
-STR_NEWGRF_SETTINGS_PRESET_DELETE_TOOLTIP :{BLACK}Delete the currently selected preset
-STR_NEWGRF_SETTINGS_ADD :{BLACK}Add
-STR_NEWGRF_SETTINGS_ADD_FILE_TOOLTIP :{BLACK}Add the selected NewGRF file to your configuration
-STR_NEWGRF_SETTINGS_RESCAN_FILES :{BLACK}Rescan files
-STR_NEWGRF_SETTINGS_RESCAN_FILES_TOOLTIP :{BLACK}Update the list of available NewGRF files
-STR_NEWGRF_SETTINGS_REMOVE :{BLACK}Remove
-STR_NEWGRF_SETTINGS_REMOVE_TOOLTIP :{BLACK}Remove the selected NewGRF file from the list
-STR_NEWGRF_SETTINGS_MOVEUP :{BLACK}Move Up
-STR_NEWGRF_SETTINGS_MOVEUP_TOOLTIP :{BLACK}Move the selected NewGRF file up the list
-STR_NEWGRF_SETTINGS_MOVEDOWN :{BLACK}Move Down
-STR_NEWGRF_SETTINGS_MOVEDOWN_TOOLTIP :{BLACK}Move the selected NewGRF file down the list
-STR_NEWGRF_SETTINGS_FILE_TOOLTIP :{BLACK}A list of the NewGRF files that are installed
-
-STR_NEWGRF_SETTINGS_SET_PARAMETERS :{BLACK}Set parameters
-STR_NEWGRF_SETTINGS_SHOW_PARAMETERS :{BLACK}Show parameters
-STR_NEWGRF_SETTINGS_TOGGLE_PALETTE :{BLACK}Toggle palette
-STR_NEWGRF_SETTINGS_TOGGLE_PALETTE_TOOLTIP :{BLACK}Toggle the palette of the selected NewGRF.{}Do this when the graphics from this NewGRF look pink in-game
-STR_NEWGRF_SETTINGS_APPLY_CHANGES :{BLACK}Apply changes
-
-STR_NEWGRF_SETTINGS_FIND_MISSING_CONTENT_BUTTON :{BLACK}Find missing content online
-STR_NEWGRF_SETTINGS_FIND_MISSING_CONTENT_TOOLTIP :{BLACK}Check whether the missing content can be found online
-
-STR_NEWGRF_SETTINGS_FILENAME :{BLACK}Filename: {SILVER}{RAW_STRING}
-STR_NEWGRF_SETTINGS_GRF_ID :{BLACK}GRF ID: {SILVER}{RAW_STRING}
-STR_NEWGRF_SETTINGS_VERSION :{BLACK}Version: {SILVER}{NUM}
-STR_NEWGRF_SETTINGS_MIN_VERSION :{BLACK}Min. compatible version: {SILVER}{NUM}
-STR_NEWGRF_SETTINGS_MD5SUM :{BLACK}MD5sum: {SILVER}{RAW_STRING}
-STR_NEWGRF_SETTINGS_PALETTE :{BLACK}Palette: {SILVER}{RAW_STRING}
-STR_NEWGRF_SETTINGS_PARAMETER :{BLACK}Parameters: {SILVER}{STRING1}
-
-STR_NEWGRF_SETTINGS_NO_INFO :{BLACK}No information available
-STR_NEWGRF_SETTINGS_NOT_FOUND :{RED}Matching file not found
-STR_NEWGRF_SETTINGS_DISABLED :{RED}Disabled
-STR_NEWGRF_SETTINGS_INCOMPATIBLE :{RED}Incompatible with this version of OpenTTD
-
-# NewGRF parameters window
-STR_NEWGRF_PARAMETERS_CAPTION :{WHITE}Change NewGRF parameters
-STR_NEWGRF_PARAMETERS_CLOSE :{BLACK}Close
-STR_NEWGRF_PARAMETERS_RESET :{BLACK}Reset
-STR_NEWGRF_PARAMETERS_RESET_TOOLTIP :{BLACK}Set all parameters to their default value
-STR_NEWGRF_PARAMETERS_DEFAULT_NAME :Parameter {NUM}
-STR_NEWGRF_PARAMETERS_SETTING :{STRING1}: {ORANGE}{STRING1}
-STR_NEWGRF_PARAMETERS_NUM_PARAM :{LTBLUE}Number of parameters: {ORANGE}{NUM}
-
-# NewGRF inspect window
-STR_NEWGRF_INSPECT_CAPTION :{WHITE}Inspect - {STRING5}
-STR_NEWGRF_INSPECT_PARENT_BUTTON :{BLACK}Parent
-STR_NEWGRF_INSPECT_PARENT_TOOLTIP :{BLACK}Inspect the object of the parent scope
-
-STR_NEWGRF_INSPECT_CAPTION_OBJECT_AT :{STRING1} at {HEX}
-STR_NEWGRF_INSPECT_CAPTION_OBJECT_AT_OBJECT :Object
-STR_NEWGRF_INSPECT_CAPTION_OBJECT_AT_RAIL_TYPE :Rail type
-
-STR_NEWGRF_INSPECT_QUERY_CAPTION :{WHITE}NewGRF variable 60+x parameter (hexadecimal)
-
-# Sprite aligner window
-STR_SPRITE_ALIGNER_CAPTION :{WHITE}Aligning sprite {COMMA} ({RAW_STRING})
-STR_SPRITE_ALIGNER_NEXT_BUTTON :{BLACK}Next sprite
-STR_SPRITE_ALIGNER_NEXT_TOOLTIP :{BLACK}Proceed to the next normal sprite, skipping any pseudo/recolour/font sprites and wrapping around at the end
-STR_SPRITE_ALIGNER_GOTO_BUTTON :{BLACK}Go to sprite
-STR_SPRITE_ALIGNER_GOTO_TOOLTIP :{BLACK}Go to the given sprite. If the sprite is not a normal sprite, proceed to the next normal sprite
-STR_SPRITE_ALIGNER_PREVIOUS_BUTTON :{BLACK}Previous sprite
-STR_SPRITE_ALIGNER_PREVIOUS_TOOLTIP :{BLACK}Proceed to the previous normal sprite, skipping any pseudo/recolour/font sprites and wrapping around at the begin
-STR_SPRITE_ALIGNER_SPRITE_TOOLTIP :{BLACK}Representation of the currently selected sprite. The alignment is ignored when drawing this sprite
-STR_SPRITE_ALIGNER_MOVE_TOOLTIP :{BLACK}Move the sprite around, changing the X and Y offsets
-STR_SPRITE_ALIGNER_OFFSETS :{BLACK}X offset: {NUM}, Y offset: {NUM}
-STR_SPRITE_ALIGNER_PICKER_BUTTON :{BLACK}Pick sprite
-STR_SPRITE_ALIGNER_PICKER_TOOLTIP :{BLACK}Pick a sprite from anywhere on the screen
-
-STR_SPRITE_ALIGNER_GOTO_CAPTION :{WHITE}Go to sprite
-
-# NewGRF (self) generated warnings/errors
-STR_NEWGRF_ERROR_MSG_INFO :{SILVER}{RAW_STRING}
-STR_NEWGRF_ERROR_MSG_WARNING :{RED}Warning: {SILVER}{RAW_STRING}
-STR_NEWGRF_ERROR_MSG_ERROR :{RED}Error: {SILVER}{RAW_STRING}
-STR_NEWGRF_ERROR_MSG_FATAL :{RED}Fatal: {SILVER}{RAW_STRING}
-STR_NEWGRF_ERROR_FATAL_POPUP :{WHITE}A fatal NewGRF error has occurred: {}{STRING5}
-STR_NEWGRF_ERROR_VERSION_NUMBER :{1:RAW_STRING} will not work with the TTDPatch version reported by OpenTTD
-STR_NEWGRF_ERROR_DOS_OR_WINDOWS :{1:RAW_STRING} is for the {RAW_STRING} version of TTD
-STR_NEWGRF_ERROR_UNSET_SWITCH :{1:RAW_STRING} is designed to be used with {RAW_STRING}
-STR_NEWGRF_ERROR_INVALID_PARAMETER :Invalid parameter for {1:RAW_STRING}: parameter {RAW_STRING} ({NUM})
-STR_NEWGRF_ERROR_LOAD_BEFORE :{1:RAW_STRING} must be loaded before {RAW_STRING}
-STR_NEWGRF_ERROR_LOAD_AFTER :{1:RAW_STRING} must be loaded after {RAW_STRING}
-STR_NEWGRF_ERROR_OTTD_VERSION_NUMBER :{1:RAW_STRING} requires OpenTTD version {RAW_STRING} or better
-STR_NEWGRF_ERROR_AFTER_TRANSLATED_FILE :the GRF file it was designed to translate
-STR_NEWGRF_ERROR_TOO_MANY_NEWGRFS_LOADED :Too many NewGRFs are loaded
-STR_NEWGRF_ERROR_STATIC_GRF_CAUSES_DESYNC :Loading {1:RAW_STRING} as static NewGRF with {RAW_STRING} could cause desyncs
-STR_NEWGRF_ERROR_UNEXPECTED_SPRITE :Unexpected sprite (sprite {3:NUM})
-STR_NEWGRF_ERROR_UNKNOWN_PROPERTY :Unknown Action 0 property {4:HEX} (sprite {3:NUM})
-STR_NEWGRF_ERROR_INVALID_ID :Attempt to use invalid ID (sprite {3:NUM})
-STR_NEWGRF_ERROR_CORRUPT_SPRITE :{YELLOW}{RAW_STRING} contains a corrupt sprite. All corrupt sprites will be shown as a red question mark (?)
-STR_NEWGRF_ERROR_MULTIPLE_ACTION_8 :Contains multiple Action 8 entries (sprite {3:NUM})
-STR_NEWGRF_ERROR_READ_BOUNDS :Read past end of pseudo-sprite (sprite {3:NUM})
-STR_NEWGRF_ERROR_MISSING_SPRITES :{WHITE}The currently used base graphics set is missing a number of sprites.{}Please update the base graphics set
-STR_NEWGRF_ERROR_MISSING_SPRITES_UNSTABLE :{WHITE}The currently used base graphics set is missing a number of sprites.{}Please update the base graphics set.{}Since you are playing a {YELLOW}development snapshot of OpenTTD{WHITE}, you might also need a {YELLOW}development snapshot of the base graphics{WHITE}
-STR_NEWGRF_ERROR_GRM_FAILED :Requested GRF resources not available (sprite {3:NUM})
-STR_NEWGRF_ERROR_FORCEFULLY_DISABLED :{1:RAW_STRING} was disabled by {2:RAW_STRING}
-STR_NEWGRF_ERROR_INVALID_SPRITE_LAYOUT :Invalid/unknown sprite layout format (sprite {3:NUM})
-
-# NewGRF related 'general' warnings
-STR_NEWGRF_POPUP_CAUTION_CAPTION :{WHITE}Caution!
-STR_NEWGRF_CONFIRMATION_TEXT :{YELLOW}You are about to make changes to a running game. This can crash OpenTTD or break the game state. Do not file bug reports about these issues.{}Are you absolutely sure about this?
-
-STR_NEWGRF_DUPLICATE_GRFID :{WHITE}Can't add file: duplicate GRF ID
-STR_NEWGRF_COMPATIBLE_LOADED :{ORANGE}Matching file not found (compatible GRF loaded)
-STR_NEWGRF_TOO_MANY_NEWGRFS :{WHITE}Can't add file: NewGRF file limit reached
-
-STR_NEWGRF_COMPATIBLE_LOAD_WARNING :{WHITE}Compatible GRF(s) loaded for missing files
-STR_NEWGRF_DISABLED_WARNING :{WHITE}Missing GRF file(s) have been disabled
-STR_NEWGRF_UNPAUSE_WARNING_TITLE :{YELLOW}Missing GRF file(s)
-STR_NEWGRF_UNPAUSE_WARNING :{WHITE}Unpausing can crash OpenTTD. Do not file bug reports for subsequent crashes.{}Do you really want to unpause?
-
-# NewGRF status
-STR_NEWGRF_LIST_NONE :None
-STR_NEWGRF_LIST_ALL_FOUND :All files present
-STR_NEWGRF_LIST_COMPATIBLE :{YELLOW}Found compatible files
-STR_NEWGRF_LIST_MISSING :{RED}Missing files
-
-# NewGRF 'it's broken' warnings
-STR_NEWGRF_BROKEN :{WHITE}Behaviour of NewGRF '{0:RAW_STRING}' is likely to cause desyncs and/or crashes
-STR_NEWGRF_BROKEN_POWERED_WAGON :{WHITE}It changed powered-wagon state for '{1:ENGINE}' when not inside a depot
-STR_NEWGRF_BROKEN_VEHICLE_LENGTH :{WHITE}It changed vehicle length for '{1:ENGINE}' when not inside a depot
-STR_NEWGRF_BROKEN_CAPACITY :{WHITE}It changed vehicle capacity for '{1:ENGINE}' when not inside a depot or refitting
-STR_BROKEN_VEHICLE_LENGTH :{WHITE}Train '{VEHICLE}' belonging to '{COMPANY}' has invalid length. It is probably caused by problems with NewGRFs. Game may desync or crash
-
-STR_NEWGRF_BUGGY :{WHITE}NewGRF '{0:RAW_STRING}' provides incorrect information
-STR_NEWGRF_BUGGY_ARTICULATED_CARGO :{WHITE}Cargo/refit information for '{1:ENGINE}' differs from purchase list after construction. This might cause autorenew/-replace to fail refitting correctly
-STR_NEWGRF_BUGGY_ENDLESS_PRODUCTION_CALLBACK :{WHITE}'{1:STRING}' caused an endless loop in the production callback
-STR_NEWGRF_BUGGY_UNKNOWN_CALLBACK_RESULT :{WHITE}Callback {1:HEX} returned unknown/invalid result {2:HEX}
-
-# 'User removed essential NewGRFs'-placeholders for stuff without specs
-STR_NEWGRF_INVALID_CARGO :
-STR_NEWGRF_INVALID_CARGO_ABBREV :??
-STR_NEWGRF_INVALID_CARGO_QUANTITY :{COMMA} of
-STR_NEWGRF_INVALID_ENGINE :
-STR_NEWGRF_INVALID_INDUSTRYTYPE :
-
-# Placeholders for other invalid stuff, e.g. vehicles that have gone (Game Script).
-STR_INVALID_VEHICLE :
-
-# NewGRF scanning window
-STR_NEWGRF_SCAN_CAPTION :{WHITE}Scanning NewGRFs
-STR_NEWGRF_SCAN_MESSAGE :{BLACK}Scanning NewGRFs. Depending on the amount this can take a while...
-STR_NEWGRF_SCAN_STATUS :{BLACK}{NUM} NewGRF{P "" s} scanned out of an estimated {NUM} NewGRF{P "" s}
-STR_NEWGRF_SCAN_ARCHIVES :Scanning for archives
-
-# Sign list window
-STR_SIGN_LIST_CAPTION :{WHITE}Sign List - {COMMA} Sign{P "" s}
-STR_SIGN_LIST_MATCH_CASE :{BLACK}Match case
-STR_SIGN_LIST_MATCH_CASE_TOOLTIP :{BLACK}Toggle matching case when comparing sign names against the filter string
-
-# Sign window
-STR_EDIT_SIGN_CAPTION :{WHITE}Edit sign text
-STR_EDIT_SIGN_NEXT_SIGN_TOOLTIP :{BLACK}Go to next sign
-STR_EDIT_SIGN_PREVIOUS_SIGN_TOOLTIP :{BLACK}Go to previous sign
-
-STR_EDIT_SIGN_SIGN_OSKTITLE :{BLACK}Enter a name for the sign
-
-# Town directory window
-STR_TOWN_DIRECTORY_CAPTION :{WHITE}Towns
-STR_TOWN_DIRECTORY_NONE :{ORANGE}- None -
-STR_TOWN_DIRECTORY_TOWN :{ORANGE}{TOWN}{BLACK} ({COMMA})
-STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}Town names - click on name to centre main view on town. Ctrl+Click opens a new viewport on town location
-STR_TOWN_POPULATION :{BLACK}World population: {COMMA}
-
-# Town view window
-STR_TOWN_VIEW_TOWN_CAPTION :{WHITE}{TOWN}
-STR_TOWN_VIEW_CITY_CAPTION :{WHITE}{TOWN} (City)
-STR_TOWN_VIEW_POPULATION_HOUSES :{BLACK}Population: {ORANGE}{COMMA}{BLACK} Houses: {ORANGE}{COMMA}
-STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX :{BLACK}Passengers last month: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA}
-STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX :{BLACK}Mail last month: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA}
-STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH :{BLACK}Cargo needed for town growth:
-STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_GENERAL :{ORANGE}{STRING}{RED} required
-STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{ORANGE}{STRING}{BLACK} required in winter
-STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_DELIVERED_GENERAL :{ORANGE}{STRING}{GREEN} delivered
-STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED :{ORANGE}{CARGO_TINY} / {CARGO_LONG}{RED} (still required)
-STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_DELIVERED :{ORANGE}{CARGO_TINY} / {CARGO_LONG}{GREEN} (delivered)
-STR_TOWN_VIEW_TOWN_GROWS_EVERY :{BLACK}Town grows every {ORANGE}{COMMA}{BLACK} day{P "" s}
-STR_TOWN_VIEW_TOWN_GROWS_EVERY_FUNDED :{BLACK}Town grows every {ORANGE}{COMMA}{BLACK} day{P "" s} (funded)
-STR_TOWN_VIEW_TOWN_GROW_STOPPED :{BLACK}Town is {RED}not{BLACK} growing
-STR_TOWN_VIEW_NOISE_IN_TOWN :{BLACK}Noise limit in town: {ORANGE}{COMMA}{BLACK} max: {ORANGE}{COMMA}
-STR_TOWN_VIEW_CENTER_TOOLTIP :{BLACK}Centre the main view on town location. Ctrl+Click opens a new viewport on town location
-STR_TOWN_VIEW_LOCAL_AUTHORITY_BUTTON :{BLACK}Local authority
-STR_TOWN_VIEW_LOCAL_AUTHORITY_TOOLTIP :{BLACK}Show information on local authority
-STR_TOWN_VIEW_RENAME_TOOLTIP :{BLACK}Change town name
-
-STR_TOWN_VIEW_EXPAND_BUTTON :{BLACK}Expand
-STR_TOWN_VIEW_EXPAND_TOOLTIP :{BLACK}Increase size of town
-STR_TOWN_VIEW_DELETE_BUTTON :{BLACK}Delete
-STR_TOWN_VIEW_DELETE_TOOLTIP :{BLACK}Delete this town completely
-
-STR_TOWN_VIEW_RENAME_TOWN_BUTTON :Rename Town
-
-# Town local authority window
-STR_LOCAL_AUTHORITY_CAPTION :{WHITE}{TOWN} local authority
-STR_LOCAL_AUTHORITY_COMPANY_RATINGS :{BLACK}Transport company ratings:
-STR_LOCAL_AUTHORITY_COMPANY_RATING :{YELLOW}{COMPANY} {COMPANY_NUM}: {ORANGE}{STRING}
-STR_LOCAL_AUTHORITY_ACTIONS_TITLE :{BLACK}Actions available:
-STR_LOCAL_AUTHORITY_ACTIONS_TOOLTIP :{BLACK}List of things to do at this town - click on item for more details
-STR_LOCAL_AUTHORITY_DO_IT_BUTTON :{BLACK}Do it
-STR_LOCAL_AUTHORITY_DO_IT_TOOLTIP :{BLACK}Carry out the highlighted action in the list above
-
-STR_LOCAL_AUTHORITY_ACTION_SMALL_ADVERTISING_CAMPAIGN :Small advertising campaign
-STR_LOCAL_AUTHORITY_ACTION_MEDIUM_ADVERTISING_CAMPAIGN :Medium advertising campaign
-STR_LOCAL_AUTHORITY_ACTION_LARGE_ADVERTISING_CAMPAIGN :Large advertising campaign
-STR_LOCAL_AUTHORITY_ACTION_ROAD_RECONSTRUCTION :Fund local road reconstruction
-STR_LOCAL_AUTHORITY_ACTION_STATUE_OF_COMPANY :Build statue of company owner
-STR_LOCAL_AUTHORITY_ACTION_NEW_BUILDINGS :Fund new buildings
-STR_LOCAL_AUTHORITY_ACTION_EXCLUSIVE_TRANSPORT :Buy exclusive transport rights
-STR_LOCAL_AUTHORITY_ACTION_BRIBE :Bribe the local authority
-
-STR_LOCAL_AUTHORITY_ACTION_TOOLTIP_SMALL_ADVERTISING :{YELLOW}Initiate a small local advertising campaign, to attract more passengers and cargo to your transport services.{}Cost: {CURRENCY_LONG}
-STR_LOCAL_AUTHORITY_ACTION_TOOLTIP_MEDIUM_ADVERTISING :{YELLOW}Initiate a medium local advertising campaign, to attract more passengers and cargo to your transport services.{}Cost: {CURRENCY_LONG}
-STR_LOCAL_AUTHORITY_ACTION_TOOLTIP_LARGE_ADVERTISING :{YELLOW}Initiate a large local advertising campaign, to attract more passengers and cargo to your transport services.{}Cost: {CURRENCY_LONG}
-STR_LOCAL_AUTHORITY_ACTION_TOOLTIP_ROAD_RECONSTRUCTION :{YELLOW}Fund the reconstruction of the urban road network. Causes considerable disruption to road traffic for up to 6 months.{}Cost: {CURRENCY_LONG}
-STR_LOCAL_AUTHORITY_ACTION_TOOLTIP_STATUE_OF_COMPANY :{YELLOW}Build a statue in honour of your company.{}Cost: {CURRENCY_LONG}
-STR_LOCAL_AUTHORITY_ACTION_TOOLTIP_NEW_BUILDINGS :{YELLOW}Fund the construction of new commercial buildings in the town.{}Cost: {CURRENCY_LONG}
-STR_LOCAL_AUTHORITY_ACTION_TOOLTIP_EXCLUSIVE_TRANSPORT :{YELLOW}Buy 1 year's exclusive transport rights in town. Town authority will only allow passengers and cargo to use your company's stations.{}Cost: {CURRENCY_LONG}
-STR_LOCAL_AUTHORITY_ACTION_TOOLTIP_BRIBE :{YELLOW}Bribe the local authority to increase your rating, at the risk of a severe penalty if caught.{}Cost: {CURRENCY_LONG}
-
-# Goal window
-STR_GOALS_CAPTION :{WHITE}{COMPANY} Goals
-STR_GOALS_SPECTATOR_CAPTION :{WHITE}Global Goals
-STR_GOALS_GLOBAL_TITLE :{BLACK}Global goals:
-STR_GOALS_TEXT :{ORANGE}{RAW_STRING}
-STR_GOALS_NONE :{ORANGE}- None -
-STR_GOALS_SPECTATOR_NONE :{ORANGE}- Not applicable -
-STR_GOALS_PROGRESS :{ORANGE}{RAW_STRING}
-STR_GOALS_PROGRESS_COMPLETE :{GREEN}{RAW_STRING}
-STR_GOALS_COMPANY_TITLE :{BLACK}Company goals:
-STR_GOALS_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Click on goal to centre main view on industry/town/tile. Ctrl+Click opens a new viewport on industry/town/tile location
-
-# Goal question window
-STR_GOAL_QUESTION_CAPTION_QUESTION :Question
-STR_GOAL_QUESTION_CAPTION_INFORMATION :Information
-STR_GOAL_QUESTION_CAPTION_WARNING :Warning
-STR_GOAL_QUESTION_CAPTION_ERROR :Error
-
-### Start of Goal Question button list
-STR_GOAL_QUESTION_BUTTON_CANCEL :Cancel
-STR_GOAL_QUESTION_BUTTON_OK :OK
-STR_GOAL_QUESTION_BUTTON_NO :No
-STR_GOAL_QUESTION_BUTTON_YES :Yes
-STR_GOAL_QUESTION_BUTTON_DECLINE :Decline
-STR_GOAL_QUESTION_BUTTON_ACCEPT :Accept
-STR_GOAL_QUESTION_BUTTON_IGNORE :Ignore
-STR_GOAL_QUESTION_BUTTON_RETRY :Retry
-STR_GOAL_QUESTION_BUTTON_PREVIOUS :Previous
-STR_GOAL_QUESTION_BUTTON_NEXT :Next
-STR_GOAL_QUESTION_BUTTON_STOP :Stop
-STR_GOAL_QUESTION_BUTTON_START :Start
-STR_GOAL_QUESTION_BUTTON_GO :Go
-STR_GOAL_QUESTION_BUTTON_CONTINUE :Continue
-STR_GOAL_QUESTION_BUTTON_RESTART :Restart
-STR_GOAL_QUESTION_BUTTON_POSTPONE :Postpone
-STR_GOAL_QUESTION_BUTTON_SURRENDER :Surrender
-STR_GOAL_QUESTION_BUTTON_CLOSE :Close
-
-# Subsidies window
-STR_SUBSIDIES_CAPTION :{WHITE}Subsidies
-STR_SUBSIDIES_OFFERED_TITLE :{BLACK}Subsidies on offer for services taking:
-STR_SUBSIDIES_OFFERED_FROM_TO :{ORANGE}{STRING} from {STRING2} to {STRING2}{YELLOW} (by {DATE_SHORT})
-STR_SUBSIDIES_NONE :{ORANGE}- None -
-STR_SUBSIDIES_SUBSIDISED_TITLE :{BLACK}Services already subsidised:
-STR_SUBSIDIES_SUBSIDISED_FROM_TO :{ORANGE}{STRING} from {STRING2} to {STRING2}{YELLOW} ({COMPANY}{YELLOW}, until {DATE_SHORT})
-STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER :{BLACK}Click on service to centre main view on industry/town. Ctrl+Click opens a new viewport on industry/town location
-
-# Story book window
-STR_STORY_BOOK_CAPTION :{WHITE}{COMPANY} Story Book
-STR_STORY_BOOK_SPECTATOR_CAPTION :{WHITE}Global Story Book
-STR_STORY_BOOK_TITLE :{YELLOW}{RAW_STRING}
-STR_STORY_BOOK_GENERIC_PAGE_ITEM :Page {NUM}
-STR_STORY_BOOK_SEL_PAGE_TOOLTIP :{BLACK}Jump to a specific page by selecting it in this drop down list.
-STR_STORY_BOOK_PREV_PAGE :{BLACK}Previous
-STR_STORY_BOOK_PREV_PAGE_TOOLTIP :{BLACK}Go to previous page
-STR_STORY_BOOK_NEXT_PAGE :{BLACK}Next
-STR_STORY_BOOK_NEXT_PAGE_TOOLTIP :{BLACK}Go to next page
-STR_STORY_BOOK_INVALID_GOAL_REF :{RED}Invalid goal reference
-
-# Station list window
-STR_STATION_LIST_TOOLTIP :{BLACK}Station names - click on name to centre main view on station. Ctrl+Click opens a new viewport on station location
-STR_STATION_LIST_USE_CTRL_TO_SELECT_MORE :{BLACK}Hold Ctrl to select more than one item
-STR_STATION_LIST_CAPTION :{WHITE}{COMPANY} - {COMMA} Station{P "" s}
-STR_STATION_LIST_STATION :{YELLOW}{STATION} {STATION_FEATURES}
-STR_STATION_LIST_WAYPOINT :{YELLOW}{WAYPOINT}
-STR_STATION_LIST_NONE :{YELLOW}- None -
-STR_STATION_LIST_SELECT_ALL_FACILITIES :{BLACK}Select all facilities
-STR_STATION_LIST_SELECT_ALL_TYPES :{BLACK}Select all cargo types (including no waiting cargo)
-STR_STATION_LIST_NO_WAITING_CARGO :{BLACK}No cargo of any type is waiting
-
-# Station view window
-STR_STATION_VIEW_CAPTION :{WHITE}{STATION} {STATION_FEATURES}
-STR_STATION_VIEW_WAITING_TITLE :{BLACK}Waiting: {WHITE}{STRING}
-STR_STATION_VIEW_WAITING_CARGO :{WHITE}{CARGO_LONG}
-STR_STATION_VIEW_EN_ROUTE_FROM :{YELLOW}({CARGO_SHORT} from {STATION})
-STR_STATION_VIEW_RESERVED :{YELLOW}({CARGO_SHORT} reserved for loading)
-
-STR_STATION_VIEW_ACCEPTS_BUTTON :{BLACK}Accepts
-STR_STATION_VIEW_ACCEPTS_TOOLTIP :{BLACK}Show list of accepted cargo
-STR_STATION_VIEW_ACCEPTS_CARGO :{BLACK}Accepts: {WHITE}{CARGO_LIST}
-
-STR_STATIOV_VIEW_EXCLUSIVE_RIGHTS_SELF :{BLACK}This station has exclusive transport rights in this town.
-STR_STATIOV_VIEW_EXCLUSIVE_RIGHTS_COMPANY :{YELLOW}{COMPANY}{BLACK} bought exclusive transport rights in this town.
-
-STR_STATION_VIEW_RATINGS_BUTTON :{BLACK}Ratings
-STR_STATION_VIEW_RATINGS_TOOLTIP :{BLACK}Show station ratings
-STR_STATION_VIEW_SUPPLY_RATINGS_TITLE :{BLACK}Monthly supply and local rating:
-STR_STATION_VIEW_CARGO_SUPPLY_RATING :{WHITE}{STRING}: {YELLOW}{COMMA} / {STRING} ({COMMA}%)
-
-STR_STATION_VIEW_GROUP :{BLACK}Group by
-STR_STATION_VIEW_WAITING_STATION :Station: Waiting
-STR_STATION_VIEW_WAITING_AMOUNT :Amount: Waiting
-STR_STATION_VIEW_PLANNED_STATION :Station: Planned
-STR_STATION_VIEW_PLANNED_AMOUNT :Amount: Planned
-STR_STATION_VIEW_FROM :{YELLOW}{CARGO_SHORT} from {STATION}
-STR_STATION_VIEW_VIA :{YELLOW}{CARGO_SHORT} via {STATION}
-STR_STATION_VIEW_TO :{YELLOW}{CARGO_SHORT} to {STATION}
-STR_STATION_VIEW_FROM_ANY :{RED}{CARGO_SHORT} from unknown station
-STR_STATION_VIEW_TO_ANY :{RED}{CARGO_SHORT} to any station
-STR_STATION_VIEW_VIA_ANY :{RED}{CARGO_SHORT} via any station
-STR_STATION_VIEW_FROM_HERE :{GREEN}{CARGO_SHORT} from this station
-STR_STATION_VIEW_VIA_HERE :{GREEN}{CARGO_SHORT} stopping at this station
-STR_STATION_VIEW_TO_HERE :{GREEN}{CARGO_SHORT} to this station
-STR_STATION_VIEW_NONSTOP :{YELLOW}{CARGO_SHORT} non-stop
-
-STR_STATION_VIEW_GROUP_S_V_D :Source-Via-Destination
-STR_STATION_VIEW_GROUP_S_D_V :Source-Destination-Via
-STR_STATION_VIEW_GROUP_V_S_D :Via-Source-Destination
-STR_STATION_VIEW_GROUP_V_D_S :Via-Destination-Source
-STR_STATION_VIEW_GROUP_D_S_V :Destination-Source-Via
-STR_STATION_VIEW_GROUP_D_V_S :Destination-Via-Source
-
-############ range for rating starts
-STR_CARGO_RATING_APPALLING :Appalling
-STR_CARGO_RATING_VERY_POOR :Very Poor
-STR_CARGO_RATING_POOR :Poor
-STR_CARGO_RATING_MEDIOCRE :Mediocre
-STR_CARGO_RATING_GOOD :Good
-STR_CARGO_RATING_VERY_GOOD :Very Good
-STR_CARGO_RATING_EXCELLENT :Excellent
-STR_CARGO_RATING_OUTSTANDING :Outstanding
-############ range for rating ends
-
-STR_STATION_VIEW_CENTER_TOOLTIP :{BLACK}Centre main view on station location. Ctrl+Click opens a new viewport on station location
-STR_STATION_VIEW_RENAME_TOOLTIP :{BLACK}Change name of station
-
-STR_STATION_VIEW_SCHEDULED_TRAINS_TOOLTIP :{BLACK}Show all trains which have this station on their schedule
-STR_STATION_VIEW_SCHEDULED_ROAD_VEHICLES_TOOLTIP :{BLACK}Show all road vehicles which have this station on their schedule
-STR_STATION_VIEW_SCHEDULED_AIRCRAFT_TOOLTIP :{BLACK}Show all aircraft which have this station on their schedule
-STR_STATION_VIEW_SCHEDULED_SHIPS_TOOLTIP :{BLACK}Show all ships which have this station on their schedule
-
-STR_STATION_VIEW_RENAME_STATION_CAPTION :Rename station/loading area
-
-STR_STATION_VIEW_CLOSE_AIRPORT :{BLACK}Close airport
-STR_STATION_VIEW_CLOSE_AIRPORT_TOOLTIP :{BLACK}Prevent aircraft from landing on this airport
-
-# Waypoint/buoy view window
-STR_WAYPOINT_VIEW_CAPTION :{WHITE}{WAYPOINT}
-STR_WAYPOINT_VIEW_CENTER_TOOLTIP :{BLACK}Centre main view on waypoint location. Ctrl+Click opens a new viewport on waypoint location
-STR_WAYPOINT_VIEW_CHANGE_WAYPOINT_NAME :{BLACK}Change waypoint name
-STR_BUOY_VIEW_CENTER_TOOLTIP :{BLACK}Centre main view on buoy location. Ctrl+Click opens a new viewport on buoy location
-STR_BUOY_VIEW_CHANGE_BUOY_NAME :{BLACK}Change buoy name
-
-STR_EDIT_WAYPOINT_NAME :{WHITE}Edit waypoint name
-
-# Finances window
-STR_FINANCES_CAPTION :{WHITE}{COMPANY} Finances {BLACK}{COMPANY_NUM}
-STR_FINANCES_EXPENDITURE_INCOME_TITLE :{WHITE}Expenditure/Income
-STR_FINANCES_YEAR :{WHITE}{NUM}
-STR_FINANCES_SECTION_CONSTRUCTION :{GOLD}Construction
-STR_FINANCES_SECTION_NEW_VEHICLES :{GOLD}New Vehicles
-STR_FINANCES_SECTION_TRAIN_RUNNING_COSTS :{GOLD}Train Running Costs
-STR_FINANCES_SECTION_ROAD_VEHICLE_RUNNING_COSTS :{GOLD}Road Vehicle Running Costs
-STR_FINANCES_SECTION_AIRCRAFT_RUNNING_COSTS :{GOLD}Aircraft Running Costs
-STR_FINANCES_SECTION_SHIP_RUNNING_COSTS :{GOLD}Ship Running Costs
-STR_FINANCES_SECTION_PROPERTY_MAINTENANCE :{GOLD}Property Maintenance
-STR_FINANCES_SECTION_TRAIN_INCOME :{GOLD}Train Income
-STR_FINANCES_SECTION_ROAD_VEHICLE_INCOME :{GOLD}Road Vehicle Income
-STR_FINANCES_SECTION_AIRCRAFT_INCOME :{GOLD}Aircraft Income
-STR_FINANCES_SECTION_SHIP_INCOME :{GOLD}Ship Income
-STR_FINANCES_SECTION_LOAN_INTEREST :{GOLD}Loan Interest
-STR_FINANCES_SECTION_OTHER :{GOLD}Other
-STR_FINANCES_NEGATIVE_INCOME :{BLACK}-{CURRENCY_LONG}
-STR_FINANCES_POSITIVE_INCOME :{BLACK}+{CURRENCY_LONG}
-STR_FINANCES_TOTAL_CAPTION :{WHITE}Total:
-STR_FINANCES_BANK_BALANCE_TITLE :{WHITE}Bank Balance
-STR_FINANCES_LOAN_TITLE :{WHITE}Loan
-STR_FINANCES_MAX_LOAN :{WHITE}Max Loan: {BLACK}{CURRENCY_LONG}
-STR_FINANCES_TOTAL_CURRENCY :{BLACK}{CURRENCY_LONG}
-STR_FINANCES_BORROW_BUTTON :{BLACK}Borrow {CURRENCY_LONG}
-STR_FINANCES_BORROW_TOOLTIP :{BLACK}Increase size of loan. Ctrl+Click borrows as much as possible
-STR_FINANCES_REPAY_BUTTON :{BLACK}Repay {CURRENCY_LONG}
-STR_FINANCES_REPAY_TOOLTIP :{BLACK}Repay part of loan. Ctrl+Click repays as much loan as possible
-STR_FINANCES_INFRASTRUCTURE_BUTTON :{BLACK}Infrastructure
-
-# Company view
-STR_COMPANY_VIEW_CAPTION :{WHITE}{COMPANY} {BLACK}{COMPANY_NUM}
-STR_COMPANY_VIEW_PRESIDENT_MANAGER_TITLE :{WHITE}{PRESIDENT_NAME}{}{GOLD}(Manager)
-
-STR_COMPANY_VIEW_INAUGURATED_TITLE :{GOLD}Inaugurated: {WHITE}{NUM}
-STR_COMPANY_VIEW_COLOUR_SCHEME_TITLE :{GOLD}Colour Scheme:
-STR_COMPANY_VIEW_VEHICLES_TITLE :{GOLD}Vehicles:
-STR_COMPANY_VIEW_TRAINS :{WHITE}{COMMA} train{P "" s}
-STR_COMPANY_VIEW_ROAD_VEHICLES :{WHITE}{COMMA} road vehicle{P "" s}
-STR_COMPANY_VIEW_AIRCRAFT :{WHITE}{COMMA} aircraft
-STR_COMPANY_VIEW_SHIPS :{WHITE}{COMMA} ship{P "" s}
-STR_COMPANY_VIEW_VEHICLES_NONE :{WHITE}None
-STR_COMPANY_VIEW_COMPANY_VALUE :{GOLD}Company value: {WHITE}{CURRENCY_LONG}
-STR_COMPANY_VIEW_SHARES_OWNED_BY :{WHITE}({COMMA}% owned by {COMPANY})
-STR_COMPANY_VIEW_INFRASTRUCTURE :{GOLD}Infrastructure:
-STR_COMPANY_VIEW_INFRASTRUCTURE_RAIL :{WHITE}{COMMA} rail piece{P "" s}
-STR_COMPANY_VIEW_INFRASTRUCTURE_ROAD :{WHITE}{COMMA} road piece{P "" s}
-STR_COMPANY_VIEW_INFRASTRUCTURE_WATER :{WHITE}{COMMA} water tile{P "" s}
-STR_COMPANY_VIEW_INFRASTRUCTURE_STATION :{WHITE}{COMMA} station tile{P "" s}
-STR_COMPANY_VIEW_INFRASTRUCTURE_AIRPORT :{WHITE}{COMMA} airport{P "" s}
-STR_COMPANY_VIEW_INFRASTRUCTURE_NONE :{WHITE}None
-
-STR_COMPANY_VIEW_BUILD_HQ_BUTTON :{BLACK}Build HQ
-STR_COMPANY_VIEW_BUILD_HQ_TOOLTIP :{BLACK}Build company headquarters
-STR_COMPANY_VIEW_VIEW_HQ_BUTTON :{BLACK}View HQ
-STR_COMPANY_VIEW_VIEW_HQ_TOOLTIP :{BLACK}View company headquarters
-STR_COMPANY_VIEW_RELOCATE_HQ :{BLACK}Relocate HQ
-STR_COMPANY_VIEW_RELOCATE_COMPANY_HEADQUARTERS :{BLACK}Rebuild company headquarters elsewhere for 1% cost of company value. Shift+Click shows estimated cost without relocating HQ
-STR_COMPANY_VIEW_INFRASTRUCTURE_BUTTON :{BLACK}Details
-STR_COMPANY_VIEW_INFRASTRUCTURE_TOOLTIP :{BLACK}View detailed infrastructure counts
-
-STR_COMPANY_VIEW_NEW_FACE_BUTTON :{BLACK}New Face
-STR_COMPANY_VIEW_NEW_FACE_TOOLTIP :{BLACK}Select new face for manager
-STR_COMPANY_VIEW_COLOUR_SCHEME_BUTTON :{BLACK}Colour Scheme
-STR_COMPANY_VIEW_COLOUR_SCHEME_TOOLTIP :{BLACK}Change the company vehicle livery
-STR_COMPANY_VIEW_COMPANY_NAME_BUTTON :{BLACK}Company Name
-STR_COMPANY_VIEW_COMPANY_NAME_TOOLTIP :{BLACK}Change the company name
-STR_COMPANY_VIEW_PRESIDENT_NAME_BUTTON :{BLACK}Manager Name
-STR_COMPANY_VIEW_PRESIDENT_NAME_TOOLTIP :{BLACK}Change the manager's name
-
-STR_COMPANY_VIEW_BUY_SHARE_BUTTON :{BLACK}Buy 25% share in company
-STR_COMPANY_VIEW_SELL_SHARE_BUTTON :{BLACK}Sell 25% share in company
-STR_COMPANY_VIEW_BUY_SHARE_TOOLTIP :{BLACK}Buy 25% share in this company. Shift+Click shows estimated cost without purchasing any share
-STR_COMPANY_VIEW_SELL_SHARE_TOOLTIP :{BLACK}Sell 25% share in this company. Shift+Click shows estimated income without selling any share
-
-STR_COMPANY_VIEW_COMPANY_NAME_QUERY_CAPTION :Company Name
-STR_COMPANY_VIEW_PRESIDENT_S_NAME_QUERY_CAPTION :Manager's Name
-
-STR_BUY_COMPANY_MESSAGE :{WHITE}We are looking for a transport company to take-over our company.{}{}Do you want to purchase {COMPANY} for {CURRENCY_LONG}?
-
-# Company infrastructure window
-STR_COMPANY_INFRASTRUCTURE_VIEW_CAPTION :{WHITE}Infrastructure of {COMPANY}
-STR_COMPANY_INFRASTRUCTURE_VIEW_RAIL_SECT :{GOLD}Rail pieces:
-STR_COMPANY_INFRASTRUCTURE_VIEW_SIGNALS :{WHITE}Signals
-STR_COMPANY_INFRASTRUCTURE_VIEW_ROAD_SECT :{GOLD}Road pieces:
-STR_COMPANY_INFRASTRUCTURE_VIEW_ROAD :{WHITE}Road
-STR_COMPANY_INFRASTRUCTURE_VIEW_TRAMWAY :{WHITE}Tramway
-STR_COMPANY_INFRASTRUCTURE_VIEW_WATER_SECT :{GOLD}Water tiles:
-STR_COMPANY_INFRASTRUCTURE_VIEW_CANALS :{WHITE}Canals
-STR_COMPANY_INFRASTRUCTURE_VIEW_STATION_SECT :{GOLD}Stations:
-STR_COMPANY_INFRASTRUCTURE_VIEW_STATIONS :{WHITE}Station tiles
-STR_COMPANY_INFRASTRUCTURE_VIEW_AIRPORTS :{WHITE}Airports
-STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL :{WHITE}{CURRENCY_LONG}/yr
-
-# Industry directory
-STR_INDUSTRY_DIRECTORY_CAPTION :{WHITE}Industries
-STR_INDUSTRY_DIRECTORY_NONE :{ORANGE}- None -
-STR_INDUSTRY_DIRECTORY_ITEM :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{RAW_STRING}){YELLOW} ({COMMA}% transported)
-STR_INDUSTRY_DIRECTORY_ITEM_TWO :{ORANGE}{INDUSTRY}{BLACK} ({CARGO_LONG}{RAW_STRING}/{CARGO_LONG}{RAW_STRING}){YELLOW} ({COMMA}%/{COMMA}% transported)
-STR_INDUSTRY_DIRECTORY_ITEM_NOPROD :{ORANGE}{INDUSTRY}
-STR_INDUSTRY_DIRECTORY_LIST_CAPTION :{BLACK}Industry names - click on name to centre main view on industry. Ctrl+Click opens a new viewport on industry location
-
-# Industry view
-STR_INDUSTRY_VIEW_CAPTION :{WHITE}{INDUSTRY}
-STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE :{BLACK}Production last month:
-STR_INDUSTRY_VIEW_TRANSPORTED :{YELLOW}{CARGO_LONG}{RAW_STRING}{BLACK} ({COMMA}% transported)
-STR_INDUSTRY_VIEW_LOCATION_TOOLTIP :{BLACK}Centre the main view on industry location. Ctrl+Click opens a new viewport on industry location
-STR_INDUSTRY_VIEW_PRODUCTION_LEVEL :{BLACK}Production level: {YELLOW}{COMMA}%
-STR_INDUSTRY_VIEW_INDUSTRY_ANNOUNCED_CLOSURE :{YELLOW}The industry has announced imminent closure!
-
-############ range for requires starts
-STR_INDUSTRY_VIEW_REQUIRES_CARGO :{BLACK}Requires: {YELLOW}{STRING}{RAW_STRING}
-STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO :{BLACK}Requires: {YELLOW}{STRING}{RAW_STRING}, {STRING}{RAW_STRING}
-STR_INDUSTRY_VIEW_REQUIRES_CARGO_CARGO_CARGO :{BLACK}Requires: {YELLOW}{STRING}{RAW_STRING}, {STRING}{RAW_STRING}, {STRING}{RAW_STRING}
-############ range for requires ends
-
-############ range for produces starts
-STR_INDUSTRY_VIEW_WAITING_FOR_PROCESSING :{BLACK}Cargo waiting to be processed:
-STR_INDUSTRY_VIEW_WAITING_STOCKPILE_CARGO :{YELLOW}{CARGO_LONG}{RAW_STRING}{BLACK}
-STR_INDUSTRY_VIEW_PRODUCES_CARGO :{BLACK}Produces: {YELLOW}{STRING}{RAW_STRING}
-STR_INDUSTRY_VIEW_PRODUCES_CARGO_CARGO :{BLACK}Produces: {YELLOW}{STRING}{RAW_STRING}, {STRING}{RAW_STRING}
-############ range for produces ends
-
-STR_CONFIG_GAME_PRODUCTION :{WHITE}Change production (multiple of 8, up to 2040)
-STR_CONFIG_GAME_PRODUCTION_LEVEL :{WHITE}Change production level (percentage, up to 800%)
-
-# Vehicle lists
-STR_VEHICLE_LIST_TRAIN_CAPTION :{WHITE}{STRING2} - {COMMA} Train{P "" s}
-STR_VEHICLE_LIST_ROAD_VEHICLE_CAPTION :{WHITE}{STRING2} - {COMMA} Road Vehicle{P "" s}
-STR_VEHICLE_LIST_SHIP_CAPTION :{WHITE}{STRING2} - {COMMA} Ship{P "" s}
-STR_VEHICLE_LIST_AIRCRAFT_CAPTION :{WHITE}{STRING2} - {COMMA} Aircraft
-
-STR_VEHICLE_LIST_TRAIN_LIST_TOOLTIP :{BLACK}Trains - click on train for information
-STR_VEHICLE_LIST_ROAD_VEHICLE_TOOLTIP :{BLACK}Road vehicles - click on vehicle for information
-STR_VEHICLE_LIST_SHIP_TOOLTIP :{BLACK}Ships - click on ship for information
-STR_VEHICLE_LIST_AIRCRAFT_TOOLTIP :{BLACK}Aircraft - click on aircraft for information
-
-STR_VEHICLE_LIST_PROFIT_THIS_YEAR_LAST_YEAR :{TINY_FONT}{BLACK}Profit this year: {CURRENCY_LONG} (last year: {CURRENCY_LONG})
-
-STR_VEHICLE_LIST_AVAILABLE_TRAINS :Available Trains
-STR_VEHICLE_LIST_AVAILABLE_ROAD_VEHICLES :Available Vehicles
-STR_VEHICLE_LIST_AVAILABLE_SHIPS :Available Ships
-STR_VEHICLE_LIST_AVAILABLE_AIRCRAFT :Available Aircraft
-STR_VEHICLE_LIST_AVAILABLE_ENGINES_TOOLTIP :{BLACK}See a list of available engine designs for this vehicle type
-
-STR_VEHICLE_LIST_MANAGE_LIST :{BLACK}Manage list
-STR_VEHICLE_LIST_MANAGE_LIST_TOOLTIP :{BLACK}Send instructions to all vehicles in this list
-STR_VEHICLE_LIST_REPLACE_VEHICLES :Replace vehicles
-STR_VEHICLE_LIST_SEND_FOR_SERVICING :Send for Servicing
-
-STR_VEHICLE_LIST_SEND_TRAIN_TO_DEPOT :Send to Depot
-STR_VEHICLE_LIST_SEND_ROAD_VEHICLE_TO_DEPOT :Send to Depot
-STR_VEHICLE_LIST_SEND_SHIP_TO_DEPOT :Send to Depot
-STR_VEHICLE_LIST_SEND_AIRCRAFT_TO_HANGAR :Send to Hangar
-
-STR_VEHICLE_LIST_MASS_STOP_LIST_TOOLTIP :{BLACK}Click to stop all the vehicles in the list
-STR_VEHICLE_LIST_MASS_START_LIST_TOOLTIP :{BLACK}Click to start all the vehicles in the list
-
-STR_VEHICLE_LIST_SHARED_ORDERS_LIST_CAPTION :{WHITE}Shared orders of {COMMA} Vehicle{P "" s}
-
-# Group window
-STR_GROUP_ALL_TRAINS :All trains
-STR_GROUP_ALL_ROAD_VEHICLES :All road vehicles
-STR_GROUP_ALL_SHIPS :All ships
-STR_GROUP_ALL_AIRCRAFTS :All aircraft
-
-STR_GROUP_DEFAULT_TRAINS :Ungrouped trains
-STR_GROUP_DEFAULT_ROAD_VEHICLES :Ungrouped road vehicles
-STR_GROUP_DEFAULT_SHIPS :Ungrouped ships
-STR_GROUP_DEFAULT_AIRCRAFTS :Ungrouped aircraft
-
-STR_GROUPS_CLICK_ON_GROUP_FOR_TOOLTIP :{BLACK}Groups - click on a group to list all vehicles of this group
-STR_GROUP_CREATE_TOOLTIP :{BLACK}Click to create a group
-STR_GROUP_DELETE_TOOLTIP :{BLACK}Delete the selected group
-STR_GROUP_RENAME_TOOLTIP :{BLACK}Rename the selected group
-STR_GROUP_REPLACE_PROTECTION_TOOLTIP :{BLACK}Click to protect this group from global autoreplace
-
-STR_GROUP_ADD_SHARED_VEHICLE :Add shared vehicles
-STR_GROUP_REMOVE_ALL_VEHICLES :Remove all vehicles
-
-STR_GROUP_RENAME_CAPTION :{BLACK}Rename a group
-
-# Build vehicle window
-STR_BUY_VEHICLE_TRAIN_RAIL_CAPTION :New Rail Vehicles
-STR_BUY_VEHICLE_TRAIN_ELRAIL_CAPTION :New Electric Rail Vehicles
-STR_BUY_VEHICLE_TRAIN_MONORAIL_CAPTION :New Monorail Vehicles
-STR_BUY_VEHICLE_TRAIN_MAGLEV_CAPTION :New Maglev Vehicles
-
-STR_BUY_VEHICLE_TRAIN_ALL_CAPTION :New Rail Vehicles
-STR_BUY_VEHICLE_ROAD_VEHICLE_CAPTION :New Road Vehicles
-STR_BUY_VEHICLE_SHIP_CAPTION :New Ships
-STR_BUY_VEHICLE_AIRCRAFT_CAPTION :New Aircraft
-
-STR_PURCHASE_INFO_COST_WEIGHT :{BLACK}Cost: {GOLD}{CURRENCY_LONG}{BLACK} Weight: {GOLD}{WEIGHT_SHORT}
-STR_PURCHASE_INFO_SPEED_POWER :{BLACK}Speed: {GOLD}{VELOCITY}{BLACK} Power: {GOLD}{POWER}
-STR_PURCHASE_INFO_SPEED :{BLACK}Speed: {GOLD}{VELOCITY}
-STR_PURCHASE_INFO_SPEED_OCEAN :{BLACK}Speed on ocean: {GOLD}{VELOCITY}
-STR_PURCHASE_INFO_SPEED_CANAL :{BLACK}Speed on canal/river: {GOLD}{VELOCITY}
-STR_PURCHASE_INFO_RUNNINGCOST :{BLACK}Running Cost: {GOLD}{CURRENCY_LONG}/yr
-STR_PURCHASE_INFO_CAPACITY :{BLACK}Capacity: {GOLD}{CARGO_LONG} {STRING}
-STR_PURCHASE_INFO_REFITTABLE :(refittable)
-STR_PURCHASE_INFO_DESIGNED_LIFE :{BLACK}Designed: {GOLD}{NUM}{BLACK} Life: {GOLD}{COMMA} year{P "" s}
-STR_PURCHASE_INFO_RELIABILITY :{BLACK}Max. Reliability: {GOLD}{COMMA}%
-STR_PURCHASE_INFO_COST :{BLACK}Cost: {GOLD}{CURRENCY_LONG}
-STR_PURCHASE_INFO_WEIGHT_CWEIGHT :{BLACK}Weight: {GOLD}{WEIGHT_SHORT} ({WEIGHT_SHORT})
-STR_PURCHASE_INFO_COST_SPEED :{BLACK}Cost: {GOLD}{CURRENCY_LONG}{BLACK} Speed: {GOLD}{VELOCITY}
-STR_PURCHASE_INFO_AIRCRAFT_CAPACITY :{BLACK}Capacity: {GOLD}{CARGO_LONG}, {CARGO_LONG}
-STR_PURCHASE_INFO_PWAGPOWER_PWAGWEIGHT :{BLACK}Powered Wagons: {GOLD}+{POWER}{BLACK} Weight: {GOLD}+{WEIGHT_SHORT}
-STR_PURCHASE_INFO_REFITTABLE_TO :{BLACK}Refittable to: {GOLD}{STRING2}
-STR_PURCHASE_INFO_ALL_TYPES :All cargo types
-STR_PURCHASE_INFO_ALL_BUT :All but {CARGO_LIST}
-STR_PURCHASE_INFO_MAX_TE :{BLACK}Max. Tractive Effort: {GOLD}{FORCE}
-STR_PURCHASE_INFO_AIRCRAFT_RANGE :{BLACK}Range: {GOLD}{COMMA} tiles
-
-STR_BUY_VEHICLE_TRAIN_LIST_TOOLTIP :{BLACK}Train vehicle selection list - click on vehicle for information
-STR_BUY_VEHICLE_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Road vehicle selection list - click on vehicle for information
-STR_BUY_VEHICLE_SHIP_LIST_TOOLTIP :{BLACK}Ship selection list - click on ship for information
-STR_BUY_VEHICLE_AIRCRAFT_LIST_TOOLTIP :{BLACK}Aircraft selection list - click on aircraft for information
-
-STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_BUTTON :{BLACK}Buy Vehicle
-STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_VEHICLE_BUTTON :{BLACK}Buy Vehicle
-STR_BUY_VEHICLE_SHIP_BUY_VEHICLE_BUTTON :{BLACK}Buy Ship
-STR_BUY_VEHICLE_AIRCRAFT_BUY_VEHICLE_BUTTON :{BLACK}Buy Aircraft
-
-STR_BUY_VEHICLE_TRAIN_BUY_VEHICLE_TOOLTIP :{BLACK}Buy the highlighted train vehicle. Shift+Click shows estimated cost without purchase
-STR_BUY_VEHICLE_ROAD_VEHICLE_BUY_VEHICLE_TOOLTIP :{BLACK}Buy the highlighted road vehicle. Shift+Click shows estimated cost without purchase
-STR_BUY_VEHICLE_SHIP_BUY_VEHICLE_TOOLTIP :{BLACK}Buy the highlighted ship. Shift+Click shows estimated cost without purchase
-STR_BUY_VEHICLE_AIRCRAFT_BUY_VEHICLE_TOOLTIP :{BLACK}Buy the highlighted aircraft. Shift+Click shows estimated cost without purchase
-
-STR_BUY_VEHICLE_TRAIN_RENAME_BUTTON :{BLACK}Rename
-STR_BUY_VEHICLE_ROAD_VEHICLE_RENAME_BUTTON :{BLACK}Rename
-STR_BUY_VEHICLE_SHIP_RENAME_BUTTON :{BLACK}Rename
-STR_BUY_VEHICLE_AIRCRAFT_RENAME_BUTTON :{BLACK}Rename
-
-STR_BUY_VEHICLE_TRAIN_RENAME_TOOLTIP :{BLACK}Rename train vehicle type
-STR_BUY_VEHICLE_ROAD_VEHICLE_RENAME_TOOLTIP :{BLACK}Rename road vehicle type
-STR_BUY_VEHICLE_SHIP_RENAME_TOOLTIP :{BLACK}Rename ship type
-STR_BUY_VEHICLE_AIRCRAFT_RENAME_TOOLTIP :{BLACK}Rename aircraft type
-
-STR_QUERY_RENAME_TRAIN_TYPE_CAPTION :{WHITE}Rename train vehicle type
-STR_QUERY_RENAME_ROAD_VEHICLE_TYPE_CAPTION :{WHITE}Rename road vehicle type
-STR_QUERY_RENAME_SHIP_TYPE_CAPTION :{WHITE}Rename ship type
-STR_QUERY_RENAME_AIRCRAFT_TYPE_CAPTION :{WHITE}Rename aircraft type
-
-# Depot window
-STR_DEPOT_CAPTION :{WHITE}{DEPOT}
-
-STR_DEPOT_RENAME_TOOLTIP :{BLACK}Change name of depot
-STR_DEPOT_RENAME_DEPOT_CAPTION :Rename depot
-
-STR_DEPOT_NO_ENGINE :{BLACK}-
-STR_DEPOT_VEHICLE_TOOLTIP :{BLACK}{ENGINE}{RAW_STRING}
-STR_DEPOT_VEHICLE_TOOLTIP_CHAIN :{BLACK}{NUM} vehicle{P "" s}{RAW_STRING}
-STR_DEPOT_VEHICLE_TOOLTIP_CARGO :{}{CARGO_LONG} ({CARGO_SHORT})
-
-STR_DEPOT_TRAIN_LIST_TOOLTIP :{BLACK}Trains - drag vehicle with left-click to add/remove from train, right-click for information. Hold Ctrl to make both functions apply to the following chain
-STR_DEPOT_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Vehicles - right-click on vehicle for information
-STR_DEPOT_SHIP_LIST_TOOLTIP :{BLACK}Ships - right-click on ship for information
-STR_DEPOT_AIRCRAFT_LIST_TOOLTIP :{BLACK}Aircraft - right-click on aircraft for information
-
-STR_DEPOT_TRAIN_SELL_TOOLTIP :{BLACK}Drag train vehicle to here to sell it
-STR_DEPOT_ROAD_VEHICLE_SELL_TOOLTIP :{BLACK}Drag road vehicle to here to sell it
-STR_DEPOT_SHIP_SELL_TOOLTIP :{BLACK}Drag ship to here to sell it
-STR_DEPOT_AIRCRAFT_SELL_TOOLTIP :{BLACK}Drag aircraft to here to sell it
-
-STR_DEPOT_DRAG_WHOLE_TRAIN_TO_SELL_TOOLTIP :{BLACK}Drag train engine here to sell the whole train
-
-STR_DEPOT_SELL_ALL_BUTTON_TRAIN_TOOLTIP :{BLACK}Sell all trains in the depot
-STR_DEPOT_SELL_ALL_BUTTON_ROAD_VEHICLE_TOOLTIP :{BLACK}Sell all road vehicles in the depot
-STR_DEPOT_SELL_ALL_BUTTON_SHIP_TOOLTIP :{BLACK}Sell all ships in the depot
-STR_DEPOT_SELL_ALL_BUTTON_AIRCRAFT_TOOLTIP :{BLACK}Sell all aircraft in the hangar
-
-STR_DEPOT_AUTOREPLACE_TRAIN_TOOLTIP :{BLACK}Autoreplace all trains in the depot
-STR_DEPOT_AUTOREPLACE_ROAD_VEHICLE_TOOLTIP :{BLACK}Autoreplace all road vehicles in the depot
-STR_DEPOT_AUTOREPLACE_SHIP_TOOLTIP :{BLACK}Autoreplace all ships in the depot
-STR_DEPOT_AUTOREPLACE_AIRCRAFT_TOOLTIP :{BLACK}Autoreplace all aircraft in the hangar
-
-STR_DEPOT_TRAIN_NEW_VEHICLES_BUTTON :{BLACK}New Vehicles
-STR_DEPOT_ROAD_VEHICLE_NEW_VEHICLES_BUTTON :{BLACK}New Vehicles
-STR_DEPOT_SHIP_NEW_VEHICLES_BUTTON :{BLACK}New Ships
-STR_DEPOT_AIRCRAFT_NEW_VEHICLES_BUTTON :{BLACK}New Aircraft
-
-STR_DEPOT_TRAIN_NEW_VEHICLES_TOOLTIP :{BLACK}Buy new train vehicle
-STR_DEPOT_ROAD_VEHICLE_NEW_VEHICLES_TOOLTIP :{BLACK}Buy new road vehicle
-STR_DEPOT_SHIP_NEW_VEHICLES_TOOLTIP :{BLACK}Buy new ship
-STR_DEPOT_AIRCRAFT_NEW_VEHICLES_TOOLTIP :{BLACK}Buy new aircraft
-
-STR_DEPOT_CLONE_TRAIN :{BLACK}Clone Train
-STR_DEPOT_CLONE_ROAD_VEHICLE :{BLACK}Clone Vehicle
-STR_DEPOT_CLONE_SHIP :{BLACK}Clone Ship
-STR_DEPOT_CLONE_AIRCRAFT :{BLACK}Clone Aircraft
-
-STR_DEPOT_CLONE_TRAIN_DEPOT_INFO :{BLACK}This will buy a copy of a train including all cars. Click this button and then on a train inside or outside the depot. Ctrl+Click share the orders. Shift+Click shows estimated cost without purchase
-STR_DEPOT_CLONE_ROAD_VEHICLE_DEPOT_INFO :{BLACK}This will buy a copy of a road vehicle. Click this button and then on a road vehicle inside or outside the depot. Ctrl+Click will share the orders. Shift+Click shows estimated cost without purchase
-STR_DEPOT_CLONE_SHIP_DEPOT_INFO :{BLACK}This will buy a copy of a ship. Click this button and then on a ship inside or outside the depot. Ctrl+Click will share the orders. Shift+Click shows estimated cost without purchase
-STR_DEPOT_CLONE_AIRCRAFT_INFO_HANGAR_WINDOW :{BLACK}This will buy a copy of an aircraft. Click this button and then on an aircraft inside or outside the hangar. Ctrl+Click will share the orders. Shift+Click shows estimated cost without purchase
-
-STR_DEPOT_TRAIN_LOCATION_TOOLTIP :{BLACK}Centre main view on train depot location. Ctrl+Click opens a new viewport on train depot location
-STR_DEPOT_ROAD_VEHICLE_LOCATION_TOOLTIP :{BLACK}Centre main view on road vehicle depot location. Ctrl+Click opens a new viewport on road depot location
-STR_DEPOT_SHIP_LOCATION_TOOLTIP :{BLACK}Centre main view on ship depot location. Ctrl+Click opens a new viewport on ship depot location
-STR_DEPOT_AIRCRAFT_LOCATION_TOOLTIP :{BLACK}Centre main view on hangar location. Ctrl+Click opens a new viewport on hangar location
-
-STR_DEPOT_VEHICLE_ORDER_LIST_TRAIN_TOOLTIP :{BLACK}Get a list of all trains with the current depot in their orders
-STR_DEPOT_VEHICLE_ORDER_LIST_ROAD_VEHICLE_TOOLTIP :{BLACK}Get a list of all road vehicles with the current depot in their orders
-STR_DEPOT_VEHICLE_ORDER_LIST_SHIP_TOOLTIP :{BLACK}Get a list of all ships with the current depot in their orders
-STR_DEPOT_VEHICLE_ORDER_LIST_AIRCRAFT_TOOLTIP :{BLACK}Get a list of all aircraft with any hangar at this airport in their orders
-
-STR_DEPOT_MASS_STOP_DEPOT_TRAIN_TOOLTIP :{BLACK}Click to stop all the trains inside the depot
-STR_DEPOT_MASS_STOP_DEPOT_ROAD_VEHICLE_TOOLTIP :{BLACK}Click to stop all the road vehicles inside the depot
-STR_DEPOT_MASS_STOP_DEPOT_SHIP_TOOLTIP :{BLACK}Click to stop all the ships inside the depot
-STR_DEPOT_MASS_STOP_HANGAR_TOOLTIP :{BLACK}Click to stop all the aircraft inside the hangar
-
-STR_DEPOT_MASS_START_DEPOT_TRAIN_TOOLTIP :{BLACK}Click to start all the trains inside the depot
-STR_DEPOT_MASS_START_DEPOT_ROAD_VEHICLE_TOOLTIP :{BLACK}Click to start all the road vehicles inside the depot
-STR_DEPOT_MASS_START_DEPOT_SHIP_TOOLTIP :{BLACK}Click to start all the ships inside the depot
-STR_DEPOT_MASS_START_HANGAR_TOOLTIP :{BLACK}Click to start all the aircraft inside the hangar
-
-STR_DEPOT_SELL_CONFIRMATION_TEXT :{YELLOW}You are about to sell all the vehicles in the depot. Are you sure?
-
-# Engine preview window
-STR_ENGINE_PREVIEW_CAPTION :{WHITE}Message from vehicle manufacturer
-STR_ENGINE_PREVIEW_MESSAGE :{GOLD}We have just designed a new {STRING} - would you be interested in a year's exclusive use of this vehicle, so we can see how it performs before making it universally available?
-STR_ENGINE_PREVIEW_RAILROAD_LOCOMOTIVE :railway locomotive
-STR_ENGINE_PREVIEW_ROAD_VEHICLE :road vehicle
-STR_ENGINE_PREVIEW_AIRCRAFT :aircraft
-STR_ENGINE_PREVIEW_SHIP :ship
-STR_ENGINE_PREVIEW_MONORAIL_LOCOMOTIVE :monorail locomotive
-STR_ENGINE_PREVIEW_MAGLEV_LOCOMOTIVE :maglev locomotive
-
-STR_ENGINE_PREVIEW_COST_WEIGHT_SPEED_POWER :{BLACK}Cost: {CURRENCY_LONG} Weight: {WEIGHT_SHORT}{}Speed: {VELOCITY} Power: {POWER}{}Running Cost: {CURRENCY_LONG}/yr{}Capacity: {CARGO_LONG}
-STR_ENGINE_PREVIEW_COST_WEIGHT_SPEED_POWER_MAX_TE :{BLACK}Cost: {CURRENCY_LONG} Weight: {WEIGHT_SHORT}{}Speed: {VELOCITY} Power: {POWER} Max. T.E.: {6:FORCE}{}Running Cost: {4:CURRENCY_LONG}/yr{}Capacity: {5:CARGO_LONG}
-STR_ENGINE_PREVIEW_COST_MAX_SPEED_CAPACITY_CAPACITY_RUNCOST :{BLACK}Cost: {CURRENCY_LONG} Max. Speed: {VELOCITY}{}Capacity: {CARGO_LONG}, {CARGO_LONG}{}Running Cost: {CURRENCY_LONG}/yr
-STR_ENGINE_PREVIEW_COST_MAX_SPEED_CAPACITY_RUNCOST :{BLACK}Cost: {CURRENCY_LONG} Max. Speed: {VELOCITY}{}Capacity: {CARGO_LONG}{}Running Cost: {CURRENCY_LONG}/yr
-STR_ENGINE_PREVIEW_COST_MAX_SPEED_RANGE_CAPACITY_CAPACITY_RUNCOST:{BLACK}Cost: {CURRENCY_LONG} Max. Speed: {VELOCITY} Range: {COMMA} tiles{}Capacity: {CARGO_LONG}, {CARGO_LONG}{}Running Cost: {CURRENCY_LONG}/yr
-STR_ENGINE_PREVIEW_COST_MAX_SPEED_RANGE_CAPACITY_RUNCOST :{BLACK}Cost: {CURRENCY_LONG} Max. Speed: {VELOCITY} Range: {COMMA} tiles{}Capacity: {CARGO_LONG}{}Running Cost: {CURRENCY_LONG}/yr
-
-# Autoreplace window
-STR_REPLACE_VEHICLES_WHITE :{WHITE}Replace {STRING} - {STRING1}
-STR_REPLACE_VEHICLE_TRAIN :Train
-STR_REPLACE_VEHICLE_ROAD_VEHICLE :Road Vehicle
-STR_REPLACE_VEHICLE_SHIP :Ship
-STR_REPLACE_VEHICLE_AIRCRAFT :Aircraft
-
-STR_REPLACE_HELP_LEFT_ARRAY :{BLACK}Select the engine type to replace
-STR_REPLACE_HELP_RIGHT_ARRAY :{BLACK}Select the new engine type you would like to use in place of the left selected engine type
-
-STR_REPLACE_VEHICLES_START :{BLACK}Start Replacing Vehicles
-STR_REPLACE_VEHICLES_NOW :Replace all vehicles now
-STR_REPLACE_VEHICLES_WHEN_OLD :Replace only old vehicles
-STR_REPLACE_HELP_START_BUTTON :{BLACK}Press to begin replacement of the left selected engine type with the right selected engine type
-STR_REPLACE_NOT_REPLACING :{BLACK}Not replacing
-STR_REPLACE_NOT_REPLACING_VEHICLE_SELECTED :{BLACK}No vehicle selected
-STR_REPLACE_REPLACING_WHEN_OLD :{ENGINE} when old
-STR_REPLACE_VEHICLES_STOP :{BLACK}Stop Replacing Vehicles
-STR_REPLACE_HELP_STOP_BUTTON :{BLACK}Press to stop the replacement of the engine type selected on the left
-
-STR_REPLACE_ENGINE_WAGON_SELECT :{BLACK}Replacing: {ORANGE}{STRING}
-STR_REPLACE_ENGINE_WAGON_SELECT_HELP :{BLACK}Switch between engine and wagon replacement windows
-STR_REPLACE_ENGINES :Engines
-STR_REPLACE_WAGONS :Wagons
-
-STR_REPLACE_HELP_RAILTYPE :{BLACK}Choose the rail type you want to replace engines for
-STR_REPLACE_HELP_REPLACE_INFO_TAB :{BLACK}Displays which engine the left selected engine is being replaced with, if any
-STR_REPLACE_RAIL_VEHICLES :Rail Vehicles
-STR_REPLACE_ELRAIL_VEHICLES :Electrified Rail Vehicles
-STR_REPLACE_MONORAIL_VEHICLES :Monorail Vehicles
-STR_REPLACE_MAGLEV_VEHICLES :Maglev Vehicles
-
-STR_REPLACE_REMOVE_WAGON :{BLACK}Wagon removal: {ORANGE}{STRING}
-STR_REPLACE_REMOVE_WAGON_HELP :{BLACK}Make autoreplace keep the length of a train the same by removing wagons (starting at the front), if replacing the engine would make the train longer
-
-# Vehicle view
-STR_VEHICLE_VIEW_CAPTION :{WHITE}{VEHICLE}
-
-STR_VEHICLE_VIEW_TRAIN_LOCATION_TOOLTIP :{BLACK}Centre main view on train's location. Ctrl+Click will follow train in main view
-STR_VEHICLE_VIEW_ROAD_VEHICLE_LOCATION_TOOLTIP :{BLACK}Centre main view on vehicle's location. Ctrl+Click will follow vehicle in main view
-STR_VEHICLE_VIEW_SHIP_LOCATION_TOOLTIP :{BLACK}Centre main view on ship's location. Ctrl+Click will follow ship in main view
-STR_VEHICLE_VIEW_AIRCRAFT_LOCATION_TOOLTIP :{BLACK}Centre main view on aircraft's location. Ctrl+Click will follow aircraft in main view
-
-STR_VEHICLE_VIEW_TRAIN_SEND_TO_DEPOT_TOOLTIP :{BLACK}Send train to depot. Ctrl+Click will only service
-STR_VEHICLE_VIEW_ROAD_VEHICLE_SEND_TO_DEPOT_TOOLTIP :{BLACK}Send vehicle to depot. Ctrl+Click will only service
-STR_VEHICLE_VIEW_SHIP_SEND_TO_DEPOT_TOOLTIP :{BLACK}Send ship to depot. Ctrl+Click will only service
-STR_VEHICLE_VIEW_AIRCRAFT_SEND_TO_DEPOT_TOOLTIP :{BLACK}Send aircraft to hangar. Ctrl+Click will only service
-
-STR_VEHICLE_VIEW_CLONE_TRAIN_INFO :{BLACK}This will buy a copy of the train including all cars. Ctrl+Click will share the orders. Shift+Click shows estimated cost without purchase
-STR_VEHICLE_VIEW_CLONE_ROAD_VEHICLE_INFO :{BLACK}This will buy a copy of the road vehicle. Ctrl+Click will share the orders. Shift+Click shows estimated cost without purchase
-STR_VEHICLE_VIEW_CLONE_SHIP_INFO :{BLACK}This will buy a copy of the ship. Ctrl+Click will share the orders. Shift+Click shows estimated cost without purchase
-STR_VEHICLE_VIEW_CLONE_AIRCRAFT_INFO :{BLACK}This will buy a copy of the aircraft. Ctrl+Click will share the orders. Shift+Click shows estimated cost without purchase
-
-STR_VEHICLE_VIEW_TRAIN_IGNORE_SIGNAL_TOOLTIP :{BLACK}Force train to proceed without waiting for signal to clear it
-
-STR_VEHICLE_VIEW_TRAIN_REFIT_TOOLTIP :{BLACK}Refit train to carry a different cargo type
-STR_VEHICLE_VIEW_ROAD_VEHICLE_REFIT_TOOLTIP :{BLACK}Refit road vehicle to carry a different cargo type
-STR_VEHICLE_VIEW_SHIP_REFIT_TOOLTIP :{BLACK}Refit ship to carry a different cargo type
-STR_VEHICLE_VIEW_AIRCRAFT_REFIT_TOOLTIP :{BLACK}Refit aircraft to carry a different cargo type
-
-STR_VEHICLE_VIEW_TRAIN_REVERSE_TOOLTIP :{BLACK}Reverse direction of train
-STR_VEHICLE_VIEW_ROAD_VEHICLE_REVERSE_TOOLTIP :{BLACK}Force vehicle to turn around
-
-STR_VEHICLE_VIEW_TRAIN_ORDERS_TOOLTIP :{BLACK}Show train's orders. Ctrl+Click to show train's timetable
-STR_VEHICLE_VIEW_ROAD_VEHICLE_ORDERS_TOOLTIP :{BLACK}Show vehicle's orders. Ctrl+Click to show vehicle's timetable
-STR_VEHICLE_VIEW_SHIP_ORDERS_TOOLTIP :{BLACK}Show ship's orders. Ctrl+Click to show ship's timetable
-STR_VEHICLE_VIEW_AIRCRAFT_ORDERS_TOOLTIP :{BLACK}Show aircraft's orders. Ctrl+Click to show aircraft's timetable
-
-STR_VEHICLE_VIEW_TRAIN_SHOW_DETAILS_TOOLTIP :{BLACK}Show train details
-STR_VEHICLE_VIEW_ROAD_VEHICLE_SHOW_DETAILS_TOOLTIP :{BLACK}Show road vehicle details
-STR_VEHICLE_VIEW_SHIP_SHOW_DETAILS_TOOLTIP :{BLACK}Show ship details
-STR_VEHICLE_VIEW_AIRCRAFT_SHOW_DETAILS_TOOLTIP :{BLACK}Show aircraft details
-
-STR_VEHICLE_VIEW_TRAIN_STATE_START_STOP_TOOLTIP :{BLACK}Current train action - click to stop/start train. Ctrl+Click to scroll to destination
-STR_VEHICLE_VIEW_ROAD_VEHICLE_STATE_START_STOP_TOOLTIP :{BLACK}Current vehicle action - click to stop/start vehicle. Ctrl+Click to scroll to destination
-STR_VEHICLE_VIEW_SHIP_STATE_START_STOP_TOOLTIP :{BLACK}Current ship action - click to stop/start ship. Ctrl+Click to scroll to destination
-STR_VEHICLE_VIEW_AIRCRAFT_STATE_START_STOP_TOOLTIP :{BLACK}Current aircraft action - click to stop/start aircraft. Ctrl+Click to scroll to destination
-
-# Messages in the start stop button in the vehicle view
-STR_VEHICLE_STATUS_LOADING_UNLOADING :{LTBLUE}Loading / Unloading
-STR_VEHICLE_STATUS_LEAVING :{LTBLUE}Leaving
-STR_VEHICLE_STATUS_CRASHED :{RED}Crashed!
-STR_VEHICLE_STATUS_BROKEN_DOWN :{RED}Broken down
-STR_VEHICLE_STATUS_STOPPED :{RED}Stopped
-STR_VEHICLE_STATUS_TRAIN_STOPPING_VEL :{RED}Stopping, {VELOCITY}
-STR_VEHICLE_STATUS_TRAIN_NO_POWER :{RED}No power
-STR_VEHICLE_STATUS_TRAIN_STUCK :{ORANGE}Waiting for free path
-STR_VEHICLE_STATUS_AIRCRAFT_TOO_FAR :{ORANGE}Too far to next destination
-
-STR_VEHICLE_STATUS_HEADING_FOR_STATION_VEL :{LTBLUE}Heading for {STATION}, {VELOCITY}
-STR_VEHICLE_STATUS_NO_ORDERS_VEL :{LTBLUE}No orders, {VELOCITY}
-STR_VEHICLE_STATUS_HEADING_FOR_WAYPOINT_VEL :{LTBLUE}Heading for {WAYPOINT}, {VELOCITY}
-STR_VEHICLE_STATUS_HEADING_FOR_DEPOT_VEL :{ORANGE}Heading for {DEPOT}, {VELOCITY}
-STR_VEHICLE_STATUS_HEADING_FOR_DEPOT_SERVICE_VEL :{LTBLUE}Service at {DEPOT}, {VELOCITY}
-
-# Vehicle stopped/started animations
-STR_VEHICLE_COMMAND_STOPPED_SMALL :{TINY_FONT}{RED}Stopped
-STR_VEHICLE_COMMAND_STOPPED :{RED}Stopped
-STR_VEHICLE_COMMAND_STARTED_SMALL :{TINY_FONT}{GREEN}Started
-STR_VEHICLE_COMMAND_STARTED :{GREEN}Started
-
-# Vehicle details
-STR_VEHICLE_DETAILS_CAPTION :{WHITE}{VEHICLE} (Details)
-STR_VEHICLE_NAME_BUTTON :{BLACK}Name
-
-STR_VEHICLE_DETAILS_TRAIN_RENAME :{BLACK}Name train
-STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Name road vehicle
-STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Name ship
-STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Name aircraft
-
-STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Age: {LTBLUE}{STRING2}{BLACK} Running Cost: {LTBLUE}{CURRENCY_LONG}/yr
-# The next two need to stay in this order
-STR_VEHICLE_INFO_AGE :{COMMA} year{P "" s} ({COMMA})
-STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} year{P "" s} ({COMMA})
-
-STR_VEHICLE_INFO_MAX_SPEED :{BLACK}Max. speed: {LTBLUE}{VELOCITY}
-STR_VEHICLE_INFO_MAX_SPEED_RANGE :{BLACK}Max. speed: {LTBLUE}{VELOCITY} {BLACK}Range: {LTBLUE}{COMMA} tiles
-STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED :{BLACK}Weight: {LTBLUE}{WEIGHT_SHORT} {BLACK}Power: {LTBLUE}{POWER}{BLACK} Max. speed: {LTBLUE}{VELOCITY}
-STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED_MAX_TE :{BLACK}Weight: {LTBLUE}{WEIGHT_SHORT} {BLACK}Power: {LTBLUE}{POWER}{BLACK} Max. speed: {LTBLUE}{VELOCITY} {BLACK}Max. T.E.: {LTBLUE}{FORCE}
-
-STR_VEHICLE_INFO_PROFIT_THIS_YEAR_LAST_YEAR :{BLACK}Profit this year: {LTBLUE}{CURRENCY_LONG} (last year: {CURRENCY_LONG})
-STR_VEHICLE_INFO_RELIABILITY_BREAKDOWNS :{BLACK}Reliability: {LTBLUE}{COMMA}% {BLACK}Breakdowns since last service: {LTBLUE}{COMMA}
-
-STR_VEHICLE_INFO_BUILT_VALUE :{LTBLUE}{ENGINE} {BLACK}Built: {LTBLUE}{NUM}{BLACK} Value: {LTBLUE}{CURRENCY_LONG}
-STR_VEHICLE_INFO_NO_CAPACITY :{BLACK}Capacity: {LTBLUE}None{STRING}
-STR_VEHICLE_INFO_CAPACITY :{BLACK}Capacity: {LTBLUE}{CARGO_LONG}{3:STRING}
-STR_VEHICLE_INFO_CAPACITY_MULT :{BLACK}Capacity: {LTBLUE}{CARGO_LONG}{3:STRING} (x{4:NUM})
-STR_VEHICLE_INFO_CAPACITY_CAPACITY :{BLACK}Capacity: {LTBLUE}{CARGO_LONG}, {CARGO_LONG}{STRING}
-
-STR_VEHICLE_INFO_FEEDER_CARGO_VALUE :{BLACK}Transfer Credits: {LTBLUE}{CURRENCY_LONG}
-
-STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS :{BLACK}Servicing interval: {LTBLUE}{COMMA}days{BLACK} Last service: {LTBLUE}{DATE_LONG}
-STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT :{BLACK}Servicing interval: {LTBLUE}{COMMA}%{BLACK} Last service: {LTBLUE}{DATE_LONG}
-STR_VEHICLE_DETAILS_INCREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Increase servicing interval by 10. Ctrl+Click increases servicing interval by 5
-STR_VEHICLE_DETAILS_DECREASE_SERVICING_INTERVAL_TOOLTIP :{BLACK}Decrease servicing interval by 10. Ctrl+Click decreases servicing interval by 5
-
-STR_SERVICE_INTERVAL_DROPDOWN_TOOLTIP :{BLACK}Change servicing interval type
-STR_VEHICLE_DETAILS_DEFAULT :Default
-STR_VEHICLE_DETAILS_DAYS :Days
-STR_VEHICLE_DETAILS_PERCENT :Percentage
-
-STR_QUERY_RENAME_TRAIN_CAPTION :{WHITE}Name train
-STR_QUERY_RENAME_ROAD_VEHICLE_CAPTION :{WHITE}Name road vehicle
-STR_QUERY_RENAME_SHIP_CAPTION :{WHITE}Name ship
-STR_QUERY_RENAME_AIRCRAFT_CAPTION :{WHITE}Name aircraft
-
-# Extra buttons for train details windows
-STR_VEHICLE_DETAILS_TRAIN_ENGINE_BUILT_AND_VALUE :{LTBLUE}{ENGINE}{BLACK} Built: {LTBLUE}{NUM}{BLACK} Value: {LTBLUE}{CURRENCY_LONG}
-STR_VEHICLE_DETAILS_TRAIN_WAGON_VALUE :{LTBLUE}{ENGINE}{BLACK} Value: {LTBLUE}{CURRENCY_LONG}
-
-STR_VEHICLE_DETAILS_TRAIN_TOTAL_CAPACITY_TEXT :{BLACK}Total cargo capacity of this train:
-STR_VEHICLE_DETAILS_TRAIN_TOTAL_CAPACITY :{LTBLUE}- {CARGO_LONG} ({CARGO_SHORT})
-STR_VEHICLE_DETAILS_TRAIN_TOTAL_CAPACITY_MULT :{LTBLUE}- {CARGO_LONG} ({CARGO_SHORT}) (x{NUM})
-
-STR_VEHICLE_DETAILS_CARGO_EMPTY :{LTBLUE}Empty
-STR_VEHICLE_DETAILS_CARGO_FROM :{LTBLUE}{CARGO_LONG} from {STATION}
-STR_VEHICLE_DETAILS_CARGO_FROM_MULT :{LTBLUE}{CARGO_LONG} from {STATION} (x{NUM})
-
-STR_VEHICLE_DETAIL_TAB_CARGO :{BLACK}Cargo
-STR_VEHICLE_DETAILS_TRAIN_CARGO_TOOLTIP :{BLACK}Show details of cargo carried
-STR_VEHICLE_DETAIL_TAB_INFORMATION :{BLACK}Information
-STR_VEHICLE_DETAILS_TRAIN_INFORMATION_TOOLTIP :{BLACK}Show details of train vehicles
-STR_VEHICLE_DETAIL_TAB_CAPACITIES :{BLACK}Capacities
-STR_VEHICLE_DETAILS_TRAIN_CAPACITIES_TOOLTIP :{BLACK}Show capacities of each vehicle
-STR_VEHICLE_DETAIL_TAB_TOTAL_CARGO :{BLACK}Total Cargo
-STR_VEHICLE_DETAILS_TRAIN_TOTAL_CARGO_TOOLTIP :{BLACK}Show total capacity of train, split by cargo type
-
-STR_VEHICLE_DETAILS_TRAIN_ARTICULATED_RV_CAPACITY :{BLACK}Capacity: {LTBLUE}
-
-# Vehicle refit
-STR_REFIT_CAPTION :{WHITE}{VEHICLE} (Refit)
-STR_REFIT_TITLE :{GOLD}Select cargo type to carry:
-STR_REFIT_NEW_CAPACITY_COST_OF_REFIT :{BLACK}New capacity: {GOLD}{CARGO_LONG}{}{BLACK}Cost of refit: {RED}{CURRENCY_LONG}
-STR_REFIT_NEW_CAPACITY_INCOME_FROM_REFIT :{BLACK}New capacity: {GOLD}{CARGO_LONG}{}{BLACK}Income from refit: {GREEN}{CURRENCY_LONG}
-STR_REFIT_NEW_CAPACITY_COST_OF_AIRCRAFT_REFIT :{BLACK}New capacity: {GOLD}{CARGO_LONG}, {GOLD}{CARGO_LONG}{}{BLACK}Cost of refit: {RED}{CURRENCY_LONG}
-STR_REFIT_NEW_CAPACITY_INCOME_FROM_AIRCRAFT_REFIT :{BLACK}New capacity: {GOLD}{CARGO_LONG}, {GOLD}{CARGO_LONG}{}{BLACK}Income from refit: {GREEN}{CURRENCY_LONG}
-STR_REFIT_SELECT_VEHICLES_TOOLTIP :{BLACK}Select the vehicles to refit. Dragging with the mouse allows to select multiple vehicles. Clicking on an empty space will select the whole vehicle. Ctrl+Click will select a vehicle and the following chain
-
-STR_REFIT_TRAIN_LIST_TOOLTIP :{BLACK}Select type of cargo for train to carry
-STR_REFIT_ROAD_VEHICLE_LIST_TOOLTIP :{BLACK}Select type of cargo for road vehicle to carry
-STR_REFIT_SHIP_LIST_TOOLTIP :{BLACK}Select type of cargo for ship to carry
-STR_REFIT_AIRCRAFT_LIST_TOOLTIP :{BLACK}Select type of cargo for aircraft to carry
-
-STR_REFIT_TRAIN_REFIT_BUTTON :{BLACK}Refit train
-STR_REFIT_ROAD_VEHICLE_REFIT_BUTTON :{BLACK}Refit road vehicle
-STR_REFIT_SHIP_REFIT_BUTTON :{BLACK}Refit ship
-STR_REFIT_AIRCRAFT_REFIT_BUTTON :{BLACK}Refit aircraft
-
-STR_REFIT_TRAIN_REFIT_TOOLTIP :{BLACK}Refit train to carry highlighted cargo type
-STR_REFIT_ROAD_VEHICLE_REFIT_TOOLTIP :{BLACK}Refit road vehicle to carry highlighted cargo type
-STR_REFIT_SHIP_REFIT_TOOLTIP :{BLACK}Refit ship to carry highlighted cargo type
-STR_REFIT_AIRCRAFT_REFIT_TOOLTIP :{BLACK}Refit aircraft to carry highlighted cargo type
-
-# Order view
-STR_ORDERS_CAPTION :{WHITE}{VEHICLE} (Orders)
-STR_ORDERS_TIMETABLE_VIEW :{BLACK}Timetable
-STR_ORDERS_TIMETABLE_VIEW_TOOLTIP :{BLACK}Switch to the timetable view
-
-STR_ORDERS_LIST_TOOLTIP :{BLACK}Order list - click on an order to highlight it. Ctrl+Click scrolls to the order's destination
-STR_ORDER_INDEX :{COMMA}:{NBSP}
-STR_ORDER_TEXT :{STRING4} {STRING2} {STRING}
-
-STR_ORDERS_END_OF_ORDERS :- - End of Orders - -
-STR_ORDERS_END_OF_SHARED_ORDERS :- - End of Shared Orders - -
-
-# Order bottom buttons
-STR_ORDER_NON_STOP :{BLACK}Non-stop
-STR_ORDER_GO_TO :Go to
-STR_ORDER_GO_NON_STOP_TO :Go non-stop to
-STR_ORDER_GO_VIA :Go via
-STR_ORDER_GO_NON_STOP_VIA :Go non-stop via
-STR_ORDER_TOOLTIP_NON_STOP :{BLACK}Change the stopping behaviour of the highlighted order
-
-STR_ORDER_TOGGLE_FULL_LOAD :{BLACK}Full load any cargo
-STR_ORDER_DROP_LOAD_IF_POSSIBLE :Load if available
-STR_ORDER_DROP_FULL_LOAD_ALL :Full load all cargo
-STR_ORDER_DROP_FULL_LOAD_ANY :Full load any cargo
-STR_ORDER_DROP_NO_LOADING :No loading
-STR_ORDER_TOOLTIP_FULL_LOAD :{BLACK}Change the loading behaviour of the highlighted order
-
-STR_ORDER_TOGGLE_UNLOAD :{BLACK}Unload all
-STR_ORDER_DROP_UNLOAD_IF_ACCEPTED :Unload if accepted
-STR_ORDER_DROP_UNLOAD :Unload all
-STR_ORDER_DROP_TRANSFER :Transfer
-STR_ORDER_DROP_NO_UNLOADING :No unloading
-STR_ORDER_TOOLTIP_UNLOAD :{BLACK}Change the unloading behaviour of the highlighted order
-
-STR_ORDER_REFIT :{BLACK}Refit
-STR_ORDER_REFIT_TOOLTIP :{BLACK}Select what cargo type to refit to in this order. Ctrl+Click to remove refit instruction
-STR_ORDER_REFIT_AUTO :{BLACK}Auto-refit
-STR_ORDER_REFIT_AUTO_TOOLTIP :{BLACK}Select what cargo type to auto-refit to in this order. Ctrl+Click to remove refit instruction. Auto-refitting will only be done if the vehicle allows it
-STR_ORDER_DROP_REFIT_AUTO :Fixed cargo
-STR_ORDER_DROP_REFIT_AUTO_ANY :Available cargo
-
-STR_ORDER_SERVICE :{BLACK}Service
-STR_ORDER_DROP_GO_ALWAYS_DEPOT :Always go
-STR_ORDER_DROP_SERVICE_DEPOT :Service if needed
-STR_ORDER_DROP_HALT_DEPOT :Stop
-STR_ORDER_SERVICE_TOOLTIP :{BLACK}Skip this order unless a service is needed
-
-STR_ORDER_CONDITIONAL_VARIABLE_TOOLTIP :{BLACK}Vehicle data to base jumping on
-
-# Conditional order variables, must follow order of OrderConditionVariable enum
-STR_ORDER_CONDITIONAL_LOAD_PERCENTAGE :Load percentage
-STR_ORDER_CONDITIONAL_RELIABILITY :Reliability
-STR_ORDER_CONDITIONAL_MAX_SPEED :Maximum speed
-STR_ORDER_CONDITIONAL_AGE :Age (years)
-STR_ORDER_CONDITIONAL_REQUIRES_SERVICE :Requires service
-STR_ORDER_CONDITIONAL_UNCONDITIONALLY :Always
-STR_ORDER_CONDITIONAL_REMAINING_LIFETIME :Remaining lifetime (years)
-
-STR_ORDER_CONDITIONAL_COMPARATOR_TOOLTIP :{BLACK}How to compare the vehicle data to the given value
-STR_ORDER_CONDITIONAL_COMPARATOR_EQUALS :is equal to
-STR_ORDER_CONDITIONAL_COMPARATOR_NOT_EQUALS :is not equal to
-STR_ORDER_CONDITIONAL_COMPARATOR_LESS_THAN :is less than
-STR_ORDER_CONDITIONAL_COMPARATOR_LESS_EQUALS :is less or equal to
-STR_ORDER_CONDITIONAL_COMPARATOR_MORE_THAN :is more than
-STR_ORDER_CONDITIONAL_COMPARATOR_MORE_EQUALS :is more or equal to
-STR_ORDER_CONDITIONAL_COMPARATOR_IS_TRUE :is true
-STR_ORDER_CONDITIONAL_COMPARATOR_IS_FALSE :is false
-
-STR_ORDER_CONDITIONAL_VALUE_TOOLTIP :{BLACK}The value to compare the vehicle data against
-STR_ORDER_CONDITIONAL_VALUE_CAPT :{WHITE}Enter value to compare against
-
-STR_ORDERS_SKIP_BUTTON :{BLACK}Skip
-STR_ORDERS_SKIP_TOOLTIP :{BLACK}Skip the current order, and start the next. Ctrl+Click skips to the selected order
-
-STR_ORDERS_DELETE_BUTTON :{BLACK}Delete
-STR_ORDERS_DELETE_TOOLTIP :{BLACK}Delete the highlighted order
-STR_ORDERS_DELETE_ALL_TOOLTIP :{BLACK}Delete all orders
-STR_ORDERS_STOP_SHARING_BUTTON :{BLACK}Stop sharing
-STR_ORDERS_STOP_SHARING_TOOLTIP :{BLACK}Stop sharing the order list. Ctrl+Click additionally deletes all orders for this vehicle
-
-STR_ORDERS_GO_TO_BUTTON :{BLACK}Go To
-STR_ORDER_GO_TO_NEAREST_DEPOT :Go to nearest depot
-STR_ORDER_GO_TO_NEAREST_HANGAR :Go to nearest hangar
-STR_ORDER_CONDITIONAL :Conditional order jump
-STR_ORDER_SHARE :Share orders
-STR_ORDERS_GO_TO_TOOLTIP :{BLACK}Insert a new order before the highlighted order, or add to end of list. Ctrl makes station orders 'full load any cargo', waypoint orders 'non-stop' and depot orders 'service'. 'Share orders' or Ctrl lets this vehicle share orders with the selected vehicle. Clicking a vehicle copies the orders from that vehicle. A depot order disables automatic servicing of the vehicle
-
-STR_ORDERS_VEH_WITH_SHARED_ORDERS_LIST_TOOLTIP :{BLACK}Show all vehicles that share this schedule
-
-# String parts to build the order string
-STR_ORDER_GO_TO_WAYPOINT :Go via {WAYPOINT}
-STR_ORDER_GO_NON_STOP_TO_WAYPOINT :Go non-stop via {WAYPOINT}
-
-STR_ORDER_SERVICE_AT :Service at
-STR_ORDER_SERVICE_NON_STOP_AT :Service non-stop at
-
-STR_ORDER_NEAREST_DEPOT :the nearest
-STR_ORDER_NEAREST_HANGAR :the nearest Hangar
-STR_ORDER_TRAIN_DEPOT :Train Depot
-STR_ORDER_ROAD_VEHICLE_DEPOT :Road Vehicle Depot
-STR_ORDER_SHIP_DEPOT :Ship Depot
-STR_ORDER_GO_TO_NEAREST_DEPOT_FORMAT :{STRING} {STRING} {STRING}
-STR_ORDER_GO_TO_DEPOT_FORMAT :{STRING} {DEPOT}
-
-STR_ORDER_REFIT_ORDER :(Refit to {STRING})
-STR_ORDER_REFIT_STOP_ORDER :(Refit to {STRING} and stop)
-STR_ORDER_STOP_ORDER :(Stop)
-
-STR_ORDER_GO_TO_STATION :{STRING} {STATION} {STRING}
-
-STR_ORDER_IMPLICIT :(Implicit)
-
-STR_ORDER_FULL_LOAD :(Full load)
-STR_ORDER_FULL_LOAD_ANY :(Full load any cargo)
-STR_ORDER_NO_LOAD :(No loading)
-STR_ORDER_UNLOAD :(Unload and take cargo)
-STR_ORDER_UNLOAD_FULL_LOAD :(Unload and wait for full load)
-STR_ORDER_UNLOAD_FULL_LOAD_ANY :(Unload and wait for any full load)
-STR_ORDER_UNLOAD_NO_LOAD :(Unload and leave empty)
-STR_ORDER_TRANSFER :(Transfer and take cargo)
-STR_ORDER_TRANSFER_FULL_LOAD :(Transfer and wait for full load)
-STR_ORDER_TRANSFER_FULL_LOAD_ANY :(Transfer and wait for any full load)
-STR_ORDER_TRANSFER_NO_LOAD :(Transfer and leave empty)
-STR_ORDER_NO_UNLOAD :(No unloading and take cargo)
-STR_ORDER_NO_UNLOAD_FULL_LOAD :(No unloading and wait for full load)
-STR_ORDER_NO_UNLOAD_FULL_LOAD_ANY :(No unloading and wait for any full load)
-STR_ORDER_NO_UNLOAD_NO_LOAD :(No unloading and no loading)
-
-STR_ORDER_AUTO_REFIT :(Auto-refit to {STRING})
-STR_ORDER_FULL_LOAD_REFIT :(Full load with auto-refit to {STRING})
-STR_ORDER_FULL_LOAD_ANY_REFIT :(Full load any cargo with auto-refit to {STRING})
-STR_ORDER_UNLOAD_REFIT :(Unload and take cargo with auto-refit to {STRING})
-STR_ORDER_UNLOAD_FULL_LOAD_REFIT :(Unload and wait for full load with auto-refit to {STRING})
-STR_ORDER_UNLOAD_FULL_LOAD_ANY_REFIT :(Unload and wait for any full load with auto-refit to {STRING})
-STR_ORDER_TRANSFER_REFIT :(Transfer and take cargo with auto-refit to {STRING})
-STR_ORDER_TRANSFER_FULL_LOAD_REFIT :(Transfer and wait for full load with auto-refit to {STRING})
-STR_ORDER_TRANSFER_FULL_LOAD_ANY_REFIT :(Transfer and wait for any full load with auto-refit to {STRING})
-STR_ORDER_NO_UNLOAD_REFIT :(No unloading and take cargo with auto-refit to {STRING})
-STR_ORDER_NO_UNLOAD_FULL_LOAD_REFIT :(No unloading and wait for full load with auto-refit to {STRING})
-STR_ORDER_NO_UNLOAD_FULL_LOAD_ANY_REFIT :(No unloading and wait for any full load with auto-refit to {STRING})
-
-STR_ORDER_AUTO_REFIT_ANY :available cargo
-
-STR_ORDER_STOP_LOCATION_NEAR_END :[near end]
-STR_ORDER_STOP_LOCATION_MIDDLE :[middle]
-STR_ORDER_STOP_LOCATION_FAR_END :[far end]
-
-STR_ORDER_OUT_OF_RANGE :{RED} (Next destination is out of range)
-
-STR_ORDER_CONDITIONAL_UNCONDITIONAL :Jump to order {COMMA}
-STR_ORDER_CONDITIONAL_NUM :Jump to order {COMMA} when {STRING} {STRING} {COMMA}
-STR_ORDER_CONDITIONAL_TRUE_FALSE :Jump to order {COMMA} when {STRING} {STRING}
-
-STR_INVALID_ORDER :{RED} (Invalid Order)
-
-# Time table window
-STR_TIMETABLE_TITLE :{WHITE}{VEHICLE} (Timetable)
-STR_TIMETABLE_ORDER_VIEW :{BLACK}Orders
-STR_TIMETABLE_ORDER_VIEW_TOOLTIP :{BLACK}Switch to the order view
-
-STR_TIMETABLE_TOOLTIP :{BLACK}Timetable - click on an order to highlight it
-
-STR_TIMETABLE_NO_TRAVEL :No travel
-STR_TIMETABLE_NOT_TIMETABLEABLE :Travel (automatic; timetabled by next manual order)
-STR_TIMETABLE_TRAVEL_NOT_TIMETABLED :Travel (not timetabled)
-STR_TIMETABLE_TRAVEL_NOT_TIMETABLED_SPEED :Travel with at most {2:VELOCITY} (not timetabled)
-STR_TIMETABLE_TRAVEL_FOR :Travel for {STRING1}
-STR_TIMETABLE_TRAVEL_FOR_SPEED :Travel for {STRING1} with at most {VELOCITY}
-STR_TIMETABLE_STAY_FOR :and stay for {STRING1}
-STR_TIMETABLE_AND_TRAVEL_FOR :and travel for {STRING1}
-STR_TIMETABLE_DAYS :{COMMA} day{P "" s}
-STR_TIMETABLE_TICKS :{COMMA} tick{P "" s}
-
-STR_TIMETABLE_TOTAL_TIME :{BLACK}This timetable will take {STRING1} to complete
-STR_TIMETABLE_TOTAL_TIME_INCOMPLETE :{BLACK}This timetable will take at least {STRING1} to complete (not all timetabled)
-
-STR_TIMETABLE_STATUS_ON_TIME :{BLACK}This vehicle is currently running on time
-STR_TIMETABLE_STATUS_LATE :{BLACK}This vehicle is currently running {STRING1} late
-STR_TIMETABLE_STATUS_EARLY :{BLACK}This vehicle is currently running {STRING1} early
-STR_TIMETABLE_STATUS_NOT_STARTED :{BLACK}This timetable has not yet started
-STR_TIMETABLE_STATUS_START_AT :{BLACK}This timetable will start at {STRING1}
-
-STR_TIMETABLE_STARTING_DATE :{BLACK}Start date
-STR_TIMETABLE_STARTING_DATE_TOOLTIP :{BLACK}Select a date as starting point of this timetable. Ctrl+Click sets the starting point of this timetable and distributes all vehicles sharing this order evenly based on their relative order, if the order is completely timetabled
-
-STR_TIMETABLE_CHANGE_TIME :{BLACK}Change Time
-STR_TIMETABLE_WAIT_TIME_TOOLTIP :{BLACK}Change the amount of time that the highlighted order should take
-
-STR_TIMETABLE_CLEAR_TIME :{BLACK}Clear Time
-STR_TIMETABLE_CLEAR_TIME_TOOLTIP :{BLACK}Clear the amount of time for the highlighted order
-
-STR_TIMETABLE_CHANGE_SPEED :{BLACK}Change Speed Limit
-STR_TIMETABLE_CHANGE_SPEED_TOOLTIP :{BLACK}Change the maximum travel speed of the highlighted order
-
-STR_TIMETABLE_CLEAR_SPEED :{BLACK}Clear Speed Limit
-STR_TIMETABLE_CLEAR_SPEED_TOOLTIP :{BLACK}Clear the maximum travel speed of the highlighted order
-
-STR_TIMETABLE_RESET_LATENESS :{BLACK}Reset Late Counter
-STR_TIMETABLE_RESET_LATENESS_TOOLTIP :{BLACK}Reset the lateness counter, so the vehicle will be on time
-
-STR_TIMETABLE_AUTOFILL :{BLACK}Autofill
-STR_TIMETABLE_AUTOFILL_TOOLTIP :{BLACK}Fill the timetable automatically with the values from the next journey (Ctrl+Click to try to keep waiting times)
-
-STR_TIMETABLE_EXPECTED :{BLACK}Expected
-STR_TIMETABLE_SCHEDULED :{BLACK}Scheduled
-STR_TIMETABLE_EXPECTED_TOOLTIP :{BLACK}Switch between expected and scheduled
-
-STR_TIMETABLE_ARRIVAL_ABBREVIATION :A:
-STR_TIMETABLE_DEPARTURE_ABBREVIATION :D:
-
-
-# Date window (for timetable)
-STR_DATE_CAPTION :{WHITE}Set date
-STR_DATE_SET_DATE :{BLACK}Set date
-STR_DATE_SET_DATE_TOOLTIP :{BLACK}Use the selected date as starting date for the timetable
-STR_DATE_DAY_TOOLTIP :{BLACK}Select day
-STR_DATE_MONTH_TOOLTIP :{BLACK}Select month
-STR_DATE_YEAR_TOOLTIP :{BLACK}Select year
-
-
-# AI debug window
-STR_AI_DEBUG :{WHITE}AI/Game Script Debug
-STR_AI_DEBUG_NAME_AND_VERSION :{BLACK}{RAW_STRING} (v{NUM})
-STR_AI_DEBUG_NAME_TOOLTIP :{BLACK}Name of the script
-STR_AI_DEBUG_SETTINGS :{BLACK}Settings
-STR_AI_DEBUG_SETTINGS_TOOLTIP :{BLACK}Change the settings of the script
-STR_AI_DEBUG_RELOAD :{BLACK}Reload AI
-STR_AI_DEBUG_RELOAD_TOOLTIP :{BLACK}Kill the AI, reload the script, and restart the AI
-STR_AI_DEBUG_BREAK_STR_ON_OFF_TOOLTIP :{BLACK}Enable/disable breaking when an AI log message matches the break string
-STR_AI_DEBUG_BREAK_ON_LABEL :{BLACK}Break on:
-STR_AI_DEBUG_BREAK_STR_OSKTITLE :{BLACK}Break on
-STR_AI_DEBUG_BREAK_STR_TOOLTIP :{BLACK}When an AI log message matches this string, the game is paused
-STR_AI_DEBUG_MATCH_CASE :{BLACK}Match case
-STR_AI_DEBUG_MATCH_CASE_TOOLTIP :{BLACK}Toggle matching case when comparing AI log messages against the break string
-STR_AI_DEBUG_CONTINUE :{BLACK}Continue
-STR_AI_DEBUG_CONTINUE_TOOLTIP :{BLACK}Unpause and continue the AI
-STR_AI_DEBUG_SELECT_AI_TOOLTIP :{BLACK}View debug output of this AI
-STR_AI_GAME_SCRIPT :{BLACK}Game Script
-STR_AI_GAME_SCRIPT_TOOLTIP :{BLACK}Check the Game Script log
-
-STR_ERROR_AI_NO_AI_FOUND :No suitable AI found to load.{}This AI is a dummy AI and won't do anything.{}You can download several AIs via the 'Online Content' system
-STR_ERROR_AI_PLEASE_REPORT_CRASH :{WHITE}One of the running scripts crashed. Please report this to the script author with a screenshot of the AI/Game Script Debug Window
-STR_ERROR_AI_DEBUG_SERVER_ONLY :{YELLOW}AI/Game Script Debug window is only available for the server
-
-# AI configuration window
-STR_AI_CONFIG_CAPTION :{WHITE}AI/Game Script Configuration
-STR_AI_CONFIG_GAMELIST_TOOLTIP :{BLACK}The Game Script that will be loaded in the next game
-STR_AI_CONFIG_AILIST_TOOLTIP :{BLACK}The AIs that will be loaded in the next game
-STR_AI_CONFIG_HUMAN_PLAYER :Human player
-STR_AI_CONFIG_RANDOM_AI :Random AI
-STR_AI_CONFIG_NONE :(none)
-
-STR_AI_CONFIG_MOVE_UP :{BLACK}Move Up
-STR_AI_CONFIG_MOVE_UP_TOOLTIP :{BLACK}Move selected AI up in the list
-STR_AI_CONFIG_MOVE_DOWN :{BLACK}Move Down
-STR_AI_CONFIG_MOVE_DOWN_TOOLTIP :{BLACK}Move selected AI down in the list
-
-STR_AI_CONFIG_GAMESCRIPT :{SILVER}Game Script
-STR_AI_CONFIG_AI :{SILVER}AIs
-
-STR_AI_CONFIG_CHANGE :{BLACK}Select {STRING}
-STR_AI_CONFIG_CHANGE_NONE :
-STR_AI_CONFIG_CHANGE_AI :AI
-STR_AI_CONFIG_CHANGE_GAMESCRIPT :Game Script
-STR_AI_CONFIG_CHANGE_TOOLTIP :{BLACK}Load another script
-STR_AI_CONFIG_CONFIGURE :{BLACK}Configure
-STR_AI_CONFIG_CONFIGURE_TOOLTIP :{BLACK}Configure the parameters of the Script
-
-# Available AIs window
-STR_AI_LIST_CAPTION :{WHITE}Available {STRING}
-STR_AI_LIST_CAPTION_AI :AIs
-STR_AI_LIST_CAPTION_GAMESCRIPT :Game Scripts
-STR_AI_LIST_TOOLTIP :{BLACK}Click to select a script
-
-STR_AI_LIST_AUTHOR :{LTBLUE}Author: {ORANGE}{RAW_STRING}
-STR_AI_LIST_VERSION :{LTBLUE}Version: {ORANGE}{NUM}
-STR_AI_LIST_URL :{LTBLUE}URL: {ORANGE}{RAW_STRING}
-
-STR_AI_LIST_ACCEPT :{BLACK}Accept
-STR_AI_LIST_ACCEPT_TOOLTIP :{BLACK}Select highlighted script
-STR_AI_LIST_CANCEL :{BLACK}Cancel
-STR_AI_LIST_CANCEL_TOOLTIP :{BLACK}Don't change the script
-
-# AI Parameters
-STR_AI_SETTINGS_CAPTION :{WHITE}{STRING} Parameters
-STR_AI_SETTINGS_CAPTION_AI :AI
-STR_AI_SETTINGS_CAPTION_GAMESCRIPT :Game Script
-STR_AI_SETTINGS_CLOSE :{BLACK}Close
-STR_AI_SETTINGS_RESET :{BLACK}Reset
-STR_AI_SETTINGS_SETTING :{RAW_STRING}: {ORANGE}{STRING1}
-STR_AI_SETTINGS_START_DELAY :Number of days to start this AI after the previous one (give or take): {ORANGE}{STRING1}
-
-
-# Textfile window
-STR_TEXTFILE_README_CAPTION :{WHITE}{STRING} readme of {RAW_STRING}
-STR_TEXTFILE_CHANGELOG_CAPTION :{WHITE}{STRING} changelog of {RAW_STRING}
-STR_TEXTFILE_LICENCE_CAPTION :{WHITE}{STRING} licence of {RAW_STRING}
-STR_TEXTFILE_WRAP_TEXT :{WHITE}Wrap text
-STR_TEXTFILE_WRAP_TEXT_TOOLTIP :{BLACK}Wrap the text of the window so it all fits without having to scroll
-STR_TEXTFILE_VIEW_README :{BLACK}View readme
-STR_TEXTFILE_VIEW_CHANGELOG :{BLACK}Changelog
-STR_TEXTFILE_VIEW_LICENCE :{BLACK}Licence
-
-
-# Vehicle loading indicators
-STR_PERCENT_UP_SMALL :{TINY_FONT}{WHITE}{NUM}%{UP_ARROW}
-STR_PERCENT_UP :{WHITE}{NUM}%{UP_ARROW}
-STR_PERCENT_DOWN_SMALL :{TINY_FONT}{WHITE}{NUM}%{DOWN_ARROW}
-STR_PERCENT_DOWN :{WHITE}{NUM}%{DOWN_ARROW}
-STR_PERCENT_UP_DOWN_SMALL :{TINY_FONT}{WHITE}{NUM}%{UP_ARROW}{DOWN_ARROW}
-STR_PERCENT_UP_DOWN :{WHITE}{NUM}%{UP_ARROW}{DOWN_ARROW}
-STR_PERCENT_NONE_SMALL :{TINY_FONT}{WHITE}{NUM}%
-STR_PERCENT_NONE :{WHITE}{NUM}%
-
-# Income 'floats'
-STR_INCOME_FLOAT_COST_SMALL :{TINY_FONT}{RED}Cost: {CURRENCY_LONG}
-STR_INCOME_FLOAT_COST :{RED}Cost: {CURRENCY_LONG}
-STR_INCOME_FLOAT_INCOME_SMALL :{TINY_FONT}{GREEN}Income: {CURRENCY_LONG}
-STR_INCOME_FLOAT_INCOME :{GREEN}Income: {CURRENCY_LONG}
-STR_FEEDER_TINY :{TINY_FONT}{YELLOW}Transfer: {CURRENCY_LONG}
-STR_FEEDER :{YELLOW}Transfer: {CURRENCY_LONG}
-STR_FEEDER_INCOME_TINY :{TINY_FONT}{YELLOW}Transfer: {CURRENCY_LONG}{WHITE} / {GREEN}Income: {CURRENCY_LONG}
-STR_FEEDER_INCOME :{YELLOW}Transfer: {CURRENCY_LONG}{WHITE} / {GREEN}Income: {CURRENCY_LONG}
-STR_FEEDER_COST_TINY :{TINY_FONT}{YELLOW}Transfer: {CURRENCY_LONG}{WHITE} / {RED}Cost: {CURRENCY_LONG}
-STR_FEEDER_COST :{YELLOW}Transfer: {CURRENCY_LONG}{WHITE} / {RED}Cost: {CURRENCY_LONG}
-STR_MESSAGE_ESTIMATED_COST :{WHITE}Estimated Cost: {CURRENCY_LONG}
-STR_MESSAGE_ESTIMATED_INCOME :{WHITE}Estimated Income: {CURRENCY_LONG}
-
-# Saveload messages
-STR_ERROR_SAVE_STILL_IN_PROGRESS :{WHITE}Saving still in progress,{}please wait until it is finished!
-STR_ERROR_AUTOSAVE_FAILED :{WHITE}Autosave failed
-STR_ERROR_UNABLE_TO_READ_DRIVE :{BLACK}Unable to read drive
-STR_ERROR_GAME_SAVE_FAILED :{WHITE}Game Save Failed{}{STRING}
-STR_ERROR_UNABLE_TO_DELETE_FILE :{WHITE}Unable to delete file
-STR_ERROR_GAME_LOAD_FAILED :{WHITE}Game Load Failed{}{STRING}
-STR_GAME_SAVELOAD_ERROR_BROKEN_INTERNAL_ERROR :Internal error: {RAW_STRING}
-STR_GAME_SAVELOAD_ERROR_BROKEN_SAVEGAME :Broken savegame - {RAW_STRING}
-STR_GAME_SAVELOAD_ERROR_TOO_NEW_SAVEGAME :Savegame is made with newer version
-STR_GAME_SAVELOAD_ERROR_FILE_NOT_READABLE :File not readable
-STR_GAME_SAVELOAD_ERROR_FILE_NOT_WRITEABLE :File not writeable
-STR_GAME_SAVELOAD_ERROR_DATA_INTEGRITY_CHECK_FAILED :Data integrity check failed
-STR_GAME_SAVELOAD_NOT_AVAILABLE :
-STR_WARNING_LOADGAME_REMOVED_TRAMS :{WHITE}Game was saved in version without tram support. All trams have been removed
-
-# Map generation messages
-STR_ERROR_COULD_NOT_CREATE_TOWN :{WHITE}Map generation aborted...{}... no suitable town locations
-STR_ERROR_NO_TOWN_IN_SCENARIO :{WHITE}... there is no town in this scenario
-
-STR_ERROR_PNGMAP :{WHITE}Can't load landscape from PNG...
-STR_ERROR_PNGMAP_FILE_NOT_FOUND :{WHITE}... file not found
-STR_ERROR_PNGMAP_IMAGE_TYPE :{WHITE}... could not convert image type. 8 or 24-bit PNG image needed
-STR_ERROR_PNGMAP_MISC :{WHITE}... something just went wrong (probably corrupted file)
-
-STR_ERROR_BMPMAP :{WHITE}Can't load landscape from BMP...
-STR_ERROR_BMPMAP_IMAGE_TYPE :{WHITE}... could not convert image type
-
-STR_ERROR_HEIGHTMAP_TOO_LARGE :{WHITE}... image is too large
-
-STR_WARNING_HEIGHTMAP_SCALE_CAPTION :{WHITE}Scale warning
-STR_WARNING_HEIGHTMAP_SCALE_MESSAGE :{YELLOW}Resizing source map too much is not recommended. Continue with the generation?
-
-# Soundset messages
-STR_WARNING_FALLBACK_SOUNDSET :{WHITE}Only a fallback sound set was found. If you want sounds, install a sound set via the content download system
-
-# Screenshot related messages
-STR_WARNING_SCREENSHOT_SIZE_CAPTION :{WHITE}Huge screenshot
-STR_WARNING_SCREENSHOT_SIZE_MESSAGE :{YELLOW}The screenshot will have a resolution of {COMMA} x {COMMA} pixels. Taking the screenshot may take a while. Do you want to continue?
-
-STR_MESSAGE_SCREENSHOT_SUCCESSFULLY :{WHITE}Screenshot successfully saved as '{RAW_STRING}'
-STR_ERROR_SCREENSHOT_FAILED :{WHITE}Screenshot failed!
-
-# Error message titles
-STR_ERROR_MESSAGE_CAPTION :{YELLOW}Message
-STR_ERROR_MESSAGE_CAPTION_OTHER_COMPANY :{YELLOW}Message from {STRING1}
-
-# Generic construction errors
-STR_ERROR_OFF_EDGE_OF_MAP :{WHITE}Off edge of map
-STR_ERROR_TOO_CLOSE_TO_EDGE_OF_MAP :{WHITE}Too close to edge of map
-STR_ERROR_NOT_ENOUGH_CASH_REQUIRES_CURRENCY :{WHITE}Not enough cash - requires {CURRENCY_LONG}
-STR_ERROR_FLAT_LAND_REQUIRED :{WHITE}Flat land required
-STR_ERROR_LAND_SLOPED_IN_WRONG_DIRECTION :{WHITE}Land sloped in wrong direction
-STR_ERROR_CAN_T_DO_THIS :{WHITE}Can't do this...
-STR_ERROR_BUILDING_MUST_BE_DEMOLISHED :{WHITE}Building must be demolished first
-STR_ERROR_CAN_T_CLEAR_THIS_AREA :{WHITE}Can't clear this area...
-STR_ERROR_SITE_UNSUITABLE :{WHITE}... site unsuitable
-STR_ERROR_ALREADY_BUILT :{WHITE}... already built
-STR_ERROR_OWNED_BY :{WHITE}... owned by {STRING2}
-STR_ERROR_AREA_IS_OWNED_BY_ANOTHER :{WHITE}... area is owned by another company
-STR_ERROR_TERRAFORM_LIMIT_REACHED :{WHITE}... landscaping limit reached
-STR_ERROR_CLEARING_LIMIT_REACHED :{WHITE}... tile clearing limit reached
-STR_ERROR_TREE_PLANT_LIMIT_REACHED :{WHITE}... tree planting limit reached
-STR_ERROR_NAME_MUST_BE_UNIQUE :{WHITE}Name must be unique
-STR_ERROR_GENERIC_OBJECT_IN_THE_WAY :{WHITE}{1:STRING} in the way
-STR_ERROR_NOT_ALLOWED_WHILE_PAUSED :{WHITE}Not allowed while paused
-
-# Local authority errors
-STR_ERROR_LOCAL_AUTHORITY_REFUSES_TO_ALLOW_THIS :{WHITE}{TOWN} local authority refuses to allow this
-STR_ERROR_LOCAL_AUTHORITY_REFUSES_AIRPORT :{WHITE}{TOWN} local authority refuses to allow another airport to be built in this town
-STR_ERROR_LOCAL_AUTHORITY_REFUSES_NOISE :{WHITE}{TOWN} local authority refuses permission for airport due to noise concerns
-STR_ERROR_BRIBE_FAILED :{WHITE}Your attempted bribe has been discovered by a regional investigator
-
-# Levelling errors
-STR_ERROR_CAN_T_RAISE_LAND_HERE :{WHITE}Can't raise land here...
-STR_ERROR_CAN_T_LOWER_LAND_HERE :{WHITE}Can't lower land here...
-STR_ERROR_CAN_T_LEVEL_LAND_HERE :{WHITE}Can't level land here...
-STR_ERROR_EXCAVATION_WOULD_DAMAGE :{WHITE}Excavation would damage tunnel
-STR_ERROR_ALREADY_AT_SEA_LEVEL :{WHITE}... already at sea level
-STR_ERROR_TOO_HIGH :{WHITE}... too high
-STR_ERROR_ALREADY_LEVELLED :{WHITE}... already flat
-
-# Company related errors
-STR_ERROR_CAN_T_CHANGE_COMPANY_NAME :{WHITE}Can't change company name...
-STR_ERROR_CAN_T_CHANGE_PRESIDENT :{WHITE}Can't change manager's name...
-
-STR_ERROR_MAXIMUM_PERMITTED_LOAN :{WHITE}... maximum permitted loan size is {CURRENCY_LONG}
-STR_ERROR_CAN_T_BORROW_ANY_MORE_MONEY :{WHITE}Can't borrow any more money...
-STR_ERROR_LOAN_ALREADY_REPAYED :{WHITE}... no loan to repay
-STR_ERROR_CURRENCY_REQUIRED :{WHITE}... {CURRENCY_LONG} required
-STR_ERROR_CAN_T_REPAY_LOAN :{WHITE}Can't repay loan...
-STR_ERROR_INSUFFICIENT_FUNDS :{WHITE}Can't give away money that is loaned from the bank...
-STR_ERROR_CAN_T_BUY_COMPANY :{WHITE}Can't buy company...
-STR_ERROR_CAN_T_BUILD_COMPANY_HEADQUARTERS :{WHITE}Can't build company headquarters...
-STR_ERROR_CAN_T_BUY_25_SHARE_IN_THIS :{WHITE}Can't buy 25% share in this company...
-STR_ERROR_CAN_T_SELL_25_SHARE_IN :{WHITE}Can't sell 25% share in this company...
-STR_ERROR_PROTECTED :{WHITE}This company is not old enough to trade shares yet...
-
-# Town related errors
-STR_ERROR_CAN_T_GENERATE_TOWN :{WHITE}Can't build any towns
-STR_ERROR_CAN_T_RENAME_TOWN :{WHITE}Can't rename town...
-STR_ERROR_CAN_T_FOUND_TOWN_HERE :{WHITE}Can't found town here...
-STR_ERROR_CAN_T_EXPAND_TOWN :{WHITE}Can't expand town...
-STR_ERROR_TOO_CLOSE_TO_EDGE_OF_MAP_SUB :{WHITE}... too close to edge of map
-STR_ERROR_TOO_CLOSE_TO_ANOTHER_TOWN :{WHITE}... too close to another town
-STR_ERROR_TOO_MANY_TOWNS :{WHITE}... too many towns
-STR_ERROR_NO_SPACE_FOR_TOWN :{WHITE}... there is no more space on the map
-STR_ERROR_TOWN_EXPAND_WARN_NO_ROADS :{WHITE}The town will not build roads. You can enable building of roads via Advanced Settings->Economy->Towns
-STR_ERROR_ROAD_WORKS_IN_PROGRESS :{WHITE}Road works in progress
-STR_ERROR_TOWN_CAN_T_DELETE :{WHITE}Can't delete this town...{}A station or depot is referring to the town or a town owned tile can't be removed
-STR_ERROR_STATUE_NO_SUITABLE_PLACE :{WHITE}... there is no suitable place for a statue in the centre of this town
-
-# Industry related errors
-STR_ERROR_TOO_MANY_INDUSTRIES :{WHITE}... too many industries
-STR_ERROR_CAN_T_GENERATE_INDUSTRIES :{WHITE}Can't generate industries...
-STR_ERROR_CAN_T_BUILD_HERE :{WHITE}Can't build {STRING} here...
-STR_ERROR_CAN_T_CONSTRUCT_THIS_INDUSTRY :{WHITE}Can't construct this industry type here...
-STR_ERROR_INDUSTRY_TOO_CLOSE :{WHITE}... too close to another industry
-STR_ERROR_MUST_FOUND_TOWN_FIRST :{WHITE}... must found town first
-STR_ERROR_ONLY_ONE_ALLOWED_PER_TOWN :{WHITE}... only one allowed per town
-STR_ERROR_CAN_ONLY_BE_BUILT_IN_TOWNS_WITH_POPULATION_OF_1200 :{WHITE}... can only be built in towns with a population of at least 1200
-STR_ERROR_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}... can only be built in rainforest areas
-STR_ERROR_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}... can only be built in desert areas
-STR_ERROR_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}... can only be built in towns (replacing houses)
-STR_ERROR_CAN_ONLY_BE_BUILT_NEAR_TOWN_CENTER :{WHITE}... can only be built near the center of towns
-STR_ERROR_CAN_ONLY_BE_BUILT_IN_LOW_AREAS :{WHITE}... can only be built in low areas
-STR_ERROR_CAN_ONLY_BE_POSITIONED :{WHITE}... can only be positioned near edges of map
-STR_ERROR_FOREST_CAN_ONLY_BE_PLANTED :{WHITE}... forest can only be planted above snow-line
-STR_ERROR_CAN_ONLY_BE_BUILT_ABOVE_SNOW_LINE :{WHITE}... can only be built above the snow-line
-STR_ERROR_CAN_ONLY_BE_BUILT_BELOW_SNOW_LINE :{WHITE}... can only be built below the snow-line
-
-# Station construction related errors
-STR_ERROR_CAN_T_BUILD_RAILROAD_STATION :{WHITE}Can't build railway station here...
-STR_ERROR_CAN_T_BUILD_BUS_STATION :{WHITE}Can't build bus station...
-STR_ERROR_CAN_T_BUILD_TRUCK_STATION :{WHITE}Can't build lorry station...
-STR_ERROR_CAN_T_BUILD_PASSENGER_TRAM_STATION :{WHITE}Can't build passenger tram station...
-STR_ERROR_CAN_T_BUILD_CARGO_TRAM_STATION :{WHITE}Can't build freight tram station...
-STR_ERROR_CAN_T_BUILD_DOCK_HERE :{WHITE}Can't build dock here...
-STR_ERROR_CAN_T_BUILD_AIRPORT_HERE :{WHITE}Can't build airport here...
-
-STR_ERROR_ADJOINS_MORE_THAN_ONE_EXISTING :{WHITE}Adjoins more than one existing station/loading area
-STR_ERROR_STATION_TOO_SPREAD_OUT :{WHITE}... station too spread out
-STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Too many stations/loading areas
-STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Too many railway station parts
-STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Too many bus stops
-STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Too many lorry stations
-STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION :{WHITE}Too close to another station/loading area
-STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Too close to another dock
-STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Too close to another airport
-STR_ERROR_CAN_T_RENAME_STATION :{WHITE}Can't rename station...
-STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... this is a town owned road
-STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... road facing in the wrong direction
-STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... drive through stops can't have corners
-STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... drive through stops can't have junctions
-
-# Station destruction related errors
-STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Can't remove part of station...
-STR_ERROR_MUST_REMOVE_RAILWAY_STATION_FIRST :{WHITE}Must remove railway station first
-STR_ERROR_CAN_T_REMOVE_BUS_STATION :{WHITE}Can't remove bus station...
-STR_ERROR_CAN_T_REMOVE_TRUCK_STATION :{WHITE}Can't remove lorry station...
-STR_ERROR_CAN_T_REMOVE_PASSENGER_TRAM_STATION :{WHITE}Can't remove passenger tram station...
-STR_ERROR_CAN_T_REMOVE_CARGO_TRAM_STATION :{WHITE}Can't remove freight tram station...
-STR_ERROR_MUST_REMOVE_ROAD_STOP_FIRST :{WHITE}Must remove road stop first
-STR_ERROR_THERE_IS_NO_STATION :{WHITE}... there is no station here
-
-STR_ERROR_MUST_DEMOLISH_RAILROAD :{WHITE}Must demolish railway station first
-STR_ERROR_MUST_DEMOLISH_BUS_STATION_FIRST :{WHITE}Must demolish bus station first
-STR_ERROR_MUST_DEMOLISH_TRUCK_STATION_FIRST :{WHITE}Must demolish lorry station first
-STR_ERROR_MUST_DEMOLISH_PASSENGER_TRAM_STATION_FIRST :{WHITE}Must demolish passenger tram station first
-STR_ERROR_MUST_DEMOLISH_CARGO_TRAM_STATION_FIRST :{WHITE}Must demolish freight tram station first
-STR_ERROR_MUST_DEMOLISH_DOCK_FIRST :{WHITE}Must demolish dock first
-STR_ERROR_MUST_DEMOLISH_AIRPORT_FIRST :{WHITE}Must demolish airport first
-
-# Waypoint related errors
-STR_ERROR_WAYPOINT_ADJOINS_MORE_THAN_ONE_EXISTING :{WHITE}Adjoins more than one existing waypoint
-STR_ERROR_TOO_CLOSE_TO_ANOTHER_WAYPOINT :{WHITE}Too close to another waypoint
-
-STR_ERROR_CAN_T_BUILD_TRAIN_WAYPOINT :{WHITE}Can't build train waypoint here...
-STR_ERROR_CAN_T_POSITION_BUOY_HERE :{WHITE}Can't place buoy here...
-STR_ERROR_CAN_T_CHANGE_WAYPOINT_NAME :{WHITE}Can't change waypoint name...
-
-STR_ERROR_CAN_T_REMOVE_TRAIN_WAYPOINT :{WHITE}Can't remove train waypoint here...
-STR_ERROR_MUST_REMOVE_RAILWAYPOINT_FIRST :{WHITE}Must remove rail waypoint first
-STR_ERROR_BUOY_IN_THE_WAY :{WHITE}... buoy in the way
-STR_ERROR_BUOY_IS_IN_USE :{WHITE}... buoy is in use by another company!
-
-# Depot related errors
-STR_ERROR_CAN_T_BUILD_TRAIN_DEPOT :{WHITE}Can't build train depot here...
-STR_ERROR_CAN_T_BUILD_ROAD_DEPOT :{WHITE}Can't build road vehicle depot here...
-STR_ERROR_CAN_T_BUILD_TRAM_DEPOT :{WHITE}Can't build tram vehicle depot here...
-STR_ERROR_CAN_T_BUILD_SHIP_DEPOT :{WHITE}Can't build ship depot here...
-
-STR_ERROR_CAN_T_RENAME_DEPOT :{WHITE}Can't rename depot...
-
-STR_ERROR_TRAIN_MUST_BE_STOPPED_INSIDE_DEPOT :{WHITE}... must be stopped inside a depot
-STR_ERROR_ROAD_VEHICLE_MUST_BE_STOPPED_INSIDE_DEPOT :{WHITE}... must be stopped inside a depot
-STR_ERROR_SHIP_MUST_BE_STOPPED_INSIDE_DEPOT :{WHITE}... must be stopped inside a depot
-STR_ERROR_AIRCRAFT_MUST_BE_STOPPED_INSIDE_HANGAR :{WHITE}... must be stopped inside a hangar
-
-STR_ERROR_TRAINS_CAN_ONLY_BE_ALTERED_INSIDE_A_DEPOT :{WHITE}Trains can only be altered when stopped inside a depot
-STR_ERROR_TRAIN_TOO_LONG :{WHITE}Train too long
-STR_ERROR_CAN_T_REVERSE_DIRECTION_RAIL_VEHICLE :{WHITE}Can't reverse direction of vehicle...
-STR_ERROR_CAN_T_REVERSE_DIRECTION_RAIL_VEHICLE_MULTIPLE_UNITS :{WHITE}... consists of multiple units
-STR_ERROR_INCOMPATIBLE_RAIL_TYPES :Incompatible rail types
-
-STR_ERROR_CAN_T_MOVE_VEHICLE :{WHITE}Can't move vehicle...
-STR_ERROR_REAR_ENGINE_FOLLOW_FRONT :{WHITE}The rear engine will always follow its front counterpart
-STR_ERROR_UNABLE_TO_FIND_ROUTE_TO :{WHITE}Unable to find route to local depot
-STR_ERROR_UNABLE_TO_FIND_LOCAL_DEPOT :{WHITE}Unable to find local depot
-
-STR_ERROR_DEPOT_WRONG_DEPOT_TYPE :Wrong depot type
-
-# Autoreplace related errors
-STR_ERROR_TRAIN_TOO_LONG_AFTER_REPLACEMENT :{WHITE}{VEHICLE} is too long after replacement
-STR_ERROR_AUTOREPLACE_NOTHING_TO_DO :{WHITE}No autoreplace/renew rules applied
-STR_ERROR_AUTOREPLACE_MONEY_LIMIT :(money limit)
-
-# Rail construction errors
-STR_ERROR_IMPOSSIBLE_TRACK_COMBINATION :{WHITE}Impossible track combination
-STR_ERROR_MUST_REMOVE_SIGNALS_FIRST :{WHITE}Must remove signals first
-STR_ERROR_NO_SUITABLE_RAILROAD_TRACK :{WHITE}No suitable railway track
-STR_ERROR_MUST_REMOVE_RAILROAD_TRACK :{WHITE}Must remove railway track first
-STR_ERROR_CROSSING_ON_ONEWAY_ROAD :{WHITE}Road is one way or blocked
-STR_ERROR_CROSSING_DISALLOWED :{WHITE}Level crossings not allowed for this rail type
-STR_ERROR_CAN_T_BUILD_SIGNALS_HERE :{WHITE}Can't build signals here...
-STR_ERROR_CAN_T_BUILD_RAILROAD_TRACK :{WHITE}Can't build railway track here...
-STR_ERROR_CAN_T_REMOVE_RAILROAD_TRACK :{WHITE}Can't remove railway track from here...
-STR_ERROR_CAN_T_REMOVE_SIGNALS_FROM :{WHITE}Can't remove signals from here...
-STR_ERROR_SIGNAL_CAN_T_CONVERT_SIGNALS_HERE :{WHITE}Can't convert signals here...
-STR_ERROR_THERE_IS_NO_RAILROAD_TRACK :{WHITE}... there is no railway track
-STR_ERROR_THERE_ARE_NO_SIGNALS :{WHITE}... there are no signals
-
-STR_ERROR_CAN_T_CONVERT_RAIL :{WHITE}Can't convert rail type here...
-
-# Road construction errors
-STR_ERROR_MUST_REMOVE_ROAD_FIRST :{WHITE}Must remove road first
-STR_ERROR_ONEWAY_ROADS_CAN_T_HAVE_JUNCTION :{WHITE}... one way roads can't have junctions
-STR_ERROR_CAN_T_BUILD_ROAD_HERE :{WHITE}Can't build road here...
-STR_ERROR_CAN_T_BUILD_TRAMWAY_HERE :{WHITE}Can't build tramway here...
-STR_ERROR_CAN_T_REMOVE_ROAD_FROM :{WHITE}Can't remove road from here...
-STR_ERROR_CAN_T_REMOVE_TRAMWAY_FROM :{WHITE}Can't remove tramway from here...
-STR_ERROR_THERE_IS_NO_ROAD :{WHITE}... there is no road
-STR_ERROR_THERE_IS_NO_TRAMWAY :{WHITE}... there is no tramway
-
-# Waterway construction errors
-STR_ERROR_CAN_T_BUILD_CANALS :{WHITE}Can't build canals here...
-STR_ERROR_CAN_T_BUILD_LOCKS :{WHITE}Can't build locks here...
-STR_ERROR_CAN_T_PLACE_RIVERS :{WHITE}Can't place rivers here...
-STR_ERROR_MUST_BE_BUILT_ON_WATER :{WHITE}... must be built on water
-STR_ERROR_CAN_T_BUILD_ON_WATER :{WHITE}... can't build on water
-STR_ERROR_CAN_T_BUILD_ON_SEA :{WHITE}... can't build on open sea
-STR_ERROR_CAN_T_BUILD_ON_CANAL :{WHITE}... can't build on canal
-STR_ERROR_CAN_T_BUILD_ON_RIVER :{WHITE}... can't build on river
-STR_ERROR_MUST_DEMOLISH_CANAL_FIRST :{WHITE}Must demolish canal first
-STR_ERROR_CAN_T_BUILD_AQUEDUCT_HERE :{WHITE}Can't build aqueduct here...
-
-# Tree related errors
-STR_ERROR_TREE_ALREADY_HERE :{WHITE}... tree already here
-STR_ERROR_TREE_WRONG_TERRAIN_FOR_TREE_TYPE :{WHITE}... wrong terrain for tree type
-STR_ERROR_CAN_T_PLANT_TREE_HERE :{WHITE}Can't plant tree here...
-
-# Bridge related errors
-STR_ERROR_CAN_T_BUILD_BRIDGE_HERE :{WHITE}Can't build bridge here...
-STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST :{WHITE}Must demolish bridge first
-STR_ERROR_CAN_T_START_AND_END_ON :{WHITE}Can't start and end in the same spot
-STR_ERROR_BRIDGEHEADS_NOT_SAME_HEIGHT :{WHITE}Bridge heads not at the same level
-STR_ERROR_BRIDGE_TOO_LOW_FOR_TERRAIN :{WHITE}Bridge is too low for the terrain
-STR_ERROR_START_AND_END_MUST_BE_IN :{WHITE}Start and end must be in line
-STR_ERROR_ENDS_OF_BRIDGE_MUST_BOTH :{WHITE}... ends of bridge must both be on land
-STR_ERROR_BRIDGE_TOO_LONG :{WHITE}... bridge too long
-STR_ERROR_BRIDGE_THROUGH_MAP_BORDER :{WHITE}Bridge would end out of the map
-
-# Tunnel related errors
-STR_ERROR_CAN_T_BUILD_TUNNEL_HERE :{WHITE}Can't build tunnel here...
-STR_ERROR_SITE_UNSUITABLE_FOR_TUNNEL :{WHITE}Site unsuitable for tunnel entrance
-STR_ERROR_MUST_DEMOLISH_TUNNEL_FIRST :{WHITE}Must demolish tunnel first
-STR_ERROR_ANOTHER_TUNNEL_IN_THE_WAY :{WHITE}Another tunnel in the way
-STR_ERROR_TUNNEL_THROUGH_MAP_BORDER :{WHITE}Tunnel would end out of the map
-STR_ERROR_UNABLE_TO_EXCAVATE_LAND :{WHITE}Unable to excavate land for other end of tunnel
-STR_ERROR_TUNNEL_TOO_LONG :{WHITE}... tunnel too long
-
-# Object related errors
-STR_ERROR_TOO_MANY_OBJECTS :{WHITE}... too many objects
-STR_ERROR_CAN_T_BUILD_OBJECT :{WHITE}Can't build object...
-STR_ERROR_OBJECT_IN_THE_WAY :{WHITE}Object in the way
-STR_ERROR_COMPANY_HEADQUARTERS_IN :{WHITE}... company headquarters in the way
-STR_ERROR_CAN_T_PURCHASE_THIS_LAND :{WHITE}Can't purchase this land area...
-STR_ERROR_YOU_ALREADY_OWN_IT :{WHITE}... you already own it!
-
-# Group related errors
-STR_ERROR_GROUP_CAN_T_CREATE :{WHITE}Can't create group...
-STR_ERROR_GROUP_CAN_T_DELETE :{WHITE}Can't delete this group...
-STR_ERROR_GROUP_CAN_T_RENAME :{WHITE}Can't rename group...
-STR_ERROR_GROUP_CAN_T_REMOVE_ALL_VEHICLES :{WHITE}Can't remove all vehicles from this group...
-STR_ERROR_GROUP_CAN_T_ADD_VEHICLE :{WHITE}Can't add the vehicle to this group...
-STR_ERROR_GROUP_CAN_T_ADD_SHARED_VEHICLE :{WHITE}Can't add shared vehicles to group...
-
-# Generic vehicle errors
-STR_ERROR_TRAIN_IN_THE_WAY :{WHITE}Train in the way
-STR_ERROR_ROAD_VEHICLE_IN_THE_WAY :{WHITE}Road vehicle in the way
-STR_ERROR_SHIP_IN_THE_WAY :{WHITE}Ship in the way
-STR_ERROR_AIRCRAFT_IN_THE_WAY :{WHITE}Aircraft in the way
-
-STR_ERROR_CAN_T_REFIT_TRAIN :{WHITE}Can't refit train...
-STR_ERROR_CAN_T_REFIT_ROAD_VEHICLE :{WHITE}Can't refit road vehicle...
-STR_ERROR_CAN_T_REFIT_SHIP :{WHITE}Can't refit ship...
-STR_ERROR_CAN_T_REFIT_AIRCRAFT :{WHITE}Can't refit aircraft...
-
-STR_ERROR_CAN_T_RENAME_TRAIN :{WHITE}Can't name train...
-STR_ERROR_CAN_T_RENAME_ROAD_VEHICLE :{WHITE}Can't name road vehicle...
-STR_ERROR_CAN_T_RENAME_SHIP :{WHITE}Can't name ship...
-STR_ERROR_CAN_T_RENAME_AIRCRAFT :{WHITE}Can't name aircraft...
-
-STR_ERROR_CAN_T_STOP_START_TRAIN :{WHITE}Can't stop/start train...
-STR_ERROR_CAN_T_STOP_START_ROAD_VEHICLE :{WHITE}Can't stop/start road vehicle...
-STR_ERROR_CAN_T_STOP_START_SHIP :{WHITE}Can't stop/start ship...
-STR_ERROR_CAN_T_STOP_START_AIRCRAFT :{WHITE}Can't stop/start aircraft...
-
-STR_ERROR_CAN_T_SEND_TRAIN_TO_DEPOT :{WHITE}Can't send train to depot...
-STR_ERROR_CAN_T_SEND_ROAD_VEHICLE_TO_DEPOT :{WHITE}Can't send road vehicle to depot...
-STR_ERROR_CAN_T_SEND_SHIP_TO_DEPOT :{WHITE}Can't send ship to depot...
-STR_ERROR_CAN_T_SEND_AIRCRAFT_TO_HANGAR :{WHITE}Can't send aircraft to hangar...
-
-STR_ERROR_CAN_T_BUY_TRAIN :{WHITE}Can't buy railway vehicle...
-STR_ERROR_CAN_T_BUY_ROAD_VEHICLE :{WHITE}Can't buy road vehicle...
-STR_ERROR_CAN_T_BUY_SHIP :{WHITE}Can't buy ship...
-STR_ERROR_CAN_T_BUY_AIRCRAFT :{WHITE}Can't buy aircraft...
-
-STR_ERROR_CAN_T_RENAME_TRAIN_TYPE :{WHITE}Can't rename train vehicle type...
-STR_ERROR_CAN_T_RENAME_ROAD_VEHICLE_TYPE :{WHITE}Can't rename road vehicle type...
-STR_ERROR_CAN_T_RENAME_SHIP_TYPE :{WHITE}Can't rename ship type...
-STR_ERROR_CAN_T_RENAME_AIRCRAFT_TYPE :{WHITE}Can't rename aircraft type...
-
-STR_ERROR_CAN_T_SELL_TRAIN :{WHITE}Can't sell railway vehicle...
-STR_ERROR_CAN_T_SELL_ROAD_VEHICLE :{WHITE}Can't sell road vehicle...
-STR_ERROR_CAN_T_SELL_SHIP :{WHITE}Can't sell ship...
-STR_ERROR_CAN_T_SELL_AIRCRAFT :{WHITE}Can't sell aircraft...
-
-STR_ERROR_RAIL_VEHICLE_NOT_AVAILABLE :{WHITE}Vehicle is not available
-STR_ERROR_ROAD_VEHICLE_NOT_AVAILABLE :{WHITE}Vehicle is not available
-STR_ERROR_SHIP_NOT_AVAILABLE :{WHITE}Ship is not available
-STR_ERROR_AIRCRAFT_NOT_AVAILABLE :{WHITE}Aircraft is not available
-
-STR_ERROR_TOO_MANY_VEHICLES_IN_GAME :{WHITE}Too many vehicles in game
-STR_ERROR_CAN_T_CHANGE_SERVICING :{WHITE}Can't change servicing interval...
-
-STR_ERROR_VEHICLE_IS_DESTROYED :{WHITE}... vehicle is destroyed
-
-STR_ERROR_NO_VEHICLES_AVAILABLE_AT_ALL :{WHITE}No vehicles will be available at all
-STR_ERROR_NO_VEHICLES_AVAILABLE_AT_ALL_EXPLANATION :{WHITE}Change your NewGRF configuration
-STR_ERROR_NO_VEHICLES_AVAILABLE_YET :{WHITE}No vehicles are available yet
-STR_ERROR_NO_VEHICLES_AVAILABLE_YET_EXPLANATION :{WHITE}Start a new game after {DATE_SHORT} or use a NewGRF that provides early vehicles
-
-# Specific vehicle errors
-STR_ERROR_CAN_T_MAKE_TRAIN_PASS_SIGNAL :{WHITE}Can't make train pass signal at danger...
-STR_ERROR_CAN_T_REVERSE_DIRECTION_TRAIN :{WHITE}Can't reverse direction of train...
-STR_ERROR_TRAIN_START_NO_POWER :Train has no power
-
-STR_ERROR_CAN_T_MAKE_ROAD_VEHICLE_TURN :{WHITE}Can't make road vehicle turn around...
-
-STR_ERROR_AIRCRAFT_IS_IN_FLIGHT :{WHITE}Aircraft is in flight
-
-# Order related errors
-STR_ERROR_NO_MORE_SPACE_FOR_ORDERS :{WHITE}No more space for orders
-STR_ERROR_TOO_MANY_ORDERS :{WHITE}Too many orders
-STR_ERROR_CAN_T_INSERT_NEW_ORDER :{WHITE}Can't insert new order...
-STR_ERROR_CAN_T_DELETE_THIS_ORDER :{WHITE}Can't delete this order...
-STR_ERROR_CAN_T_MODIFY_THIS_ORDER :{WHITE}Can't modify this order...
-STR_ERROR_CAN_T_MOVE_THIS_ORDER :{WHITE}Can't move this order...
-STR_ERROR_CAN_T_SKIP_ORDER :{WHITE}Can't skip current order...
-STR_ERROR_CAN_T_SKIP_TO_ORDER :{WHITE}Can't skip to selected order...
-STR_ERROR_CAN_T_COPY_SHARE_ORDER :{WHITE}... vehicle can't go to all stations
-STR_ERROR_CAN_T_ADD_ORDER :{WHITE}... vehicle can't go to that station
-STR_ERROR_CAN_T_ADD_ORDER_SHARED :{WHITE}... a vehicle sharing this order can't go to that station
-
-STR_ERROR_CAN_T_SHARE_ORDER_LIST :{WHITE}Can't share order list...
-STR_ERROR_CAN_T_STOP_SHARING_ORDER_LIST :{WHITE}Can't stop sharing order list...
-STR_ERROR_CAN_T_COPY_ORDER_LIST :{WHITE}Can't copy order list...
-STR_ERROR_TOO_FAR_FROM_PREVIOUS_DESTINATION :{WHITE}... too far from previous destination
-STR_ERROR_AIRCRAFT_NOT_ENOUGH_RANGE :{WHITE}... aircraft has not enough range
-
-# Timetable related errors
-STR_ERROR_CAN_T_TIMETABLE_VEHICLE :{WHITE}Can't timetable vehicle...
-STR_ERROR_TIMETABLE_ONLY_WAIT_AT_STATIONS :{WHITE}Vehicles can only wait at stations
-STR_ERROR_TIMETABLE_NOT_STOPPING_HERE :{WHITE}This vehicle is not stopping at this station
-
-# Sign related errors
-STR_ERROR_TOO_MANY_SIGNS :{WHITE}... too many signs
-STR_ERROR_CAN_T_PLACE_SIGN_HERE :{WHITE}Can't place sign here...
-STR_ERROR_CAN_T_CHANGE_SIGN_NAME :{WHITE}Can't change sign name...
-STR_ERROR_CAN_T_DELETE_SIGN :{WHITE}Can't delete sign...
-
-# Translatable comment for OpenTTD's desktop shortcut
-STR_DESKTOP_SHORTCUT_COMMENT :A simulation game based on Transport Tycoon Deluxe
-
-# Translatable descriptions in media/baseset/*.ob* files
-STR_BASEGRAPHICS_DOS_DESCRIPTION :Original Transport Tycoon Deluxe DOS edition graphics.
-STR_BASEGRAPHICS_DOS_DE_DESCRIPTION :Original Transport Tycoon Deluxe DOS (German) edition graphics.
-STR_BASEGRAPHICS_WIN_DESCRIPTION :Original Transport Tycoon Deluxe Windows edition graphics.
-STR_BASESOUNDS_DOS_DESCRIPTION :Original Transport Tycoon Deluxe DOS edition sounds.
-STR_BASESOUNDS_WIN_DESCRIPTION :Original Transport Tycoon Deluxe Windows edition sounds.
-STR_BASESOUNDS_NONE_DESCRIPTION :A sound pack without any sounds.
-STR_BASEMUSIC_WIN_DESCRIPTION :Original Transport Tycoon Deluxe Windows edition music.
-STR_BASEMUSIC_NONE_DESCRIPTION :A music pack without actual music.
-
-##id 0x2000
-# Town building names
-STR_TOWN_BUILDING_NAME_TALL_OFFICE_BLOCK_1 :Tall office block
-STR_TOWN_BUILDING_NAME_OFFICE_BLOCK_1 :Office block
-STR_TOWN_BUILDING_NAME_SMALL_BLOCK_OF_FLATS_1 :Small block of flats
-STR_TOWN_BUILDING_NAME_CHURCH_1 :Church
-STR_TOWN_BUILDING_NAME_LARGE_OFFICE_BLOCK_1 :Large office block
-STR_TOWN_BUILDING_NAME_TOWN_HOUSES_1 :Town houses
-STR_TOWN_BUILDING_NAME_HOTEL_1 :Hotel
-STR_TOWN_BUILDING_NAME_STATUE_1 :Statue
-STR_TOWN_BUILDING_NAME_FOUNTAIN_1 :Fountain
-STR_TOWN_BUILDING_NAME_PARK_1 :Park
-STR_TOWN_BUILDING_NAME_OFFICE_BLOCK_2 :Office block
-STR_TOWN_BUILDING_NAME_SHOPS_AND_OFFICES_1 :Shops and offices
-STR_TOWN_BUILDING_NAME_MODERN_OFFICE_BUILDING_1 :Modern office building
-STR_TOWN_BUILDING_NAME_WAREHOUSE_1 :Warehouse
-STR_TOWN_BUILDING_NAME_OFFICE_BLOCK_3 :Office block
-STR_TOWN_BUILDING_NAME_STADIUM_1 :Stadium
-STR_TOWN_BUILDING_NAME_OLD_HOUSES_1 :Old houses
-STR_TOWN_BUILDING_NAME_COTTAGES_1 :Cottages
-STR_TOWN_BUILDING_NAME_HOUSES_1 :Houses
-STR_TOWN_BUILDING_NAME_FLATS_1 :Flats
-STR_TOWN_BUILDING_NAME_TALL_OFFICE_BLOCK_2 :Tall office block
-STR_TOWN_BUILDING_NAME_SHOPS_AND_OFFICES_2 :Shops and offices
-STR_TOWN_BUILDING_NAME_SHOPS_AND_OFFICES_3 :Shops and offices
-STR_TOWN_BUILDING_NAME_THEATER_1 :Theatre
-STR_TOWN_BUILDING_NAME_STADIUM_2 :Stadium
-STR_TOWN_BUILDING_NAME_OFFICES_1 :Offices
-STR_TOWN_BUILDING_NAME_HOUSES_2 :Houses
-STR_TOWN_BUILDING_NAME_CINEMA_1 :Cinema
-STR_TOWN_BUILDING_NAME_SHOPPING_MALL_1 :Shopping centre
-STR_TOWN_BUILDING_NAME_IGLOO_1 :Igloo
-STR_TOWN_BUILDING_NAME_TEPEES_1 :Tepees
-STR_TOWN_BUILDING_NAME_TEAPOT_HOUSE_1 :Teapot-House
-STR_TOWN_BUILDING_NAME_PIGGY_BANK_1 :Piggy-Bank
-
-##id 0x4800
-# industry names
-STR_INDUSTRY_NAME_COAL_MINE :Coal Mine
-STR_INDUSTRY_NAME_POWER_STATION :Power Station
-STR_INDUSTRY_NAME_SAWMILL :Sawmill
-STR_INDUSTRY_NAME_FOREST :Forest
-STR_INDUSTRY_NAME_OIL_REFINERY :Oil Refinery
-STR_INDUSTRY_NAME_OIL_RIG :Oil Rig
-STR_INDUSTRY_NAME_FACTORY :Factory
-STR_INDUSTRY_NAME_PRINTING_WORKS :Printing Works
-STR_INDUSTRY_NAME_STEEL_MILL :Steel Mill
-STR_INDUSTRY_NAME_FARM :Farm
-STR_INDUSTRY_NAME_COPPER_ORE_MINE :Copper Ore Mine
-STR_INDUSTRY_NAME_OIL_WELLS :Oil Wells
-STR_INDUSTRY_NAME_BANK :Bank
-STR_INDUSTRY_NAME_FOOD_PROCESSING_PLANT :Food Processing Plant
-STR_INDUSTRY_NAME_PAPER_MILL :Paper Mill
-STR_INDUSTRY_NAME_GOLD_MINE :Gold Mine
-STR_INDUSTRY_NAME_BANK_TROPIC_ARCTIC :Bank
-STR_INDUSTRY_NAME_DIAMOND_MINE :Diamond Mine
-STR_INDUSTRY_NAME_IRON_ORE_MINE :Iron Ore Mine
-STR_INDUSTRY_NAME_FRUIT_PLANTATION :Fruit Plantation
-STR_INDUSTRY_NAME_RUBBER_PLANTATION :Rubber Plantation
-STR_INDUSTRY_NAME_WATER_SUPPLY :Water Supply
-STR_INDUSTRY_NAME_WATER_TOWER :Water Tower
-STR_INDUSTRY_NAME_FACTORY_2 :Factory
-STR_INDUSTRY_NAME_FARM_2 :Farm
-STR_INDUSTRY_NAME_LUMBER_MILL :Lumber Mill
-STR_INDUSTRY_NAME_COTTON_CANDY_FOREST :Candyfloss Forest
-STR_INDUSTRY_NAME_CANDY_FACTORY :Sweet Factory
-STR_INDUSTRY_NAME_BATTERY_FARM :Battery Farm
-STR_INDUSTRY_NAME_COLA_WELLS :Cola Wells
-STR_INDUSTRY_NAME_TOY_SHOP :Toy Shop
-STR_INDUSTRY_NAME_TOY_FACTORY :Toy Factory
-STR_INDUSTRY_NAME_PLASTIC_FOUNTAINS :Plastic Fountains
-STR_INDUSTRY_NAME_FIZZY_DRINK_FACTORY :Fizzy Drink Factory
-STR_INDUSTRY_NAME_BUBBLE_GENERATOR :Bubble Generator
-STR_INDUSTRY_NAME_TOFFEE_QUARRY :Toffee Quarry
-STR_INDUSTRY_NAME_SUGAR_MINE :Sugar Mine
-
-############ WARNING, using range 0x6000 for strings that are stored in the savegame
-############ These strings may never get a new id, or savegames will break!
-##id 0x6000
-STR_SV_EMPTY :
-STR_SV_UNNAMED :Unnamed
-STR_SV_TRAIN_NAME :Train {COMMA}
-STR_SV_ROAD_VEHICLE_NAME :Road Vehicle {COMMA}
-STR_SV_SHIP_NAME :Ship {COMMA}
-STR_SV_AIRCRAFT_NAME :Aircraft {COMMA}
-
-STR_SV_STNAME :{STRING1}
-STR_SV_STNAME_NORTH :{STRING1} North
-STR_SV_STNAME_SOUTH :{STRING1} South
-STR_SV_STNAME_EAST :{STRING1} East
-STR_SV_STNAME_WEST :{STRING1} West
-STR_SV_STNAME_CENTRAL :{STRING1} Central
-STR_SV_STNAME_TRANSFER :{STRING1} Transfer
-STR_SV_STNAME_HALT :{STRING1} Halt
-STR_SV_STNAME_VALLEY :{STRING1} Valley
-STR_SV_STNAME_HEIGHTS :{STRING1} Heights
-STR_SV_STNAME_WOODS :{STRING1} Woods
-STR_SV_STNAME_LAKESIDE :{STRING1} Lakeside
-STR_SV_STNAME_EXCHANGE :{STRING1} Exchange
-STR_SV_STNAME_AIRPORT :{STRING1} Airport
-STR_SV_STNAME_OILFIELD :{STRING1} Oilfield
-STR_SV_STNAME_MINES :{STRING1} Mines
-STR_SV_STNAME_DOCKS :{STRING1} Docks
-STR_SV_STNAME_BUOY :{STRING2}
-STR_SV_STNAME_WAYPOINT :{STRING2}
-##id 0x6020
-STR_SV_STNAME_ANNEXE :{STRING1} Annexe
-STR_SV_STNAME_SIDINGS :{STRING1} Sidings
-STR_SV_STNAME_BRANCH :{STRING1} Branch
-STR_SV_STNAME_UPPER :Upper {STRING1}
-STR_SV_STNAME_LOWER :Lower {STRING1}
-STR_SV_STNAME_HELIPORT :{STRING1} Heliport
-STR_SV_STNAME_FOREST :{STRING1} Forest
-STR_SV_STNAME_FALLBACK :{STRING1} Station #{NUM}
-############ end of savegame specific region!
-
-##id 0x8000
-# Vehicle names
-STR_VEHICLE_NAME_TRAIN_ENGINE_RAIL_KIRBY_PAUL_TANK_STEAM :Kirby Paul Tank (Steam)
-STR_VEHICLE_NAME_TRAIN_ENGINE_RAIL_MJS_250_DIESEL :MJS 250 (Diesel)
-STR_VEHICLE_NAME_TRAIN_ENGINE_RAIL_PLODDYPHUT_CHOO_CHOO :Ploddyphut Choo-Choo
-STR_VEHICLE_NAME_TRAIN_ENGINE_RAIL_POWERNAUT_CHOO_CHOO :Powernaut Choo-Choo
-STR_VEHICLE_NAME_TRAIN_ENGINE_RAIL_MIGHTYMOVER_CHOO_CHOO :MightyMover Choo-Choo
-STR_VEHICLE_NAME_TRAIN_ENGINE_RAIL_PLODDYPHUT_DIESEL :Ploddyphut Diesel
-STR_VEHICLE_NAME_TRAIN_ENGINE_RAIL_POWERNAUT_DIESEL :Powernaut Diesel
-STR_VEHICLE_NAME_TRAIN_ENGINE_RAIL_WILLS_2_8_0_STEAM :Wills 2-8-0 (Steam)
-STR_VEHICLE_NAME_TRAIN_ENGINE_RAIL_CHANEY_JUBILEE_STEAM :Chaney 'Jubilee' (Steam)
-STR_VEHICLE_NAME_TRAIN_ENGINE_RAIL_GINZU_A4_STEAM :Ginzu 'A4' (Steam)
-STR_VEHICLE_NAME_TRAIN_ENGINE_RAIL_SH_8P_STEAM :SH '8P' (Steam)
-STR_VEHICLE_NAME_TRAIN_ENGINE_RAIL_MANLEY_MOREL_DMU_DIESEL :Manley-Morel DMU (Diesel)
-STR_VEHICLE_NAME_TRAIN_ENGINE_RAIL_DASH_DIESEL :'Dash' (Diesel)
-STR_VEHICLE_NAME_TRAIN_ENGINE_RAIL_SH_HENDRY_25_DIESEL :SH/Hendry '25' (Diesel)
-STR_VEHICLE_NAME_TRAIN_ENGINE_RAIL_UU_37_DIESEL :UU '37' (Diesel)
-STR_VEHICLE_NAME_TRAIN_ENGINE_RAIL_FLOSS_47_DIESEL :Floss '47' (Diesel)
-STR_VEHICLE_NAME_TRAIN_ENGINE_RAIL_CS_4000_DIESEL :CS 4000 (Diesel)
-STR_VEHICLE_NAME_TRAIN_ENGINE_RAIL_CS_2400_DIESEL :CS 2400 (Diesel)
-STR_VEHICLE_NAME_TRAIN_ENGINE_RAIL_CENTENNIAL_DIESEL :Centennial (Diesel)
-STR_VEHICLE_NAME_TRAIN_ENGINE_RAIL_KELLING_3100_DIESEL :Kelling 3100 (Diesel)
-STR_VEHICLE_NAME_TRAIN_ENGINE_RAIL_TURNER_TURBO_DIESEL :Turner Turbo (Diesel)
-STR_VEHICLE_NAME_TRAIN_ENGINE_RAIL_MJS_1000_DIESEL :MJS 1000 (Diesel)
-STR_VEHICLE_NAME_TRAIN_ENGINE_RAIL_SH_125_DIESEL :SH '125' (Diesel)
-STR_VEHICLE_NAME_TRAIN_ENGINE_RAIL_SH_30_ELECTRIC :SH '30' (Electric)
-STR_VEHICLE_NAME_TRAIN_ENGINE_RAIL_SH_40_ELECTRIC :SH '40' (Electric)
-STR_VEHICLE_NAME_TRAIN_ENGINE_RAIL_T_I_M_ELECTRIC :'T.I.M.' (Electric)
-STR_VEHICLE_NAME_TRAIN_ENGINE_RAIL_ASIASTAR_ELECTRIC :'AsiaStar' (Electric)
-STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_PASSENGER_CAR :Passenger Carriage
-STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_MAIL_VAN :Mail Van
-STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_COAL_CAR :Coal Truck
-STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_OIL_TANKER :Oil Tanker
-STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_LIVESTOCK_VAN :Livestock Van
-STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_GOODS_VAN :Goods Van
-STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_GRAIN_HOPPER :Grain Hopper
-STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_WOOD_TRUCK :Wood Truck
-STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_IRON_ORE_HOPPER :Iron Ore Hopper
-STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_STEEL_TRUCK :Steel Truck
-STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_ARMORED_VAN :Armoured Van
-STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_FOOD_VAN :Food Van
-STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_PAPER_TRUCK :Paper Truck
-STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_COPPER_ORE_HOPPER :Copper Ore Hopper
-STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_WATER_TANKER :Water Tanker
-STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_FRUIT_TRUCK :Fruit Truck
-STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_RUBBER_TRUCK :Rubber Truck
-STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_SUGAR_TRUCK :Sugar Truck
-STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_COTTON_CANDY_HOPPER :Candyfloss Hopper
-STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_TOFFEE_HOPPER :Toffee Hopper
-STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_BUBBLE_VAN :Bubble Van
-STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_COLA_TANKER :Cola Tanker
-STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_CANDY_VAN :Sweet Van
-STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_TOY_VAN :Toy Van
-STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_BATTERY_TRUCK :Battery Truck
-STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_FIZZY_DRINK_TRUCK :Fizzy Drink Truck
-STR_VEHICLE_NAME_TRAIN_WAGON_RAIL_PLASTIC_TRUCK :Plastic Truck
-STR_VEHICLE_NAME_TRAIN_ENGINE_MONORAIL_X2001_ELECTRIC :'X2001' (Electric)
-STR_VEHICLE_NAME_TRAIN_ENGINE_MONORAIL_MILLENNIUM_Z1_ELECTRIC :'Millennium Z1' (Electric)
-STR_VEHICLE_NAME_TRAIN_ENGINE_MONORAIL_WIZZOWOW_Z99 :Wizzowow Z99
-STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_PASSENGER_CAR :Passenger Carriage
-STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_MAIL_VAN :Mail Van
-STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_COAL_CAR :Coal Truck
-STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_OIL_TANKER :Oil Tanker
-STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_LIVESTOCK_VAN :Livestock Van
-STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_GOODS_VAN :Goods Van
-STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_GRAIN_HOPPER :Grain Hopper
-STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_WOOD_TRUCK :Wood Truck
-STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_IRON_ORE_HOPPER :Iron Ore Hopper
-STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_STEEL_TRUCK :Steel Truck
-STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_ARMORED_VAN :Armoured Van
-STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_FOOD_VAN :Food Van
-STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_PAPER_TRUCK :Paper Truck
-STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_COPPER_ORE_HOPPER :Copper Ore Hopper
-STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_WATER_TANKER :Water Tanker
-STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_FRUIT_TRUCK :Fruit Truck
-STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_RUBBER_TRUCK :Rubber Truck
-STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_SUGAR_TRUCK :Sugar Truck
-STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_COTTON_CANDY_HOPPER :Candyfloss Hopper
-STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_TOFFEE_HOPPER :Toffee Hopper
-STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_BUBBLE_VAN :Bubble Van
-STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_COLA_TANKER :Cola Tanker
-STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_CANDY_VAN :Sweet Van
-STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_TOY_VAN :Toy Van
-STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_BATTERY_TRUCK :Battery Truck
-STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_FIZZY_DRINK_TRUCK :Fizzy Drink Truck
-STR_VEHICLE_NAME_TRAIN_WAGON_MONORAIL_PLASTIC_TRUCK :Plastic Truck
-STR_VEHICLE_NAME_TRAIN_ENGINE_MAGLEV_LEV1_LEVIATHAN_ELECTRIC :Lev1 'Leviathan' (Electric)
-STR_VEHICLE_NAME_TRAIN_ENGINE_MAGLEV_LEV2_CYCLOPS_ELECTRIC :Lev2 'Cyclops' (Electric)
-STR_VEHICLE_NAME_TRAIN_ENGINE_MAGLEV_LEV3_PEGASUS_ELECTRIC :Lev3 'Pegasus' (Electric)
-STR_VEHICLE_NAME_TRAIN_ENGINE_MAGLEV_LEV4_CHIMAERA_ELECTRIC :Lev4 'Chimaera' (Electric)
-STR_VEHICLE_NAME_TRAIN_ENGINE_MAGLEV_WIZZOWOW_ROCKETEER :Wizzowow Rocketeer
-STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_PASSENGER_CAR :Passenger Carriage
-STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_MAIL_VAN :Mail Van
-STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_COAL_CAR :Coal Truck
-STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_OIL_TANKER :Oil Tanker
-STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_LIVESTOCK_VAN :Livestock Van
-STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_GOODS_VAN :Goods Van
-STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_GRAIN_HOPPER :Grain Hopper
-STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_WOOD_TRUCK :Wood Truck
-STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_IRON_ORE_HOPPER :Iron Ore Hopper
-STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_STEEL_TRUCK :Steel Truck
-STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_ARMORED_VAN :Armoured Van
-STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_FOOD_VAN :Food Van
-STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_PAPER_TRUCK :Paper Truck
-STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_COPPER_ORE_HOPPER :Copper Ore Hopper
-STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_WATER_TANKER :Water Tanker
-STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_FRUIT_TRUCK :Fruit Truck
-STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_RUBBER_TRUCK :Rubber Truck
-STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_SUGAR_TRUCK :Sugar Truck
-STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_COTTON_CANDY_HOPPER :Candyfloss Hopper
-STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_TOFFEE_HOPPER :Toffee Hopper
-STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_BUBBLE_VAN :Bubble Van
-STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_COLA_TANKER :Cola Tanker
-STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_CANDY_VAN :Sweet Van
-STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_TOY_VAN :Toy Van
-STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_BATTERY_TRUCK :Battery Truck
-STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_FIZZY_DRINK_TRUCK :Fizzy Drink Truck
-STR_VEHICLE_NAME_TRAIN_WAGON_MAGLEV_PLASTIC_TRUCK :Plastic Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_MPS_REGAL_BUS :MPS Regal Bus
-STR_VEHICLE_NAME_ROAD_VEHICLE_HEREFORD_LEOPARD_BUS :Hereford Leopard Bus
-STR_VEHICLE_NAME_ROAD_VEHICLE_FOSTER_BUS :Foster Bus
-STR_VEHICLE_NAME_ROAD_VEHICLE_FOSTER_MKII_SUPERBUS :Foster MkII Superbus
-STR_VEHICLE_NAME_ROAD_VEHICLE_PLODDYPHUT_MKI_BUS :Ploddyphut MkI Bus
-STR_VEHICLE_NAME_ROAD_VEHICLE_PLODDYPHUT_MKII_BUS :Ploddyphut MkII Bus
-STR_VEHICLE_NAME_ROAD_VEHICLE_PLODDYPHUT_MKIII_BUS :Ploddyphut MkIII Bus
-STR_VEHICLE_NAME_ROAD_VEHICLE_BALOGH_COAL_TRUCK :Balogh Coal Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_UHL_COAL_TRUCK :Uhl Coal Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_DW_COAL_TRUCK :DW Coal Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_MPS_MAIL_TRUCK :MPS Mail Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_REYNARD_MAIL_TRUCK :Reynard Mail Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_PERRY_MAIL_TRUCK :Perry Mail Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_MIGHTYMOVER_MAIL_TRUCK :MightyMover Mail Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_POWERNAUGHT_MAIL_TRUCK :Powernaught Mail Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_WIZZOWOW_MAIL_TRUCK :Wizzowow Mail Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_WITCOMBE_OIL_TANKER :Witcombe Oil Tanker
-STR_VEHICLE_NAME_ROAD_VEHICLE_FOSTER_OIL_TANKER :Foster Oil Tanker
-STR_VEHICLE_NAME_ROAD_VEHICLE_PERRY_OIL_TANKER :Perry Oil Tanker
-STR_VEHICLE_NAME_ROAD_VEHICLE_TALBOTT_LIVESTOCK_VAN :Talbott Livestock Van
-STR_VEHICLE_NAME_ROAD_VEHICLE_UHL_LIVESTOCK_VAN :Uhl Livestock Van
-STR_VEHICLE_NAME_ROAD_VEHICLE_FOSTER_LIVESTOCK_VAN :Foster Livestock Van
-STR_VEHICLE_NAME_ROAD_VEHICLE_BALOGH_GOODS_TRUCK :Balogh Goods Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_CRAIGHEAD_GOODS_TRUCK :Craighead Goods Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_GOSS_GOODS_TRUCK :Goss Goods Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_HEREFORD_GRAIN_TRUCK :Hereford Grain Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_THOMAS_GRAIN_TRUCK :Thomas Grain Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_GOSS_GRAIN_TRUCK :Goss Grain Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_WITCOMBE_WOOD_TRUCK :Witcombe Wood Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_FOSTER_WOOD_TRUCK :Foster Wood Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_MORELAND_WOOD_TRUCK :Moreland Wood Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_MPS_IRON_ORE_TRUCK :MPS Iron Ore Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_UHL_IRON_ORE_TRUCK :Uhl Iron Ore Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_CHIPPY_IRON_ORE_TRUCK :Chippy Iron Ore Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_BALOGH_STEEL_TRUCK :Balogh Steel Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_UHL_STEEL_TRUCK :Uhl Steel Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_KELLING_STEEL_TRUCK :Kelling Steel Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_BALOGH_ARMORED_TRUCK :Balogh Armoured Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_UHL_ARMORED_TRUCK :Uhl Armoured Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_FOSTER_ARMORED_TRUCK :Foster Armoured Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_FOSTER_FOOD_VAN :Foster Food Van
-STR_VEHICLE_NAME_ROAD_VEHICLE_PERRY_FOOD_VAN :Perry Food Van
-STR_VEHICLE_NAME_ROAD_VEHICLE_CHIPPY_FOOD_VAN :Chippy Food Van
-STR_VEHICLE_NAME_ROAD_VEHICLE_UHL_PAPER_TRUCK :Uhl Paper Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_BALOGH_PAPER_TRUCK :Balogh Paper Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_MPS_PAPER_TRUCK :MPS Paper Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_MPS_COPPER_ORE_TRUCK :MPS Copper Ore Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_UHL_COPPER_ORE_TRUCK :Uhl Copper Ore Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_GOSS_COPPER_ORE_TRUCK :Goss Copper Ore Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_UHL_WATER_TANKER :Uhl Water Tanker
-STR_VEHICLE_NAME_ROAD_VEHICLE_BALOGH_WATER_TANKER :Balogh Water Tanker
-STR_VEHICLE_NAME_ROAD_VEHICLE_MPS_WATER_TANKER :MPS Water Tanker
-STR_VEHICLE_NAME_ROAD_VEHICLE_BALOGH_FRUIT_TRUCK :Balogh Fruit Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_UHL_FRUIT_TRUCK :Uhl Fruit Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_KELLING_FRUIT_TRUCK :Kelling Fruit Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_BALOGH_RUBBER_TRUCK :Balogh Rubber Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_UHL_RUBBER_TRUCK :Uhl Rubber Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_RMT_RUBBER_TRUCK :RMT Rubber Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_MIGHTYMOVER_SUGAR_TRUCK :MightyMover Sugar Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_POWERNAUGHT_SUGAR_TRUCK :Powernaught Sugar Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_WIZZOWOW_SUGAR_TRUCK :Wizzowow Sugar Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_MIGHTYMOVER_COLA_TRUCK :MightyMover Cola Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_POWERNAUGHT_COLA_TRUCK :Powernaught Cola Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_WIZZOWOW_COLA_TRUCK :Wizzowow Cola Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_MIGHTYMOVER_COTTON_CANDY :MightyMover Candyfloss Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_POWERNAUGHT_COTTON_CANDY :Powernaught Candyfloss Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_WIZZOWOW_COTTON_CANDY_TRUCK :Wizzowow Candyfloss Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_MIGHTYMOVER_TOFFEE_TRUCK :MightyMover Toffee Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_POWERNAUGHT_TOFFEE_TRUCK :Powernaught Toffee Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_WIZZOWOW_TOFFEE_TRUCK :Wizzowow Toffee Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_MIGHTYMOVER_TOY_VAN :MightyMover Toy Van
-STR_VEHICLE_NAME_ROAD_VEHICLE_POWERNAUGHT_TOY_VAN :Powernaught Toy Van
-STR_VEHICLE_NAME_ROAD_VEHICLE_WIZZOWOW_TOY_VAN :Wizzowow Toy Van
-STR_VEHICLE_NAME_ROAD_VEHICLE_MIGHTYMOVER_CANDY_TRUCK :MightyMover Sweet Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_POWERNAUGHT_CANDY_TRUCK :Powernaught Sweet Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_WIZZOWOW_CANDY_TRUCK :Wizzowow Sweet Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_MIGHTYMOVER_BATTERY_TRUCK :MightyMover Battery Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_POWERNAUGHT_BATTERY_TRUCK :Powernaught Battery Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_WIZZOWOW_BATTERY_TRUCK :Wizzowow Battery Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_MIGHTYMOVER_FIZZY_DRINK :MightyMover Fizzy Drink Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_POWERNAUGHT_FIZZY_DRINK :Powernaught Fizzy Drink Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_WIZZOWOW_FIZZY_DRINK_TRUCK :Wizzowow Fizzy Drink Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_MIGHTYMOVER_PLASTIC_TRUCK :MightyMover Plastic Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_POWERNAUGHT_PLASTIC_TRUCK :Powernaught Plastic Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_WIZZOWOW_PLASTIC_TRUCK :Wizzowow Plastic Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_MIGHTYMOVER_BUBBLE_TRUCK :MightyMover Bubble Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_POWERNAUGHT_BUBBLE_TRUCK :Powernaught Bubble Truck
-STR_VEHICLE_NAME_ROAD_VEHICLE_WIZZOWOW_BUBBLE_TRUCK :Wizzowow Bubble Truck
-STR_VEHICLE_NAME_SHIP_MPS_OIL_TANKER :MPS Oil Tanker
-STR_VEHICLE_NAME_SHIP_CS_INC_OIL_TANKER :CS-Inc. Oil Tanker
-STR_VEHICLE_NAME_SHIP_MPS_PASSENGER_FERRY :MPS Passenger Ferry
-STR_VEHICLE_NAME_SHIP_FFP_PASSENGER_FERRY :FFP Passenger Ferry
-STR_VEHICLE_NAME_SHIP_BAKEWELL_300_HOVERCRAFT :Bakewell 300 Hovercraft
-STR_VEHICLE_NAME_SHIP_CHUGGER_CHUG_PASSENGER :Chugger-Chug Passenger Ferry
-STR_VEHICLE_NAME_SHIP_SHIVERSHAKE_PASSENGER_FERRY :Shivershake Passenger Ferry
-STR_VEHICLE_NAME_SHIP_YATE_CARGO_SHIP :Yate Cargo Ship
-STR_VEHICLE_NAME_SHIP_BAKEWELL_CARGO_SHIP :Bakewell Cargo Ship
-STR_VEHICLE_NAME_SHIP_MIGHTYMOVER_CARGO_SHIP :MightyMover Cargo Ship
-STR_VEHICLE_NAME_SHIP_POWERNAUT_CARGO_SHIP :Powernaut Cargo Ship
-STR_VEHICLE_NAME_AIRCRAFT_SAMPSON_U52 :Sampson U52
-STR_VEHICLE_NAME_AIRCRAFT_COLEMAN_COUNT :Coleman Count
-STR_VEHICLE_NAME_AIRCRAFT_FFP_DART :FFP Dart
-STR_VEHICLE_NAME_AIRCRAFT_YATE_HAUGAN :Yate Haugan
-STR_VEHICLE_NAME_AIRCRAFT_BAKEWELL_COTSWALD_LB_3 :Bakewell Cotswald LB-3
-STR_VEHICLE_NAME_AIRCRAFT_BAKEWELL_LUCKETT_LB_8 :Bakewell Luckett LB-8
-STR_VEHICLE_NAME_AIRCRAFT_BAKEWELL_LUCKETT_LB_9 :Bakewell Luckett LB-9
-STR_VEHICLE_NAME_AIRCRAFT_BAKEWELL_LUCKETT_LB80 :Bakewell Luckett LB80
-STR_VEHICLE_NAME_AIRCRAFT_BAKEWELL_LUCKETT_LB_10 :Bakewell Luckett LB-10
-STR_VEHICLE_NAME_AIRCRAFT_BAKEWELL_LUCKETT_LB_11 :Bakewell Luckett LB-11
-STR_VEHICLE_NAME_AIRCRAFT_YATE_AEROSPACE_YAC_1_11 :Yate Aerospace YAC 1-11
-STR_VEHICLE_NAME_AIRCRAFT_DARWIN_100 :Darwin 100
-STR_VEHICLE_NAME_AIRCRAFT_DARWIN_200 :Darwin 200
-STR_VEHICLE_NAME_AIRCRAFT_DARWIN_300 :Darwin 300
-STR_VEHICLE_NAME_AIRCRAFT_DARWIN_400 :Darwin 400
-STR_VEHICLE_NAME_AIRCRAFT_DARWIN_500 :Darwin 500
-STR_VEHICLE_NAME_AIRCRAFT_DARWIN_600 :Darwin 600
-STR_VEHICLE_NAME_AIRCRAFT_GURU_GALAXY :Guru Galaxy
-STR_VEHICLE_NAME_AIRCRAFT_AIRTAXI_A21 :Airtaxi A21
-STR_VEHICLE_NAME_AIRCRAFT_AIRTAXI_A31 :Airtaxi A31
-STR_VEHICLE_NAME_AIRCRAFT_AIRTAXI_A32 :Airtaxi A32
-STR_VEHICLE_NAME_AIRCRAFT_AIRTAXI_A33 :Airtaxi A33
-STR_VEHICLE_NAME_AIRCRAFT_YATE_AEROSPACE_YAE46 :Yate Aerospace YAe46
-STR_VEHICLE_NAME_AIRCRAFT_DINGER_100 :Dinger 100
-STR_VEHICLE_NAME_AIRCRAFT_AIRTAXI_A34_1000 :AirTaxi A34-1000
-STR_VEHICLE_NAME_AIRCRAFT_YATE_Z_SHUTTLE :Yate Z-Shuttle
-STR_VEHICLE_NAME_AIRCRAFT_KELLING_K1 :Kelling K1
-STR_VEHICLE_NAME_AIRCRAFT_KELLING_K6 :Kelling K6
-STR_VEHICLE_NAME_AIRCRAFT_KELLING_K7 :Kelling K7
-STR_VEHICLE_NAME_AIRCRAFT_DARWIN_700 :Darwin 700
-STR_VEHICLE_NAME_AIRCRAFT_FFP_HYPERDART_2 :FFP Hyperdart 2
-STR_VEHICLE_NAME_AIRCRAFT_DINGER_200 :Dinger 200
-STR_VEHICLE_NAME_AIRCRAFT_DINGER_1000 :Dinger 1000
-STR_VEHICLE_NAME_AIRCRAFT_PLODDYPHUT_100 :Ploddyphut 100
-STR_VEHICLE_NAME_AIRCRAFT_PLODDYPHUT_500 :Ploddyphut 500
-STR_VEHICLE_NAME_AIRCRAFT_FLASHBANG_X1 :Flashbang X1
-STR_VEHICLE_NAME_AIRCRAFT_JUGGERPLANE_M1 :Juggerplane M1
-STR_VEHICLE_NAME_AIRCRAFT_FLASHBANG_WIZZER :Flashbang Wizzer
-STR_VEHICLE_NAME_AIRCRAFT_TRICARIO_HELICOPTER :Tricario Helicopter
-STR_VEHICLE_NAME_AIRCRAFT_GURU_X2_HELICOPTER :Guru X2 Helicopter
-STR_VEHICLE_NAME_AIRCRAFT_POWERNAUT_HELICOPTER :Powernaut Helicopter
-
-##id 0x8800
-# Formatting of some strings
-STR_FORMAT_DATE_TINY :{RAW_STRING}-{RAW_STRING}-{NUM}
-STR_FORMAT_DATE_SHORT :{STRING} {NUM}
-STR_FORMAT_DATE_LONG :{STRING} {STRING} {NUM}
-STR_FORMAT_DATE_ISO :{2:NUM}-{1:RAW_STRING}-{0:RAW_STRING}
-
-STR_FORMAT_BUOY_NAME :{TOWN} Buoy
-STR_FORMAT_BUOY_NAME_SERIAL :{TOWN} Buoy #{COMMA}
-STR_FORMAT_COMPANY_NUM :(Company {COMMA})
-STR_FORMAT_GROUP_NAME :Group {COMMA}
-STR_FORMAT_INDUSTRY_NAME :{TOWN} {STRING}
-STR_FORMAT_WAYPOINT_NAME :{TOWN} Waypoint
-STR_FORMAT_WAYPOINT_NAME_SERIAL :{TOWN} Waypoint #{COMMA}
-
-STR_FORMAT_DEPOT_NAME_TRAIN :{TOWN} Train Depot
-STR_FORMAT_DEPOT_NAME_TRAIN_SERIAL :{TOWN} Train Depot #{COMMA}
-STR_FORMAT_DEPOT_NAME_ROAD_VEHICLE :{TOWN} Road Vehicle Depot
-STR_FORMAT_DEPOT_NAME_ROAD_VEHICLE_SERIAL :{TOWN} Road Vehicle Depot #{COMMA}
-STR_FORMAT_DEPOT_NAME_SHIP :{TOWN} Ship Depot
-STR_FORMAT_DEPOT_NAME_SHIP_SERIAL :{TOWN} Ship Depot #{COMMA}
-STR_FORMAT_DEPOT_NAME_AIRCRAFT :{STATION} Hangar
-
-STR_UNKNOWN_STATION :unknown station
-STR_DEFAULT_SIGN_NAME :Sign
-STR_COMPANY_SOMEONE :someone
-
-STR_SAVEGAME_NAME_DEFAULT :{COMPANY}, {STRING1}
-STR_SAVEGAME_NAME_SPECTATOR :Spectator, {1:STRING1}
-
-# Viewport strings
-STR_VIEWPORT_TOWN_POP :{WHITE}{TOWN} ({COMMA})
-STR_VIEWPORT_TOWN :{WHITE}{TOWN}
-STR_VIEWPORT_TOWN_TINY_BLACK :{TINY_FONT}{BLACK}{TOWN}
-STR_VIEWPORT_TOWN_TINY_WHITE :{TINY_FONT}{WHITE}{TOWN}
-
-STR_VIEWPORT_SIGN_SMALL_BLACK :{TINY_FONT}{BLACK}{SIGN}
-STR_VIEWPORT_SIGN_SMALL_WHITE :{TINY_FONT}{WHITE}{SIGN}
-
-STR_VIEWPORT_STATION :{STATION} {STATION_FEATURES}
-STR_VIEWPORT_STATION_TINY :{TINY_FONT}{STATION}
-
-STR_VIEWPORT_WAYPOINT :{WAYPOINT}
-STR_VIEWPORT_WAYPOINT_TINY :{TINY_FONT}{WAYPOINT}
-
-# Simple strings to get specific types of data
-STR_COMPANY_NAME :{COMPANY}
-STR_COMPANY_NAME_COMPANY_NUM :{COMPANY} {COMPANY_NUM}
-STR_DEPOT_NAME :{DEPOT}
-STR_ENGINE_NAME :{ENGINE}
-STR_GROUP_NAME :{GROUP}
-STR_INDUSTRY_NAME :{INDUSTRY}
-STR_PRESIDENT_NAME :{PRESIDENT_NAME}
-STR_SIGN_NAME :{SIGN}
-STR_STATION_NAME :{STATION}
-STR_TOWN_NAME :{TOWN}
-STR_VEHICLE_NAME :{VEHICLE}
-STR_WAYPOINT_NAME :{WAYPOINT}
-
-STR_JUST_CARGO :{CARGO_LONG}
-STR_JUST_CHECKMARK :{CHECKMARK}
-STR_JUST_COMMA :{COMMA}
-STR_JUST_CURRENCY_SHORT :{CURRENCY_SHORT}
-STR_JUST_CURRENCY_LONG :{CURRENCY_LONG}
-STR_JUST_CARGO_LIST :{CARGO_LIST}
-STR_JUST_INT :{NUM}
-STR_JUST_DATE_TINY :{DATE_TINY}
-STR_JUST_DATE_SHORT :{DATE_SHORT}
-STR_JUST_DATE_LONG :{DATE_LONG}
-STR_JUST_DATE_ISO :{DATE_ISO}
-STR_JUST_STRING :{STRING}
-STR_JUST_STRING_STRING :{STRING}{STRING}
-STR_JUST_RAW_STRING :{RAW_STRING}
-STR_JUST_BIG_RAW_STRING :{BIG_FONT}{RAW_STRING}
-
-# Slightly 'raw' stringcodes with colour or size
-STR_BLACK_COMMA :{BLACK}{COMMA}
-STR_TINY_BLACK_COMA :{TINY_FONT}{BLACK}{COMMA}
-STR_TINY_COMMA :{TINY_FONT}{COMMA}
-STR_BLUE_COMMA :{BLUE}{COMMA}
-STR_RED_COMMA :{RED}{COMMA}
-STR_WHITE_COMMA :{WHITE}{COMMA}
-STR_TINY_BLACK_DECIMAL :{TINY_FONT}{BLACK}{DECIMAL}
-STR_COMPANY_MONEY :{WHITE}{CURRENCY_LONG}
-STR_BLACK_DATE_LONG :{BLACK}{DATE_LONG}
-STR_BLACK_CROSS :{BLACK}{CROSS}
-STR_SILVER_CROSS :{SILVER}{CROSS}
-STR_WHITE_DATE_LONG :{WHITE}{DATE_LONG}
-STR_SHORT_DATE :{WHITE}{DATE_TINY}
-STR_DATE_LONG_SMALL :{TINY_FONT}{BLACK}{DATE_LONG}
-STR_TINY_GROUP :{TINY_FONT}{GROUP}
-STR_BLACK_INT :{BLACK}{NUM}
-STR_ORANGE_INT :{ORANGE}{NUM}
-STR_WHITE_SIGN :{WHITE}{SIGN}
-STR_TINY_BLACK_STATION :{TINY_FONT}{BLACK}{STATION}
-STR_BLACK_STRING :{BLACK}{STRING}
-STR_BLACK_RAW_STRING :{BLACK}{RAW_STRING}
-STR_GREEN_STRING :{GREEN}{STRING}
-STR_ORANGE_STRING :{ORANGE}{STRING}
-STR_RED_STRING :{RED}{STRING}
-STR_LTBLUE_STRING :{LTBLUE}{STRING}
-STR_WHITE_STRING :{WHITE}{STRING}
-STR_ORANGE_STRING1_WHITE :{ORANGE}{STRING1}{WHITE}
-STR_ORANGE_STRING1_LTBLUE :{ORANGE}{STRING1}{LTBLUE}
-STR_TINY_BLACK_HEIGHT :{TINY_FONT}{BLACK}{HEIGHT}
-STR_TINY_BLACK_VEHICLE :{TINY_FONT}{BLACK}{VEHICLE}
-STR_TINY_RIGHT_ARROW :{TINY_FONT}{RIGHT_ARROW}
-
-STR_BLACK_1 :{BLACK}1
-STR_BLACK_2 :{BLACK}2
-STR_BLACK_3 :{BLACK}3
-STR_BLACK_4 :{BLACK}4
-STR_BLACK_5 :{BLACK}5
-STR_BLACK_6 :{BLACK}6
-STR_BLACK_7 :{BLACK}7
-
-STR_TRAIN :{BLACK}{TRAIN}
-STR_BUS :{BLACK}{BUS}
-STR_LORRY :{BLACK}{LORRY}
-STR_PLANE :{BLACK}{PLANE}
-STR_SHIP :{BLACK}{SHIP}
-
-STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
diff --git a/src/misc_gui.cpp.orig b/src/misc_gui.cpp.orig
deleted file mode 100644
index 1746573c90..0000000000
--- a/src/misc_gui.cpp.orig
+++ /dev/null
@@ -1,1210 +0,0 @@
-/* $Id$ */
-
-/*
- * This file is part of OpenTTD.
- * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
- * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see .
- */
-
-/** @file misc_gui.cpp GUIs for a number of misc windows. */
-
-#include "stdafx.h"
-#include "debug.h"
-#include "landscape.h"
-#include "error.h"
-#include "gui.h"
-#include "command_func.h"
-#include "company_func.h"
-#include "town.h"
-#include "string_func.h"
-#include "company_base.h"
-#include "texteff.hpp"
-#include "strings_func.h"
-#include "window_func.h"
-#include "querystring_gui.h"
-#include "core/geometry_func.hpp"
-#include "newgrf_debug.h"
-
-#include "widgets/misc_widget.h"
-
-#include "table/strings.h"
-
-/** Method to open the OSK. */
-enum OskActivation {
- OSKA_DISABLED, ///< The OSK shall not be activated at all.
- OSKA_DOUBLE_CLICK, ///< Double click on the edit box opens OSK.
- OSKA_SINGLE_CLICK, ///< Single click after focus click opens OSK.
- OSKA_IMMEDIATELY, ///< Focusing click already opens OSK.
-};
-
-
-static const NWidgetPart _nested_land_info_widgets[] = {
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_CLOSEBOX, COLOUR_GREY),
- NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_LAND_AREA_INFORMATION_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
- NWidget(WWT_DEBUGBOX, COLOUR_GREY),
- EndContainer(),
- NWidget(WWT_PANEL, COLOUR_GREY, WID_LI_BACKGROUND), EndContainer(),
-};
-
-static WindowDesc _land_info_desc(
- WDP_AUTO, "land_info", 0, 0,
- WC_LAND_INFO, WC_NONE,
- 0,
- _nested_land_info_widgets, lengthof(_nested_land_info_widgets)
-);
-
-class LandInfoWindow : public Window {
- enum LandInfoLines {
- LAND_INFO_CENTERED_LINES = 32, ///< Up to 32 centered lines (arbitrary limit)
- LAND_INFO_MULTICENTER_LINE = LAND_INFO_CENTERED_LINES, ///< One multicenter line
- LAND_INFO_LINE_END,
- };
-
- static const uint LAND_INFO_LINE_BUFF_SIZE = 512;
-
-public:
- char landinfo_data[LAND_INFO_LINE_END][LAND_INFO_LINE_BUFF_SIZE];
- TileIndex tile;
-
- virtual void DrawWidget(const Rect &r, int widget) const
- {
- if (widget != WID_LI_BACKGROUND) return;
-
- uint y = r.top + WD_TEXTPANEL_TOP;
- for (uint i = 0; i < LAND_INFO_CENTERED_LINES; i++) {
- if (StrEmpty(this->landinfo_data[i])) break;
-
- DrawString(r.left + WD_FRAMETEXT_LEFT, r.right - WD_FRAMETEXT_RIGHT, y, this->landinfo_data[i], i == 0 ? TC_LIGHT_BLUE : TC_FROMSTRING, SA_HOR_CENTER);
- y += FONT_HEIGHT_NORMAL + WD_PAR_VSEP_NORMAL;
- if (i == 0) y += 4;
- }
-
- if (!StrEmpty(this->landinfo_data[LAND_INFO_MULTICENTER_LINE])) {
- SetDParamStr(0, this->landinfo_data[LAND_INFO_MULTICENTER_LINE]);
- DrawStringMultiLine(r.left + WD_FRAMETEXT_LEFT, r.right - WD_FRAMETEXT_RIGHT, y, r.bottom - WD_TEXTPANEL_BOTTOM, STR_JUST_RAW_STRING, TC_FROMSTRING, SA_CENTER);
- }
- }
-
- virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
- {
- if (widget != WID_LI_BACKGROUND) return;
-
- size->height = WD_TEXTPANEL_TOP + WD_TEXTPANEL_BOTTOM;
- for (uint i = 0; i < LAND_INFO_CENTERED_LINES; i++) {
- if (StrEmpty(this->landinfo_data[i])) break;
-
- uint width = GetStringBoundingBox(this->landinfo_data[i]).width + WD_FRAMETEXT_LEFT + WD_FRAMETEXT_RIGHT;
- size->width = max(size->width, width);
-
- size->height += FONT_HEIGHT_NORMAL + WD_PAR_VSEP_NORMAL;
- if (i == 0) size->height += 4;
- }
-
- if (!StrEmpty(this->landinfo_data[LAND_INFO_MULTICENTER_LINE])) {
- uint width = GetStringBoundingBox(this->landinfo_data[LAND_INFO_MULTICENTER_LINE]).width + WD_FRAMETEXT_LEFT + WD_FRAMETEXT_RIGHT;
- size->width = max(size->width, min(300u, width));
- SetDParamStr(0, this->landinfo_data[LAND_INFO_MULTICENTER_LINE]);
- size->height += GetStringHeight(STR_JUST_RAW_STRING, size->width - WD_FRAMETEXT_LEFT - WD_FRAMETEXT_RIGHT);
- }
- }
-
- LandInfoWindow(TileIndex tile) : Window(&_land_info_desc), tile(tile)
- {
- this->InitNested();
-
-#if defined(_DEBUG)
-# define LANDINFOD_LEVEL 0
-#else
-# define LANDINFOD_LEVEL 1
-#endif
- DEBUG(misc, LANDINFOD_LEVEL, "TILE: %#x (%i,%i)", tile, TileX(tile), TileY(tile));
- DEBUG(misc, LANDINFOD_LEVEL, "type_height = %#x", _m[tile].type_height);
- DEBUG(misc, LANDINFOD_LEVEL, "m1 = %#x", _m[tile].m1);
- DEBUG(misc, LANDINFOD_LEVEL, "m2 = %#x", _m[tile].m2);
- DEBUG(misc, LANDINFOD_LEVEL, "m3 = %#x", _m[tile].m3);
- DEBUG(misc, LANDINFOD_LEVEL, "m4 = %#x", _m[tile].m4);
- DEBUG(misc, LANDINFOD_LEVEL, "m5 = %#x", _m[tile].m5);
- DEBUG(misc, LANDINFOD_LEVEL, "m6 = %#x", _m[tile].m6);
- DEBUG(misc, LANDINFOD_LEVEL, "m7 = %#x", _me[tile].m7);
-#undef LANDINFOD_LEVEL
- }
-
- virtual void OnInit()
- {
- Town *t = ClosestTownFromTile(tile, _settings_game.economy.dist_local_authority);
-
- /* Because build_date is not set yet in every TileDesc, we make sure it is empty */
- TileDesc td;
-
- td.build_date = INVALID_DATE;
-
- /* Most tiles have only one owner, but
- * - drivethrough roadstops can be build on town owned roads (up to 2 owners) and
- * - roads can have up to four owners (railroad, road, tram, 3rd-roadtype "highway").
- */
- td.owner_type[0] = STR_LAND_AREA_INFORMATION_OWNER; // At least one owner is displayed, though it might be "N/A".
- td.owner_type[1] = STR_NULL; // STR_NULL results in skipping the owner
- td.owner_type[2] = STR_NULL;
- td.owner_type[3] = STR_NULL;
- td.owner[0] = OWNER_NONE;
- td.owner[1] = OWNER_NONE;
- td.owner[2] = OWNER_NONE;
- td.owner[3] = OWNER_NONE;
-
- td.station_class = STR_NULL;
- td.station_name = STR_NULL;
- td.airport_class = STR_NULL;
- td.airport_name = STR_NULL;
- td.airport_tile_name = STR_NULL;
- td.rail_speed = 0;
- td.road_speed = 0;
-
- td.grf = NULL;
-
- CargoArray acceptance;
- AddAcceptedCargo(tile, acceptance, NULL);
- GetTileDesc(tile, &td);
-
- uint line_nr = 0;
-
- /* Tiletype */
- SetDParam(0, td.dparam[0]);
- GetString(this->landinfo_data[line_nr], td.str, lastof(this->landinfo_data[line_nr]));
- line_nr++;
-
- /* Up to four owners */
- for (uint i = 0; i < 4; i++) {
- if (td.owner_type[i] == STR_NULL) continue;
-
- SetDParam(0, STR_LAND_AREA_INFORMATION_OWNER_N_A);
- if (td.owner[i] != OWNER_NONE && td.owner[i] != OWNER_WATER) GetNameOfOwner(td.owner[i], tile);
- GetString(this->landinfo_data[line_nr], td.owner_type[i], lastof(this->landinfo_data[line_nr]));
- line_nr++;
- }
-
- /* Cost to clear/revenue when cleared */
- StringID str = STR_LAND_AREA_INFORMATION_COST_TO_CLEAR_N_A;
- Company *c = Company::GetIfValid(_local_company);
- if (c != NULL) {
- Money old_money = c->money;
- c->money = INT64_MAX;
- assert(_current_company == _local_company);
- CommandCost costclear = DoCommand(tile, 0, 0, DC_NONE, CMD_LANDSCAPE_CLEAR);
- c->money = old_money;
- if (costclear.Succeeded()) {
- Money cost = costclear.GetCost();
- if (cost < 0) {
- cost = -cost; // Negate negative cost to a positive revenue
- str = STR_LAND_AREA_INFORMATION_REVENUE_WHEN_CLEARED;
- } else {
- str = STR_LAND_AREA_INFORMATION_COST_TO_CLEAR;
- }
- SetDParam(0, cost);
- }
- }
- GetString(this->landinfo_data[line_nr], str, lastof(this->landinfo_data[line_nr]));
- line_nr++;
-
- /* Location */
- char tmp[16];
- snprintf(tmp, lengthof(tmp), "0x%.4X", tile);
- SetDParam(0, TileX(tile));
- SetDParam(1, TileY(tile));
- SetDParam(2, GetTileZ(tile));
- SetDParamStr(3, tmp);
- GetString(this->landinfo_data[line_nr], STR_LAND_AREA_INFORMATION_LANDINFO_COORDS, lastof(this->landinfo_data[line_nr]));
- line_nr++;
-
- /* Local authority */
- SetDParam(0, STR_LAND_AREA_INFORMATION_LOCAL_AUTHORITY_NONE);
- if (t != NULL) {
- SetDParam(0, STR_TOWN_NAME);
- SetDParam(1, t->index);
- }
- GetString(this->landinfo_data[line_nr], STR_LAND_AREA_INFORMATION_LOCAL_AUTHORITY, lastof(this->landinfo_data[line_nr]));
- line_nr++;
-
- /* Build date */
- if (td.build_date != INVALID_DATE) {
- SetDParam(0, td.build_date);
- GetString(this->landinfo_data[line_nr], STR_LAND_AREA_INFORMATION_BUILD_DATE, lastof(this->landinfo_data[line_nr]));
- line_nr++;
- }
-
- /* Station class */
- if (td.station_class != STR_NULL) {
- SetDParam(0, td.station_class);
- GetString(this->landinfo_data[line_nr], STR_LAND_AREA_INFORMATION_STATION_CLASS, lastof(this->landinfo_data[line_nr]));
- line_nr++;
- }
-
- /* Station type name */
- if (td.station_name != STR_NULL) {
- SetDParam(0, td.station_name);
- GetString(this->landinfo_data[line_nr], STR_LAND_AREA_INFORMATION_STATION_TYPE, lastof(this->landinfo_data[line_nr]));
- line_nr++;
- }
-
- /* Airport class */
- if (td.airport_class != STR_NULL) {
- SetDParam(0, td.airport_class);
- GetString(this->landinfo_data[line_nr], STR_LAND_AREA_INFORMATION_AIRPORT_CLASS, lastof(this->landinfo_data[line_nr]));
- line_nr++;
- }
-
- /* Airport name */
- if (td.airport_name != STR_NULL) {
- SetDParam(0, td.airport_name);
- GetString(this->landinfo_data[line_nr], STR_LAND_AREA_INFORMATION_AIRPORT_NAME, lastof(this->landinfo_data[line_nr]));
- line_nr++;
- }
-
- /* Airport tile name */
- if (td.airport_tile_name != STR_NULL) {
- SetDParam(0, td.airport_tile_name);
- GetString(this->landinfo_data[line_nr], STR_LAND_AREA_INFORMATION_AIRPORTTILE_NAME, lastof(this->landinfo_data[line_nr]));
- line_nr++;
- }
-
- /* Rail speed limit */
- if (td.rail_speed != 0) {
- SetDParam(0, td.rail_speed);
- GetString(this->landinfo_data[line_nr], STR_LANG_AREA_INFORMATION_RAIL_SPEED_LIMIT, lastof(this->landinfo_data[line_nr]));
- line_nr++;
- }
-
- /* Road speed limit */
- if (td.road_speed != 0) {
- SetDParam(0, td.road_speed);
- GetString(this->landinfo_data[line_nr], STR_LANG_AREA_INFORMATION_ROAD_SPEED_LIMIT, lastof(this->landinfo_data[line_nr]));
- line_nr++;
- }
-
- /* NewGRF name */
- if (td.grf != NULL) {
- SetDParamStr(0, td.grf);
- GetString(this->landinfo_data[line_nr], STR_LAND_AREA_INFORMATION_NEWGRF_NAME, lastof(this->landinfo_data[line_nr]));
- line_nr++;
- }
-
- assert(line_nr < LAND_INFO_CENTERED_LINES);
-
- /* Mark last line empty */
- this->landinfo_data[line_nr][0] = '\0';
-
- /* Cargo acceptance is displayed in a extra multiline */
- char *strp = GetString(this->landinfo_data[LAND_INFO_MULTICENTER_LINE], STR_LAND_AREA_INFORMATION_CARGO_ACCEPTED, lastof(this->landinfo_data[LAND_INFO_MULTICENTER_LINE]));
- bool found = false;
-
- for (CargoID i = 0; i < NUM_CARGO; ++i) {
- if (acceptance[i] > 0) {
- /* Add a comma between each item. */
- if (found) {
- *strp++ = ',';
- *strp++ = ' ';
- }
- found = true;
-
- /* If the accepted value is less than 8, show it in 1/8:ths */
- if (acceptance[i] < 8) {
- SetDParam(0, acceptance[i]);
- SetDParam(1, CargoSpec::Get(i)->name);
- strp = GetString(strp, STR_LAND_AREA_INFORMATION_CARGO_EIGHTS, lastof(this->landinfo_data[LAND_INFO_MULTICENTER_LINE]));
- } else {
- strp = GetString(strp, CargoSpec::Get(i)->name, lastof(this->landinfo_data[LAND_INFO_MULTICENTER_LINE]));
- }
- }
- }
- if (!found) this->landinfo_data[LAND_INFO_MULTICENTER_LINE][0] = '\0';
- }
-
- virtual bool IsNewGRFInspectable() const
- {
- return ::IsNewGRFInspectable(GetGrfSpecFeature(this->tile), this->tile);
- }
-
- virtual void ShowNewGRFInspectWindow() const
- {
- ::ShowNewGRFInspectWindow(GetGrfSpecFeature(this->tile), this->tile);
- }
-
- /**
- * Some data on this window has become invalid.
- * @param data Information about the changed data.
- * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
- */
- virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
- {
- if (!gui_scope) return;
- switch (data) {
- case 1:
- /* ReInit, "debug" sprite might have changed */
- this->ReInit();
- break;
- }
- }
-};
-
-/**
- * Show land information window.
- * @param tile The tile to show information about.
- */
-void ShowLandInfo(TileIndex tile)
-{
- DeleteWindowById(WC_LAND_INFO, 0);
- new LandInfoWindow(tile);
-}
-
-static const NWidgetPart _nested_about_widgets[] = {
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_CLOSEBOX, COLOUR_GREY),
- NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_ABOUT_OPENTTD, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
- EndContainer(),
- NWidget(WWT_PANEL, COLOUR_GREY), SetPIP(4, 2, 4),
- NWidget(WWT_LABEL, COLOUR_GREY), SetDataTip(STR_ABOUT_ORIGINAL_COPYRIGHT, STR_NULL),
- NWidget(WWT_LABEL, COLOUR_GREY), SetDataTip(STR_ABOUT_VERSION, STR_NULL),
- NWidget(WWT_FRAME, COLOUR_GREY), SetPadding(0, 5, 1, 5),
- NWidget(WWT_EMPTY, INVALID_COLOUR, WID_A_SCROLLING_TEXT),
- EndContainer(),
- NWidget(WWT_LABEL, COLOUR_GREY, WID_A_WEBSITE), SetDataTip(STR_BLACK_RAW_STRING, STR_NULL),
- NWidget(WWT_LABEL, COLOUR_GREY), SetDataTip(STR_ABOUT_COPYRIGHT_OPENTTD, STR_NULL),
- EndContainer(),
-};
-
-static WindowDesc _about_desc(
- WDP_CENTER, NULL, 0, 0,
- WC_GAME_OPTIONS, WC_NONE,
- 0,
- _nested_about_widgets, lengthof(_nested_about_widgets)
-);
-
-static const char * const _credits[] = {
- "Original design by Chris Sawyer",
- "Original graphics by Simon Foster",
- "",
- "The OpenTTD team (in alphabetical order):",
- " Albert Hofkamp (Alberth) - GUI expert",
- " Jean-Fran\xC3\xA7ois Claeys (Belugas) - GUI, newindustries and more",
- " Matthijs Kooijman (blathijs) - Pathfinder-guru, pool rework",
- " Christoph Elsenhans (frosch) - General coding",
- " Ulf Hermann (fonsinchen) - Cargo Distribution",
- " Lo\xC3\xAF""c Guilloux (glx) - Windows Expert",
- " Michael Lutz (michi_cc) - Path based signals",
- " Owen Rudge (orudge) - Forum host, OS/2 port",
- " Peter Nelson (peter1138) - Spiritual descendant from NewGRF gods",
- " Ingo von Borstel (planetmaker) - Support",
- " Remko Bijker (Rubidium) - Lead coder and way more",
- " Zden\xC4\x9Bk Sojka (SmatZ) - Bug finder and fixer",
- " Jos\xC3\xA9 Soler (Terkhen) - General coding",
- " Thijs Marinussen (Yexo) - AI Framework",
- " Leif Linse (Zuu) - AI/Game Script",
- "",
- "Inactive Developers:",
- " Bjarni Corfitzen (Bjarni) - MacOSX port, coder and vehicles",
- " Victor Fischer (Celestar) - Programming everywhere you need him to",
- " Tam\xC3\xA1s Farag\xC3\xB3 (Darkvater) - Ex-Lead coder",
- " Jaroslav Mazanec (KUDr) - YAPG (Yet Another Pathfinder God) ;)",
- " Jonathan Coome (Maedhros) - High priest of the NewGRF Temple",
- " Attila B\xC3\xA1n (MiHaMiX) - Developer WebTranslator 1 and 2",
- " Christoph Mallon (Tron) - Programmer, code correctness police",
- "",
- "Retired Developers:",
- " Ludvig Strigeus (ludde) - OpenTTD author, main coder (0.1 - 0.3.3)",
- " Serge Paquet (vurlix) - Assistant project manager, coder (0.1 - 0.3.3)",
- " Dominik Scherer (dominik81) - Lead programmer, GUI expert (0.3.0 - 0.3.6)",
- " Benedikt Br\xC3\xBCggemeier (skidd13) - Bug fixer and code reworker",
- " Patric Stout (TrueBrain) - NoProgrammer (0.3 - 1.2), sys op (active)",
- "",
- "Special thanks go out to:",
- " Josef Drexler - For his great work on TTDPatch",
- " Marcin Grzegorczyk - Track foundations and for describing TTD internals",
- " Petr Baudi\xC5\xA1 (pasky) - Many patches, newGRF support",
- " Simon Sasburg (HackyKid) - Many bugfixes he has blessed us with",
- " Stefan Mei\xC3\x9Fner (sign_de) - For his work on the console",
- " Mike Ragsdale - OpenTTD installer",
- " Cian Duffy (MYOB) - BeOS port / manual writing",
- " Christian Rosentreter (tokai) - MorphOS / AmigaOS port",
- " Richard Kempton (richK) - additional airports, initial TGP implementation",
- "",
- " Alberto Demichelis - Squirrel scripting language \xC2\xA9 2003-2008",
- " L. Peter Deutsch - MD5 implementation \xC2\xA9 1999, 2000, 2002",
- " Michael Blunck - Pre-signals and semaphores \xC2\xA9 2003",
- " George - Canal/Lock graphics \xC2\xA9 2003-2004",
- " Andrew Parkhouse (andythenorth) - River graphics",
- " David Dallaston (Pikka) - Tram tracks",
- " All Translators - Who made OpenTTD a truly international game",
- " Bug Reporters - Without whom OpenTTD would still be full of bugs!",
- "",
- "",
- "And last but not least:",
- " Chris Sawyer - For an amazing game!"
-};
-
-struct AboutWindow : public Window {
- int text_position; ///< The top of the scrolling text
- byte counter; ///< Used to scroll the text every 5 ticks
- int line_height; ///< The height of a single line
- static const int num_visible_lines = 19; ///< The number of lines visible simultaneously
-
- AboutWindow() : Window(&_about_desc)
- {
- this->InitNested(WN_GAME_OPTIONS_ABOUT);
-
- this->counter = 5;
- this->text_position = this->GetWidget(WID_A_SCROLLING_TEXT)->pos_y + this->GetWidget(WID_A_SCROLLING_TEXT)->current_y;
- }
-
- virtual void SetStringParameters(int widget) const
- {
- if (widget == WID_A_WEBSITE) SetDParamStr(0, "Website: http://www.openttd.org");
- }
-
- virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
- {
- if (widget != WID_A_SCROLLING_TEXT) return;
-
- this->line_height = FONT_HEIGHT_NORMAL;
-
- Dimension d;
- d.height = this->line_height * num_visible_lines;
-
- d.width = 0;
- for (uint i = 0; i < lengthof(_credits); i++) {
- d.width = max(d.width, GetStringBoundingBox(_credits[i]).width);
- }
- *size = maxdim(*size, d);
- }
-
- virtual void DrawWidget(const Rect &r, int widget) const
- {
- if (widget != WID_A_SCROLLING_TEXT) return;
-
- int y = this->text_position;
-
- /* Show all scrolling _credits */
- for (uint i = 0; i < lengthof(_credits); i++) {
- if (y >= r.top + 7 && y < r.bottom - this->line_height) {
- DrawString(r.left, r.right, y, _credits[i], TC_BLACK, SA_LEFT | SA_FORCE);
- }
- y += this->line_height;
- }
- }
-
- virtual void OnTick()
- {
- if (--this->counter == 0) {
- this->counter = 5;
- this->text_position--;
- /* If the last text has scrolled start a new from the start */
- if (this->text_position < (int)(this->GetWidget(WID_A_SCROLLING_TEXT)->pos_y - lengthof(_credits) * this->line_height)) {
- this->text_position = this->GetWidget(WID_A_SCROLLING_TEXT)->pos_y + this->GetWidget(WID_A_SCROLLING_TEXT)->current_y;
- }
- this->SetDirty();
- }
- }
-};
-
-void ShowAboutWindow()
-{
- DeleteWindowByClass(WC_GAME_OPTIONS);
- new AboutWindow();
-}
-
-/**
- * Display estimated costs.
- * @param cost Estimated cost (or income if negative).
- * @param x X position of the notification window.
- * @param y Y position of the notification window.
- */
-void ShowEstimatedCostOrIncome(Money cost, int x, int y)
-{
- StringID msg = STR_MESSAGE_ESTIMATED_COST;
-
- if (cost < 0) {
- cost = -cost;
- msg = STR_MESSAGE_ESTIMATED_INCOME;
- }
- SetDParam(0, cost);
- ShowErrorMessage(msg, INVALID_STRING_ID, WL_INFO, x, y);
-}
-
-/**
- * Display animated income or costs on the map.
- * @param x World X position of the animation location.
- * @param y World Y position of the animation location.
- * @param z World Z position of the animation location.
- * @param cost Estimated cost (or income if negative).
- */
-void ShowCostOrIncomeAnimation(int x, int y, int z, Money cost)
-{
- Point pt = RemapCoords(x, y, z);
- StringID msg = STR_INCOME_FLOAT_COST;
-
- if (cost < 0) {
- cost = -cost;
- msg = STR_INCOME_FLOAT_INCOME;
- }
- SetDParam(0, cost);
- AddTextEffect(msg, pt.x, pt.y, DAY_TICKS, TE_RISING);
-}
-
-/**
- * Display animated feeder income.
- * @param x World X position of the animation location.
- * @param y World Y position of the animation location.
- * @param z World Z position of the animation location.
- * @param transfer Estimated feeder income.
- * @param income Real income from goods being delivered to their final destination.
- */
-void ShowFeederIncomeAnimation(int x, int y, int z, Money transfer, Money income)
-{
- Point pt = RemapCoords(x, y, z);
-
- SetDParam(0, transfer);
- if (income == 0) {
- AddTextEffect(STR_FEEDER, pt.x, pt.y, DAY_TICKS, TE_RISING);
- } else {
- StringID msg = STR_FEEDER_COST;
- if (income < 0) {
- income = -income;
- msg = STR_FEEDER_INCOME;
- }
- SetDParam(1, income);
- AddTextEffect(msg, pt.x, pt.y, DAY_TICKS, TE_RISING);
- }
-}
-
-/**
- * Display vehicle loading indicators.
- * @param x World X position of the animation location.
- * @param y World Y position of the animation location.
- * @param z World Z position of the animation location.
- * @param percent Estimated feeder income.
- * @param string String which is drawn on the map.
- * @return TextEffectID to be used for future updates of the loading indicators.
- */
-TextEffectID ShowFillingPercent(int x, int y, int z, uint8 percent, StringID string)
-{
- Point pt = RemapCoords(x, y, z);
-
- assert(string != STR_NULL);
-
- SetDParam(0, percent);
- return AddTextEffect(string, pt.x, pt.y, 0, TE_STATIC);
-}
-
-/**
- * Update vehicle loading indicators.
- * @param te_id TextEffectID to be updated.
- * @param string String wich is printed.
- */
-void UpdateFillingPercent(TextEffectID te_id, uint8 percent, StringID string)
-{
- assert(string != STR_NULL);
-
- SetDParam(0, percent);
- UpdateTextEffect(te_id, string);
-}
-
-/**
- * Hide vehicle loading indicators.
- * @param *te_id TextEffectID which is supposed to be hidden.
- */
-void HideFillingPercent(TextEffectID *te_id)
-{
- if (*te_id == INVALID_TE_ID) return;
-
- RemoveTextEffect(*te_id);
- *te_id = INVALID_TE_ID;
-}
-
-static const NWidgetPart _nested_tooltips_widgets[] = {
- NWidget(WWT_PANEL, COLOUR_GREY, WID_TT_BACKGROUND), SetMinimalSize(200, 32), EndContainer(),
-};
-
-static WindowDesc _tool_tips_desc(
- WDP_MANUAL, NULL, 0, 0, // Coordinates and sizes are not used,
- WC_TOOLTIPS, WC_NONE,
- 0,
- _nested_tooltips_widgets, lengthof(_nested_tooltips_widgets)
-);
-
-/** Window for displaying a tooltip. */
-struct TooltipsWindow : public Window
-{
- StringID string_id; ///< String to display as tooltip.
- byte paramcount; ///< Number of string parameters in #string_id.
- uint64 params[5]; ///< The string parameters.
- TooltipCloseCondition close_cond; ///< Condition for closing the window.
-
- TooltipsWindow(Window *parent, StringID str, uint paramcount, const uint64 params[], TooltipCloseCondition close_tooltip) : Window(&_tool_tips_desc)
- {
- this->parent = parent;
- this->string_id = str;
- assert_compile(sizeof(this->params[0]) == sizeof(params[0]));
- assert(paramcount <= lengthof(this->params));
- memcpy(this->params, params, sizeof(this->params[0]) * paramcount);
- this->paramcount = paramcount;
- this->close_cond = close_tooltip;
-
- this->InitNested();
-
- CLRBITS(this->flags, WF_WHITE_BORDER);
- }
-
- virtual Point OnInitialPosition(int16 sm_width, int16 sm_height, int window_number)
- {
- /* Find the free screen space between the main toolbar at the top, and the statusbar at the bottom.
- * Add a fixed distance 2 so the tooltip floats free from both bars.
- */
- int scr_top = GetMainViewTop() + 2;
- int scr_bot = GetMainViewBottom() - 2;
-
- Point pt;
-
- /* Correctly position the tooltip position, watch out for window and cursor size
- * Clamp value to below main toolbar and above statusbar. If tooltip would
- * go below window, flip it so it is shown above the cursor */
- pt.y = Clamp(_cursor.pos.y + _cursor.size.y + _cursor.offs.y + 5, scr_top, scr_bot);
- if (pt.y + sm_height > scr_bot) pt.y = min(_cursor.pos.y + _cursor.offs.y - 5, scr_bot) - sm_height;
- pt.x = sm_width >= _screen.width ? 0 : Clamp(_cursor.pos.x - (sm_width >> 1), 0, _screen.width - sm_width);
-
- return pt;
- }
-
- virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
- {
- /* There is only one widget. */
- for (uint i = 0; i != this->paramcount; i++) SetDParam(i, this->params[i]);
-
- size->width = min(GetStringBoundingBox(this->string_id).width, 194);
- size->height = GetStringHeight(this->string_id, size->width);
-
- /* Increase slightly to have some space around the box. */
- size->width += 2 + WD_FRAMERECT_LEFT + WD_FRAMERECT_RIGHT;
- size->height += 2 + WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM;
- }
-
- virtual void DrawWidget(const Rect &r, int widget) const
- {
- /* There is only one widget. */
- GfxFillRect(r.left, r.top, r.right, r.bottom, PC_BLACK);
- GfxFillRect(r.left + 1, r.top + 1, r.right - 1, r.bottom - 1, PC_LIGHT_YELLOW);
-
- for (uint arg = 0; arg < this->paramcount; arg++) {
- SetDParam(arg, this->params[arg]);
- }
- DrawStringMultiLine(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP, r.bottom - WD_FRAMERECT_BOTTOM, this->string_id, TC_FROMSTRING, SA_CENTER);
- }
-
- virtual void OnMouseLoop()
- {
- /* Always close tooltips when the cursor is not in our window. */
- if (!_cursor.in_window) {
- delete this;
- return;
- }
-
- /* We can show tooltips while dragging tools. These are shown as long as
- * we are dragging the tool. Normal tooltips work with hover or rmb. */
- switch (this->close_cond) {
- case TCC_RIGHT_CLICK: if (!_right_button_down) delete this; break;
- case TCC_LEFT_CLICK: if (!_left_button_down) delete this; break;
- case TCC_HOVER: if (!_mouse_hovering) delete this; break;
- }
- }
-};
-
-/**
- * Shows a tooltip
- * @param parent The window this tooltip is related to.
- * @param str String to be displayed
- * @param paramcount number of params to deal with
- * @param params (optional) up to 5 pieces of additional information that may be added to a tooltip
- * @param use_left_mouse_button close the tooltip when the left (true) or right (false) mouse button is released
- */
-void GuiShowTooltips(Window *parent, StringID str, uint paramcount, const uint64 params[], TooltipCloseCondition close_tooltip)
-{
- DeleteWindowById(WC_TOOLTIPS, 0);
-
- if (str == STR_NULL) return;
-
- new TooltipsWindow(parent, str, paramcount, params, close_tooltip);
-}
-
-void QueryString::HandleEditBox(Window *w, int wid)
-{
- if (w->IsWidgetGloballyFocused(wid) && this->text.HandleCaret()) {
- w->SetWidgetDirty(wid);
-
- /* For the OSK also invalidate the parent window */
- if (w->window_class == WC_OSK) w->InvalidateData();
- }
-}
-
-void QueryString::DrawEditBox(const Window *w, int wid) const
-{
- const NWidgetLeaf *wi = w->GetWidget(wid);
-
- assert((wi->type & WWT_MASK) == WWT_EDITBOX);
-
- bool rtl = _current_text_dir == TD_RTL;
- Dimension sprite_size = GetSpriteSize(rtl ? SPR_IMG_DELETE_RIGHT : SPR_IMG_DELETE_LEFT);
- int clearbtn_width = sprite_size.width + WD_IMGBTN_LEFT + WD_IMGBTN_RIGHT;
-
- int clearbtn_left = wi->pos_x + (rtl ? 0 : wi->current_x - clearbtn_width);
- int clearbtn_right = wi->pos_x + (rtl ? clearbtn_width : wi->current_x) - 1;
- int left = wi->pos_x + (rtl ? clearbtn_width : 0);
- int right = wi->pos_x + (rtl ? wi->current_x : wi->current_x - clearbtn_width) - 1;
-
- int top = wi->pos_y;
- int bottom = wi->pos_y + wi->current_y - 1;
-
- DrawFrameRect(clearbtn_left, top, clearbtn_right, bottom, wi->colour, wi->IsLowered() ? FR_LOWERED : FR_NONE);
- DrawSprite(rtl ? SPR_IMG_DELETE_RIGHT : SPR_IMG_DELETE_LEFT, PAL_NONE, clearbtn_left + WD_IMGBTN_LEFT + (wi->IsLowered() ? 1 : 0), (top + bottom - sprite_size.height) / 2 + (wi->IsLowered() ? 1 : 0));
- if (this->text.bytes == 1) GfxFillRect(clearbtn_left + 1, top + 1, clearbtn_right - 1, bottom - 1, _colour_gradient[wi->colour & 0xF][2], FILLRECT_CHECKER);
-
- DrawFrameRect(left, top, right, bottom, wi->colour, FR_LOWERED | FR_DARKENED);
- GfxFillRect(left + 1, top + 1, right - 1, bottom - 1, PC_BLACK);
-
- /* Limit the drawing of the string inside the widget boundaries */
- DrawPixelInfo dpi;
- if (!FillDrawPixelInfo(&dpi, left + WD_FRAMERECT_LEFT, top + WD_FRAMERECT_TOP, right - left - WD_FRAMERECT_RIGHT, bottom - top - WD_FRAMERECT_BOTTOM)) return;
-
- DrawPixelInfo *old_dpi = _cur_dpi;
- _cur_dpi = &dpi;
-
- /* We will take the current widget length as maximum width, with a small
- * space reserved at the end for the caret to show */
- const Textbuf *tb = &this->text;
- int delta = min(0, (right - left) - tb->pixels - 10);
-
- if (tb->caretxoffs + delta < 0) delta = -tb->caretxoffs;
-
- /* If we have a marked area, draw a background highlight. */
- if (tb->marklength != 0) GfxFillRect(delta + tb->markxoffs, 0, delta + tb->markxoffs + tb->marklength - 1, bottom - top, PC_GREY);
-
- DrawString(delta, tb->pixels, Center(0, bottom - top), tb->buf, TC_YELLOW);
-
- bool focussed = w->IsWidgetGloballyFocused(wid) || IsOSKOpenedFor(w, wid);
- if (focussed && tb->caret) {
- int caret_width = GetStringBoundingBox("_").width;
- DrawString(tb->caretxoffs + delta, tb->caretxoffs + delta + caret_width, Center(0, bottom - top), "_", TC_WHITE);
- }
-
- _cur_dpi = old_dpi;
-}
-
-/**
- * Get the current caret position.
- * @param w Window the edit box is in.
- * @param wid Widget index.
- * @return Top-left location of the caret, relative to the window.
- */
-Point QueryString::GetCaretPosition(const Window *w, int wid) const
-{
- const NWidgetLeaf *wi = w->GetWidget(wid);
-
- assert((wi->type & WWT_MASK) == WWT_EDITBOX);
-
- bool rtl = _current_text_dir == TD_RTL;
- Dimension sprite_size = GetSpriteSize(rtl ? SPR_IMG_DELETE_RIGHT : SPR_IMG_DELETE_LEFT);
- int clearbtn_width = sprite_size.width + WD_IMGBTN_LEFT + WD_IMGBTN_RIGHT;
-
- int left = wi->pos_x + (rtl ? clearbtn_width : 0);
- int right = wi->pos_x + (rtl ? wi->current_x : wi->current_x - clearbtn_width) - 1;
-
- /* Clamp caret position to be inside out current width. */
- const Textbuf *tb = &this->text;
- int delta = min(0, (right - left) - tb->pixels - 10);
- if (tb->caretxoffs + delta < 0) delta = -tb->caretxoffs;
-
- Point pt = {left + WD_FRAMERECT_LEFT + tb->caretxoffs + delta, wi->pos_y + WD_FRAMERECT_TOP};
- return pt;
-}
-
-/**
- * Get the bounding rectangle for a range of the query string.
- * @param w Window the edit box is in.
- * @param wid Widget index.
- * @param from Start of the string range.
- * @param to End of the string range.
- * @return Rectangle encompassing the string range, relative to the window.
- */
-Rect QueryString::GetBoundingRect(const Window *w, int wid, const char *from, const char *to) const
-{
- const NWidgetLeaf *wi = w->GetWidget(wid);
-
- assert((wi->type & WWT_MASK) == WWT_EDITBOX);
-
- bool rtl = _current_text_dir == TD_RTL;
- Dimension sprite_size = GetSpriteSize(rtl ? SPR_IMG_DELETE_RIGHT : SPR_IMG_DELETE_LEFT);
- int clearbtn_width = sprite_size.width + WD_IMGBTN_LEFT + WD_IMGBTN_RIGHT;
-
- int left = wi->pos_x + (rtl ? clearbtn_width : 0);
- int right = wi->pos_x + (rtl ? wi->current_x : wi->current_x - clearbtn_width) - 1;
-
- int top = wi->pos_y + WD_FRAMERECT_TOP;
- int bottom = wi->pos_y + wi->current_y - 1 - WD_FRAMERECT_BOTTOM;
-
- /* Clamp caret position to be inside our current width. */
- const Textbuf *tb = &this->text;
- int delta = min(0, (right - left) - tb->pixels - 10);
- if (tb->caretxoffs + delta < 0) delta = -tb->caretxoffs;
-
- /* Get location of first and last character. */
- Point p1 = GetCharPosInString(tb->buf, from, FS_NORMAL);
- Point p2 = from != to ? GetCharPosInString(tb->buf, to, FS_NORMAL) : p1;
-
- Rect r = { Clamp(left + p1.x + delta + WD_FRAMERECT_LEFT, left, right), top, Clamp(left + p2.x + delta + WD_FRAMERECT_LEFT, left, right - WD_FRAMERECT_RIGHT), bottom };
-
- return r;
-}
-
-/**
- * Get the character that is rendered at a position.
- * @param w Window the edit box is in.
- * @param wid Widget index.
- * @param pt Position to test.
- * @return Pointer to the character at the position or NULL if no character is at the position.
- */
-const char *QueryString::GetCharAtPosition(const Window *w, int wid, const Point &pt) const
-{
- const NWidgetLeaf *wi = w->GetWidget(wid);
-
- assert((wi->type & WWT_MASK) == WWT_EDITBOX);
-
- bool rtl = _current_text_dir == TD_RTL;
- Dimension sprite_size = GetSpriteSize(rtl ? SPR_IMG_DELETE_RIGHT : SPR_IMG_DELETE_LEFT);
- int clearbtn_width = sprite_size.width + WD_IMGBTN_LEFT + WD_IMGBTN_RIGHT;
-
- int left = wi->pos_x + (rtl ? clearbtn_width : 0);
- int right = wi->pos_x + (rtl ? wi->current_x : wi->current_x - clearbtn_width) - 1;
-
- int top = wi->pos_y + WD_FRAMERECT_TOP;
- int bottom = wi->pos_y + wi->current_y - 1 - WD_FRAMERECT_BOTTOM;
-
- if (!IsInsideMM(pt.y, top, bottom)) return NULL;
-
- /* Clamp caret position to be inside our current width. */
- const Textbuf *tb = &this->text;
- int delta = min(0, (right - left) - tb->pixels - 10);
- if (tb->caretxoffs + delta < 0) delta = -tb->caretxoffs;
-
- return ::GetCharAtPosition(tb->buf, pt.x - delta - left);
-}
-
-void QueryString::ClickEditBox(Window *w, Point pt, int wid, int click_count, bool focus_changed)
-{
- const NWidgetLeaf *wi = w->GetWidget(wid);
-
- assert((wi->type & WWT_MASK) == WWT_EDITBOX);
-
- bool rtl = _current_text_dir == TD_RTL;
- int clearbtn_width = GetSpriteSize(rtl ? SPR_IMG_DELETE_RIGHT : SPR_IMG_DELETE_LEFT).width;
-
- int clearbtn_left = wi->pos_x + (rtl ? 0 : wi->current_x - clearbtn_width);
-
- if (IsInsideBS(pt.x, clearbtn_left, clearbtn_width)) {
- if (this->text.bytes > 1) {
- this->text.DeleteAll();
- w->HandleButtonClick(wid);
- w->OnEditboxChanged(wid);
- }
- return;
- }
-
- if (w->window_class != WC_OSK && _settings_client.gui.osk_activation != OSKA_DISABLED &&
- (!focus_changed || _settings_client.gui.osk_activation == OSKA_IMMEDIATELY) &&
- (click_count == 2 || _settings_client.gui.osk_activation != OSKA_DOUBLE_CLICK)) {
- /* Open the OSK window */
- ShowOnScreenKeyboard(w, wid);
- }
-}
-
-/** Class for the string query window. */
-struct QueryStringWindow : public Window
-{
- QueryString editbox; ///< Editbox.
- QueryStringFlags flags; ///< Flags controlling behaviour of the window.
-
- QueryStringWindow(StringID str, StringID caption, uint max_bytes, uint max_chars, WindowDesc *desc, Window *parent, CharSetFilter afilter, QueryStringFlags flags) :
- Window(desc), editbox(max_bytes, max_chars)
- {
- char *last_of = &this->editbox.text.buf[this->editbox.text.max_bytes - 1];
- GetString(this->editbox.text.buf, str, last_of);
- str_validate(this->editbox.text.buf, last_of, SVS_NONE);
-
- /* Make sure the name isn't too long for the text buffer in the number of
- * characters (not bytes). max_chars also counts the '\0' characters. */
- while (Utf8StringLength(this->editbox.text.buf) + 1 > this->editbox.text.max_chars) {
- *Utf8PrevChar(this->editbox.text.buf + strlen(this->editbox.text.buf)) = '\0';
- }
-
- this->editbox.text.UpdateSize();
-
- if ((flags & QSF_ACCEPT_UNCHANGED) == 0) this->editbox.orig = strdup(this->editbox.text.buf);
-
- this->querystrings[WID_QS_TEXT] = &this->editbox;
- this->editbox.caption = caption;
- this->editbox.cancel_button = WID_QS_CANCEL;
- this->editbox.ok_button = WID_QS_OK;
- this->editbox.text.afilter = afilter;
- this->flags = flags;
-
- this->InitNested(WN_QUERY_STRING);
-
- this->parent = parent;
-
- this->SetFocusedWidget(WID_QS_TEXT);
- }
-
- virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
- {
- if (widget == WID_QS_DEFAULT && (this->flags & QSF_ENABLE_DEFAULT) == 0) {
- /* We don't want this widget to show! */
- fill->width = 0;
- resize->width = 0;
- size->width = 0;
- }
- }
-
- virtual void SetStringParameters(int widget) const
- {
- if (widget == WID_QS_CAPTION) SetDParam(0, this->editbox.caption);
- }
-
- void OnOk()
- {
- if (this->editbox.orig == NULL || strcmp(this->editbox.text.buf, this->editbox.orig) != 0) {
- /* If the parent is NULL, the editbox is handled by general function
- * HandleOnEditText */
- if (this->parent != NULL) {
- this->parent->OnQueryTextFinished(this->editbox.text.buf);
- } else {
- HandleOnEditText(this->editbox.text.buf);
- }
- this->editbox.handled = true;
- }
- }
-
- virtual void OnClick(Point pt, int widget, int click_count)
- {
- switch (widget) {
- case WID_QS_DEFAULT:
- this->editbox.text.DeleteAll();
- /* FALL THROUGH */
- case WID_QS_OK:
- this->OnOk();
- /* FALL THROUGH */
- case WID_QS_CANCEL:
- delete this;
- break;
- }
- }
-
- ~QueryStringWindow()
- {
- if (!this->editbox.handled && this->parent != NULL) {
- Window *parent = this->parent;
- this->parent = NULL; // so parent doesn't try to delete us again
- parent->OnQueryTextFinished(NULL);
- }
- }
-};
-
-static const NWidgetPart _nested_query_string_widgets[] = {
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_CLOSEBOX, COLOUR_GREY),
- NWidget(WWT_CAPTION, COLOUR_GREY, WID_QS_CAPTION), SetDataTip(STR_WHITE_STRING, STR_NULL),
- EndContainer(),
- NWidget(WWT_PANEL, COLOUR_GREY),
- NWidget(WWT_EDITBOX, COLOUR_GREY, WID_QS_TEXT), SetMinimalSize(256, 12), SetFill(1, 1), SetPadding(2, 2, 2, 2),
- EndContainer(),
- NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
- NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_QS_DEFAULT), SetMinimalSize(87, 12), SetFill(1, 1), SetDataTip(STR_BUTTON_DEFAULT, STR_NULL),
- NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_QS_CANCEL), SetMinimalSize(86, 12), SetFill(1, 1), SetDataTip(STR_BUTTON_CANCEL, STR_NULL),
- NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_QS_OK), SetMinimalSize(87, 12), SetFill(1, 1), SetDataTip(STR_BUTTON_OK, STR_NULL),
- EndContainer(),
-};
-
-static WindowDesc _query_string_desc(
- WDP_CENTER, "query_string", 0, 0,
- WC_QUERY_STRING, WC_NONE,
- 0,
- _nested_query_string_widgets, lengthof(_nested_query_string_widgets)
-);
-
-/**
- * Show a query popup window with a textbox in it.
- * @param str StringID for the text shown in the textbox
- * @param caption StringID of text shown in caption of querywindow
- * @param maxsize maximum size in bytes or characters (including terminating '\0') depending on flags
- * @param parent pointer to a Window that will handle the events (ok/cancel) of this
- * window. If NULL, results are handled by global function HandleOnEditText
- * @param afilter filters out unwanted character input
- * @param flags various flags, @see QueryStringFlags
- */
-void ShowQueryString(StringID str, StringID caption, uint maxsize, Window *parent, CharSetFilter afilter, QueryStringFlags flags)
-{
- DeleteWindowByClass(WC_QUERY_STRING);
- new QueryStringWindow(str, caption, ((flags & QSF_LEN_IN_CHARS) ? MAX_CHAR_LENGTH : 1) * maxsize, maxsize, &_query_string_desc, parent, afilter, flags);
-}
-
-/**
- * Window used for asking the user a YES/NO question.
- */
-struct QueryWindow : public Window {
- QueryCallbackProc *proc; ///< callback function executed on closing of popup. Window* points to parent, bool is true if 'yes' clicked, false otherwise
- uint64 params[10]; ///< local copy of _decode_parameters
- StringID message; ///< message shown for query window
- StringID caption; ///< title of window
-
- QueryWindow(WindowDesc *desc, StringID caption, StringID message, Window *parent, QueryCallbackProc *callback) : Window(desc)
- {
- /* Create a backup of the variadic arguments to strings because it will be
- * overridden pretty often. We will copy these back for drawing */
- CopyOutDParam(this->params, 0, lengthof(this->params));
- this->caption = caption;
- this->message = message;
- this->proc = callback;
-
- this->InitNested(WN_CONFIRM_POPUP_QUERY);
-
- this->parent = parent;
- this->left = parent->left + (parent->width / 2) - (this->width / 2);
- this->top = parent->top + (parent->height / 2) - (this->height / 2);
- }
-
- ~QueryWindow()
- {
- if (this->proc != NULL) this->proc(this->parent, false);
- }
-
- virtual void SetStringParameters(int widget) const
- {
- switch (widget) {
- case WID_Q_CAPTION:
- CopyInDParam(1, this->params, lengthof(this->params));
- SetDParam(0, this->caption);
- break;
-
- case WID_Q_TEXT:
- CopyInDParam(0, this->params, lengthof(this->params));
- break;
- }
- }
-
- virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
- {
- if (widget != WID_Q_TEXT) return;
-
- Dimension d = GetStringMultiLineBoundingBox(this->message, *size);
- d.width += WD_FRAMETEXT_LEFT + WD_FRAMETEXT_RIGHT;
- d.height += WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM;
- *size = d;
- }
-
- virtual void DrawWidget(const Rect &r, int widget) const
- {
- if (widget != WID_Q_TEXT) return;
-
- DrawStringMultiLine(r.left + WD_FRAMETEXT_LEFT, r.right - WD_FRAMETEXT_RIGHT, r.top + WD_FRAMERECT_TOP, r.bottom - WD_FRAMERECT_BOTTOM,
- this->message, TC_FROMSTRING, SA_CENTER);
- }
-
- virtual void OnClick(Point pt, int widget, int click_count)
- {
- switch (widget) {
- case WID_Q_YES: {
- /* in the Generate New World window, clicking 'Yes' causes
- * DeleteNonVitalWindows() to be called - we shouldn't be in a window then */
- QueryCallbackProc *proc = this->proc;
- Window *parent = this->parent;
- /* Prevent the destructor calling the callback function */
- this->proc = NULL;
- delete this;
- if (proc != NULL) {
- proc(parent, true);
- proc = NULL;
- }
- break;
- }
- case WID_Q_NO:
- delete this;
- break;
- }
- }
-
- virtual EventState OnKeyPress(WChar key, uint16 keycode)
- {
- /* ESC closes the window, Enter confirms the action */
- switch (keycode) {
- case WKC_RETURN:
- case WKC_NUM_ENTER:
- if (this->proc != NULL) {
- this->proc(this->parent, true);
- this->proc = NULL;
- }
- /* FALL THROUGH */
- case WKC_ESC:
- delete this;
- return ES_HANDLED;
- }
- return ES_NOT_HANDLED;
- }
-};
-
-static const NWidgetPart _nested_query_widgets[] = {
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_CLOSEBOX, COLOUR_RED),
- NWidget(WWT_CAPTION, COLOUR_RED, WID_Q_CAPTION), SetDataTip(STR_JUST_STRING, STR_NULL),
- EndContainer(),
- NWidget(WWT_PANEL, COLOUR_RED), SetPIP(8, 15, 8),
- NWidget(WWT_TEXT, COLOUR_RED, WID_Q_TEXT), SetMinimalSize(200, 12),
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_EMPTY), SetFill(1, 1),
- NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(20, 29, 20),
- NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_Q_NO), SetMinimalSize(71, 12), SetDataTip(STR_QUIT_NO, STR_NULL),
- NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_Q_YES), SetMinimalSize(71, 12), SetDataTip(STR_QUIT_YES, STR_NULL),
- EndContainer(),
- NWidget(WWT_EMPTY), SetFill(1, 1),
- EndContainer(),
- EndContainer(),
-};
-
-static WindowDesc _query_desc(
- WDP_CENTER, NULL, 0, 0,
- WC_CONFIRM_POPUP_QUERY, WC_NONE,
- WDF_MODAL,
- _nested_query_widgets, lengthof(_nested_query_widgets)
-);
-
-/**
- * Show a modal confirmation window with standard 'yes' and 'no' buttons
- * The window is aligned to the centre of its parent.
- * @param caption string shown as window caption
- * @param message string that will be shown for the window
- * @param parent pointer to parent window, if this pointer is NULL the parent becomes
- * the main window WC_MAIN_WINDOW
- * @param callback callback function pointer to set in the window descriptor
- */
-void ShowQuery(StringID caption, StringID message, Window *parent, QueryCallbackProc *callback)
-{
- if (parent == NULL) parent = FindWindowById(WC_MAIN_WINDOW, 0);
-
- const Window *w;
- FOR_ALL_WINDOWS_FROM_BACK(w) {
- if (w->window_class != WC_CONFIRM_POPUP_QUERY) continue;
-
- const QueryWindow *qw = (const QueryWindow *)w;
- if (qw->parent != parent || qw->proc != callback) continue;
-
- delete qw;
- break;
- }
-
- new QueryWindow(&_query_desc, caption, message, parent, callback);
-}
diff --git a/src/osk_gui.cpp.orig b/src/osk_gui.cpp.orig
deleted file mode 100644
index d8d70e70c8..0000000000
--- a/src/osk_gui.cpp.orig
+++ /dev/null
@@ -1,459 +0,0 @@
-/* $Id$ */
-
-/*
- * This file is part of OpenTTD.
- * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
- * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see .
- */
-
-/** @file osk_gui.cpp The On Screen Keyboard GUI */
-
-#include "stdafx.h"
-#include "string_func.h"
-#include "strings_func.h"
-#include "debug.h"
-#include "window_func.h"
-#include "gfx_func.h"
-#include "querystring_gui.h"
-#include "video/video_driver.hpp"
-
-#include "widgets/osk_widget.h"
-
-#include "table/sprites.h"
-#include "table/strings.h"
-#ifdef __ANDROID__
-#include
-#endif
-
-char _keyboard_opt[2][OSK_KEYBOARD_ENTRIES * 4 + 1];
-static WChar _keyboard[2][OSK_KEYBOARD_ENTRIES];
-
-enum KeyStateBits {
- KEYS_NONE,
- KEYS_SHIFT,
- KEYS_CAPS
-};
-static byte _keystate = KEYS_NONE;
-
-struct OskWindow : public Window {
- StringID caption; ///< the caption for this window.
- QueryString *qs; ///< text-input
- int text_btn; ///< widget number of parent's text field
- Textbuf *text; ///< pointer to parent's textbuffer (to update caret position)
- char *orig_str_buf; ///< Original string.
- bool shift; ///< Is the shift effectively pressed?
-
- OskWindow(WindowDesc *desc, Window *parent, int button) : Window(desc)
- {
- this->parent = parent;
- assert(parent != NULL);
-
- NWidgetCore *par_wid = parent->GetWidget(button);
- assert(par_wid != NULL);
-
- assert(parent->querystrings.Contains(button));
- this->qs = parent->querystrings.Find(button)->second;
- this->caption = (par_wid->widget_data != STR_NULL) ? par_wid->widget_data : this->qs->caption;
- this->text_btn = button;
- this->text = &this->qs->text;
- this->querystrings[WID_OSK_TEXT] = this->qs;
-
- /* make a copy in case we need to reset later */
- this->orig_str_buf = strdup(this->qs->text.buf);
-
- this->InitNested(0);
- this->SetFocusedWidget(WID_OSK_TEXT);
-
- /* Not needed by default. */
- this->DisableWidget(WID_OSK_SPECIAL);
-
- this->UpdateOskState();
- }
-
- ~OskWindow()
- {
- free(this->orig_str_buf);
- }
-
- /**
- * Only show valid characters; do not show characters that would
- * only insert a space when we have a spacebar to do that or
- * characters that are not allowed to be entered.
- */
- void UpdateOskState()
- {
- this->shift = HasBit(_keystate, KEYS_CAPS) ^ HasBit(_keystate, KEYS_SHIFT);
-
- for (uint i = 0; i < OSK_KEYBOARD_ENTRIES; i++) {
- this->SetWidgetDisabledState(WID_OSK_LETTERS + i,
- !IsValidChar(_keyboard[this->shift][i], this->qs->text.afilter) || _keyboard[this->shift][i] == ' ');
- }
- this->SetWidgetDisabledState(WID_OSK_SPACE, !IsValidChar(' ', this->qs->text.afilter));
-
- this->SetWidgetLoweredState(WID_OSK_SHIFT, HasBit(_keystate, KEYS_SHIFT));
- this->SetWidgetLoweredState(WID_OSK_CAPS, HasBit(_keystate, KEYS_CAPS));
- }
-
- virtual void SetStringParameters(int widget) const
- {
- if (widget == WID_OSK_CAPTION) SetDParam(0, this->caption);
- }
-
- virtual void DrawWidget(const Rect &r, int widget) const
- {
- if (widget < WID_OSK_LETTERS) return;
-
- widget -= WID_OSK_LETTERS;
- DrawCharCentered(_keyboard[this->shift][widget],
- r.left + 8,
- r.top + 3,
- TC_BLACK);
- }
-
- virtual void OnClick(Point pt, int widget, int click_count)
- {
- /* clicked a letter */
- if (widget >= WID_OSK_LETTERS) {
- WChar c = _keyboard[this->shift][widget - WID_OSK_LETTERS];
-
- if (!IsValidChar(c, this->qs->text.afilter)) return;
-
- if (this->qs->text.InsertChar(c)) this->OnEditboxChanged(WID_OSK_TEXT);
-
- if (HasBit(_keystate, KEYS_SHIFT)) {
- ToggleBit(_keystate, KEYS_SHIFT);
- this->UpdateOskState();
- this->SetDirty();
- }
- return;
- }
-
- switch (widget) {
- case WID_OSK_BACKSPACE:
- if (this->qs->text.DeleteChar(WKC_BACKSPACE)) this->OnEditboxChanged(WID_OSK_TEXT);
- break;
-
- case WID_OSK_SPECIAL:
- /*
- * Anything device specific can go here.
- * The button itself is hidden by default, and when you need it you
- * can not hide it in the create event.
- */
- break;
-
- case WID_OSK_CAPS:
- ToggleBit(_keystate, KEYS_CAPS);
- this->UpdateOskState();
- this->SetDirty();
- break;
-
- case WID_OSK_SHIFT:
- ToggleBit(_keystate, KEYS_SHIFT);
- this->UpdateOskState();
- this->SetDirty();
- break;
-
- case WID_OSK_SPACE:
- if (this->qs->text.InsertChar(' ')) this->OnEditboxChanged(WID_OSK_TEXT);
- break;
-
- case WID_OSK_LEFT:
- if (this->qs->text.MovePos(WKC_LEFT)) this->InvalidateData();
- break;
-
- case WID_OSK_RIGHT:
- if (this->qs->text.MovePos(WKC_RIGHT)) this->InvalidateData();
- break;
-
- case WID_OSK_OK:
- if (this->qs->orig == NULL || strcmp(this->qs->text.buf, this->qs->orig) != 0) {
- /* pass information by simulating a button press on parent window */
- if (this->qs->ok_button >= 0) {
- this->parent->OnClick(pt, this->qs->ok_button, 1);
- /* Window gets deleted when the parent window removes itself. */
- return;
- }
- }
- delete this;
- break;
-
- case WID_OSK_CANCEL:
- if (this->qs->cancel_button >= 0) { // pass a cancel event to the parent window
- this->parent->OnClick(pt, this->qs->cancel_button, 1);
- /* Window gets deleted when the parent window removes itself. */
- return;
- } else { // or reset to original string
- qs->text.Assign(this->orig_str_buf);
- qs->text.MovePos(WKC_END);
- this->OnEditboxChanged(WID_OSK_TEXT);
- delete this;
- }
- break;
- }
- }
-
- virtual void OnEditboxChanged(int widget)
- {
- this->SetWidgetDirty(WID_OSK_TEXT);
- this->parent->OnEditboxChanged(this->text_btn);
- this->parent->SetWidgetDirty(this->text_btn);
- }
-
- virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
- {
- if (!gui_scope) return;
- this->SetWidgetDirty(WID_OSK_TEXT);
- this->parent->SetWidgetDirty(this->text_btn);
- }
-
- virtual void OnFocusLost()
- {
- _video_driver->EditBoxLostFocus();
- delete this;
- }
-};
-
-static const int HALF_KEY_WIDTH = 7; // Width of 1/2 key in pixels.
-static const int INTER_KEY_SPACE = 2; // Number of pixels between two keys.
-
-/**
- * Add a key widget to a row of the keyboard.
- * @param hor Row container to add key widget to.
- * @param height Height of the key (all keys in a row should have equal height).
- * @param num_half Number of 1/2 key widths that this key has.
- * @param widtype Widget type of the key. Must be either \c NWID_SPACER for an invisible key, or a \c WWT_* widget.
- * @param widnum Widget number of the key.
- * @param widdata Data value of the key widget.
- * @param biggest_index Collected biggest widget index so far.
- * @note Key width is measured in 1/2 keys to allow for 1/2 key shifting between rows.
- */
-static void AddKey(NWidgetHorizontal *hor, int height, int num_half, WidgetType widtype, int widnum, uint16 widdata, int *biggest_index)
-{
- int key_width = HALF_KEY_WIDTH + (INTER_KEY_SPACE + HALF_KEY_WIDTH) * (num_half - 1);
-
- if (widtype == NWID_SPACER) {
- if (!hor->IsEmpty()) key_width += INTER_KEY_SPACE;
- NWidgetSpacer *spc = new NWidgetSpacer(key_width, height);
- hor->Add(spc);
- } else {
- if (!hor->IsEmpty()) {
- NWidgetSpacer *spc = new NWidgetSpacer(INTER_KEY_SPACE, height);
- hor->Add(spc);
- }
- NWidgetLeaf *leaf = new NWidgetLeaf(widtype, COLOUR_GREY, widnum, widdata, STR_NULL);
- leaf->SetMinimalSize(key_width, height);
- hor->Add(leaf);
- }
-
- *biggest_index = max(*biggest_index, widnum);
-}
-
-/** Construct the top row keys (cancel, ok, backspace). */
-static NWidgetBase *MakeTopKeys(int *biggest_index)
-{
- NWidgetHorizontal *hor = new NWidgetHorizontal();
- int key_height = FONT_HEIGHT_NORMAL + 2;
-
- AddKey(hor, key_height, 6 * 2, WWT_TEXTBTN, WID_OSK_CANCEL, STR_BUTTON_CANCEL, biggest_index);
- AddKey(hor, key_height, 6 * 2, WWT_TEXTBTN, WID_OSK_OK, STR_BUTTON_OK, biggest_index);
- AddKey(hor, key_height, 2 * 2, WWT_PUSHIMGBTN, WID_OSK_BACKSPACE, SPR_OSK_BACKSPACE, biggest_index);
- return hor;
-}
-
-/** Construct the row containing the digit keys. */
-static NWidgetBase *MakeNumberKeys(int *biggest_index)
-{
- NWidgetHorizontal *hor = new NWidgetHorizontalLTR();
- int key_height = FONT_HEIGHT_NORMAL + 6;
-
- for (int widnum = WID_OSK_NUMBERS_FIRST; widnum <= WID_OSK_NUMBERS_LAST; widnum++) {
- AddKey(hor, key_height, 2, WWT_PUSHBTN, widnum, 0x0, biggest_index);
- }
- return hor;
-}
-
-/** Construct the qwerty row keys. */
-static NWidgetBase *MakeQwertyKeys(int *biggest_index)
-{
- NWidgetHorizontal *hor = new NWidgetHorizontalLTR();
- int key_height = FONT_HEIGHT_NORMAL + 6;
-
- AddKey(hor, key_height, 3, WWT_PUSHIMGBTN, WID_OSK_SPECIAL, SPR_OSK_SPECIAL, biggest_index);
- for (int widnum = WID_OSK_QWERTY_FIRST; widnum <= WID_OSK_QWERTY_LAST; widnum++) {
- AddKey(hor, key_height, 2, WWT_PUSHBTN, widnum, 0x0, biggest_index);
- }
- AddKey(hor, key_height, 1, NWID_SPACER, 0, 0, biggest_index);
- return hor;
-}
-
-/** Construct the asdfg row keys. */
-static NWidgetBase *MakeAsdfgKeys(int *biggest_index)
-{
- NWidgetHorizontal *hor = new NWidgetHorizontalLTR();
- int key_height = FONT_HEIGHT_NORMAL + 6;
-
- AddKey(hor, key_height, 4, WWT_IMGBTN, WID_OSK_CAPS, SPR_OSK_CAPS, biggest_index);
- for (int widnum = WID_OSK_ASDFG_FIRST; widnum <= WID_OSK_ASDFG_LAST; widnum++) {
- AddKey(hor, key_height, 2, WWT_PUSHBTN, widnum, 0x0, biggest_index);
- }
- return hor;
-}
-
-/** Construct the zxcvb row keys. */
-static NWidgetBase *MakeZxcvbKeys(int *biggest_index)
-{
- NWidgetHorizontal *hor = new NWidgetHorizontalLTR();
- int key_height = FONT_HEIGHT_NORMAL + 6;
-
- AddKey(hor, key_height, 3, WWT_IMGBTN, WID_OSK_SHIFT, SPR_OSK_SHIFT, biggest_index);
- for (int widnum = WID_OSK_ZXCVB_FIRST; widnum <= WID_OSK_ZXCVB_LAST; widnum++) {
- AddKey(hor, key_height, 2, WWT_PUSHBTN, widnum, 0x0, biggest_index);
- }
- AddKey(hor, key_height, 1, NWID_SPACER, 0, 0, biggest_index);
- return hor;
-}
-
-/** Construct the spacebar row keys. */
-static NWidgetBase *MakeSpacebarKeys(int *biggest_index)
-{
- NWidgetHorizontal *hor = new NWidgetHorizontal();
- int key_height = FONT_HEIGHT_NORMAL + 6;
-
- AddKey(hor, key_height, 8, NWID_SPACER, 0, 0, biggest_index);
- AddKey(hor, key_height, 13, WWT_PUSHTXTBTN, WID_OSK_SPACE, STR_EMPTY, biggest_index);
- AddKey(hor, key_height, 3, NWID_SPACER, 0, 0, biggest_index);
- AddKey(hor, key_height, 2, WWT_PUSHIMGBTN, WID_OSK_LEFT, SPR_OSK_LEFT, biggest_index);
- AddKey(hor, key_height, 2, WWT_PUSHIMGBTN, WID_OSK_RIGHT, SPR_OSK_RIGHT, biggest_index);
- return hor;
-}
-
-
-static const NWidgetPart _nested_osk_widgets[] = {
- NWidget(WWT_CAPTION, COLOUR_GREY, WID_OSK_CAPTION), SetDataTip(STR_WHITE_STRING, STR_NULL),
- NWidget(WWT_PANEL, COLOUR_GREY),
- NWidget(WWT_EDITBOX, COLOUR_GREY, WID_OSK_TEXT), SetMinimalSize(252, 12), SetPadding(2, 2, 2, 2),
- EndContainer(),
- NWidget(WWT_PANEL, COLOUR_GREY), SetPIP(5, 2, 3),
- NWidgetFunction(MakeTopKeys), SetPadding(0, 3, 0, 3),
- NWidgetFunction(MakeNumberKeys), SetPadding(0, 3, 0, 3),
- NWidgetFunction(MakeQwertyKeys), SetPadding(0, 3, 0, 3),
- NWidgetFunction(MakeAsdfgKeys), SetPadding(0, 3, 0, 3),
- NWidgetFunction(MakeZxcvbKeys), SetPadding(0, 3, 0, 3),
- NWidgetFunction(MakeSpacebarKeys), SetPadding(0, 3, 0, 3),
- EndContainer(),
-};
-
-static WindowDesc _osk_desc(
- WDP_CENTER, "query_osk", 0, 0,
- WC_OSK, WC_NONE,
- 0,
- _nested_osk_widgets, lengthof(_nested_osk_widgets)
-);
-
-/**
- * Retrieve keyboard layout from language string or (if set) config file.
- * Also check for invalid characters.
- */
-void GetKeyboardLayout()
-{
- char keyboard[2][OSK_KEYBOARD_ENTRIES * 4 + 1];
- char errormark[2][OSK_KEYBOARD_ENTRIES + 1]; // used for marking invalid chars
- bool has_error = false; // true when an invalid char is detected
-
- if (StrEmpty(_keyboard_opt[0])) {
- GetString(keyboard[0], STR_OSK_KEYBOARD_LAYOUT, lastof(keyboard[0]));
- } else {
- strecpy(keyboard[0], _keyboard_opt[0], lastof(keyboard[0]));
- }
-
- if (StrEmpty(_keyboard_opt[1])) {
- GetString(keyboard[1], STR_OSK_KEYBOARD_LAYOUT_CAPS, lastof(keyboard[1]));
- } else {
- strecpy(keyboard[1], _keyboard_opt[1], lastof(keyboard[1]));
- }
-
- for (uint j = 0; j < 2; j++) {
- const char *kbd = keyboard[j];
- bool ended = false;
- for (uint i = 0; i < OSK_KEYBOARD_ENTRIES; i++) {
- _keyboard[j][i] = Utf8Consume(&kbd);
-
- /* Be lenient when the last characters are missing (is quite normal) */
- if (_keyboard[j][i] == '\0' || ended) {
- ended = true;
- _keyboard[j][i] = ' ';
- continue;
- }
-
- if (IsPrintable(_keyboard[j][i])) {
- errormark[j][i] = ' ';
- } else {
- has_error = true;
- errormark[j][i] = '^';
- _keyboard[j][i] = ' ';
- }
- }
- }
-
- if (has_error) {
- ShowInfoF("The keyboard layout you selected contains invalid chars. Please check those chars marked with ^.");
- ShowInfoF("Normal keyboard: %s", keyboard[0]);
- ShowInfoF(" %s", errormark[0]);
- ShowInfoF("Caps Lock: %s", keyboard[1]);
- ShowInfoF(" %s", errormark[1]);
- }
-}
-
-/**
- * Show the on-screen keyboard (osk) associated with a given textbox
- * @param parent pointer to the Window where this keyboard originated from
- * @param button widget number of parent's textbox
- */
-void ShowOnScreenKeyboard(Window *parent, int button)
-{
- DeleteWindowById(WC_OSK, 0);
-
- GetKeyboardLayout();
- new OskWindow(&_osk_desc, parent, button);
-#ifdef __ANDROID__
- char text[256];
- SDL_ANDROID_GetScreenKeyboardTextInput(text, sizeof(text) - 1); /* Invoke Android built-in screen keyboard */
- OskWindow *osk = dynamic_cast(FindWindowById(WC_OSK, 0));
- osk->qs->text.Assign(text);
- free(osk->orig_str_buf);
- osk->orig_str_buf = strdup(osk->qs->text.buf);
-
- osk->SetDirty();
-#endif
-}
-
-/**
- * Updates the original text of the OSK so when the 'parent' changes the
- * original and you press on cancel you won't get the 'old' original text
- * but the updated one.
- * @param parent window that just updated its orignal text
- * @param button widget number of parent's textbox to update
- */
-void UpdateOSKOriginalText(const Window *parent, int button)
-{
- OskWindow *osk = dynamic_cast(FindWindowById(WC_OSK, 0));
- if (osk == NULL || osk->parent != parent || osk->text_btn != button) return;
-
- free(osk->orig_str_buf);
- osk->orig_str_buf = strdup(osk->qs->text.buf);
-
- osk->SetDirty();
-}
-
-/**
- * Check whether the OSK is opened for a specific editbox.
- * @parent w Window to check for
- * @param button Editbox of \a w to check for
- * @return true if the OSK is oppened for \a button.
- */
-bool IsOSKOpenedFor(const Window *w, int button)
-{
- OskWindow *osk = dynamic_cast(FindWindowById(WC_OSK, 0));
- return osk != NULL && osk->parent == w && osk->text_btn == button;
-}
diff --git a/src/rail_gui.cpp.orig b/src/rail_gui.cpp.orig
deleted file mode 100644
index cb4f16f12f..0000000000
--- a/src/rail_gui.cpp.orig
+++ /dev/null
@@ -1,1991 +0,0 @@
-/* $Id$ */
-
-/*
- * This file is part of OpenTTD.
- * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
- * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see .
- */
-
-/** @file rail_gui.cpp %File for dealing with rail construction user interface */
-
-#include "stdafx.h"
-#include "gui.h"
-#include "window_gui.h"
-#include "station_gui.h"
-#include "terraform_gui.h"
-#include "viewport_func.h"
-#include "command_func.h"
-#include "waypoint_func.h"
-#include "newgrf_station.h"
-#include "company_base.h"
-#include "strings_func.h"
-#include "window_func.h"
-#include "date_func.h"
-#include "sound_func.h"
-#include "company_func.h"
-#include "widgets/dropdown_type.h"
-#include "tunnelbridge.h"
-#include "tilehighlight_func.h"
-#include "spritecache.h"
-#include "core/geometry_func.hpp"
-#include "hotkeys.h"
-#include "engine_base.h"
-#include "vehicle_func.h"
-#include "zoom_func.h"
-#include "rail_gui.h"
-
-#include "station_map.h"
-#include "tunnelbridge_map.h"
-
-#include "widgets/rail_widget.h"
-
-
-static RailType _cur_railtype; ///< Rail type of the current build-rail toolbar.
-static bool _remove_button_clicked; ///< Flag whether 'remove' toggle-button is currently enabled
-static DiagDirection _build_depot_direction; ///< Currently selected depot direction
-static byte _waypoint_count = 1; ///< Number of waypoint types
-static byte _cur_waypoint_type; ///< Currently selected waypoint type
-static bool _convert_signal_button; ///< convert signal button in the signal GUI pressed
-static SignalVariant _cur_signal_variant; ///< set the signal variant (for signal GUI)
-static SignalType _cur_signal_type; ///< set the signal type (for signal GUI)
-
-/* Map the setting: default_signal_type to the corresponding signal type */
-static const SignalType _default_signal_type[] = {SIGTYPE_NORMAL, SIGTYPE_PBS, SIGTYPE_PBS_ONEWAY};
-
-struct RailStationGUISettings {
- Axis orientation; ///< Currently selected rail station orientation
-
- bool newstations; ///< Are custom station definitions available?
- StationClassID station_class; ///< Currently selected custom station class (if newstations is \c true )
- byte station_type; ///< %Station type within the currently selected custom station class (if newstations is \c true )
- byte station_count; ///< Number of custom stations (if newstations is \c true )
-};
-static RailStationGUISettings _railstation; ///< Settings of the station builder GUI
-
-
-static void HandleStationPlacement(TileIndex start, TileIndex end);
-static void ShowBuildTrainDepotPicker(Window *parent);
-static void ShowBuildWaypointPicker(Window *parent);
-static void ShowStationBuilder(Window *parent);
-static void ShowSignalBuilder(Window *parent);
-
-/**
- * Check whether a station type can be build.
- * @return true if building is allowed.
- */
-static bool IsStationAvailable(const StationSpec *statspec)
-{
- if (statspec == NULL || !HasBit(statspec->callback_mask, CBM_STATION_AVAIL)) return true;
-
- uint16 cb_res = GetStationCallback(CBID_STATION_AVAILABILITY, 0, 0, statspec, NULL, INVALID_TILE);
- if (cb_res == CALLBACK_FAILED) return true;
-
- return Convert8bitBooleanCallback(statspec->grf_prop.grffile, CBID_STATION_AVAILABILITY, cb_res);
-}
-
-void CcPlaySound1E(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
-{
- if (result.Succeeded() && _settings_client.sound.confirm) SndPlayTileFx(SND_20_SPLAT_2, tile);
-}
-
-static void GenericPlaceRail(TileIndex tile, int cmd)
-{
- DoCommandP(tile, _cur_railtype, cmd,
- _remove_button_clicked ?
- CMD_REMOVE_SINGLE_RAIL | CMD_MSG(STR_ERROR_CAN_T_REMOVE_RAILROAD_TRACK) :
- CMD_BUILD_SINGLE_RAIL | CMD_MSG(STR_ERROR_CAN_T_BUILD_RAILROAD_TRACK),
- CcPlaySound1E);
-}
-
-/**
- * Try to add an additional rail-track at the entrance of a depot
- * @param tile Tile to use for adding the rail-track
- * @param dir Direction to check for already present tracks
- * @param track Track to add
- * @see CcRailDepot()
- */
-static void PlaceExtraDepotRail(TileIndex tile, DiagDirection dir, Track track)
-{
- if (GetRailTileType(tile) != RAIL_TILE_NORMAL) return;
- if ((GetTrackBits(tile) & DiagdirReachesTracks(dir)) == 0) return;
-
- DoCommandP(tile, _cur_railtype, track, CMD_BUILD_SINGLE_RAIL);
-}
-
-/** Additional pieces of track to add at the entrance of a depot. */
-static const Track _place_depot_extra_track[12] = {
- TRACK_LEFT, TRACK_UPPER, TRACK_UPPER, TRACK_RIGHT, // First additional track for directions 0..3
- TRACK_X, TRACK_Y, TRACK_X, TRACK_Y, // Second additional track
- TRACK_LOWER, TRACK_LEFT, TRACK_RIGHT, TRACK_LOWER, // Third additional track
-};
-
-/** Direction to check for existing track pieces. */
-static const DiagDirection _place_depot_extra_dir[12] = {
- DIAGDIR_SE, DIAGDIR_SW, DIAGDIR_SE, DIAGDIR_SW,
- DIAGDIR_SW, DIAGDIR_NW, DIAGDIR_NE, DIAGDIR_SE,
- DIAGDIR_NW, DIAGDIR_NE, DIAGDIR_NW, DIAGDIR_NE,
-};
-
-void CcRailDepot(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
-{
- if (result.Failed()) return;
-
- DiagDirection dir = (DiagDirection)p2;
-
- if (_settings_client.sound.confirm) SndPlayTileFx(SND_20_SPLAT_2, tile);
- if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
-
- tile += TileOffsByDiagDir(dir);
-
- if (IsTileType(tile, MP_RAILWAY)) {
- PlaceExtraDepotRail(tile, _place_depot_extra_dir[dir], _place_depot_extra_track[dir]);
- PlaceExtraDepotRail(tile, _place_depot_extra_dir[dir + 4], _place_depot_extra_track[dir + 4]);
- PlaceExtraDepotRail(tile, _place_depot_extra_dir[dir + 8], _place_depot_extra_track[dir + 8]);
- }
-}
-
-/**
- * Place a rail waypoint.
- * @param tile Position to start dragging a waypoint.
- */
-static void PlaceRail_Waypoint(TileIndex tile)
-{
- if (_remove_button_clicked) {
- VpStartPlaceSizing(tile, VPM_X_AND_Y, DDSP_REMOVE_STATION);
- return;
- }
-
- Axis axis = GetAxisForNewWaypoint(tile);
- if (IsValidAxis(axis)) {
- /* Valid tile for waypoints */
- VpStartPlaceSizing(tile, axis == AXIS_X ? VPM_FIX_X : VPM_FIX_Y, DDSP_BUILD_STATION);
- } else {
- /* Tile where we can't build rail waypoints. This is always going to fail,
- * but provides the user with a proper error message. */
- DoCommandP(tile, 1 << 8 | 1 << 16, STAT_CLASS_WAYP | INVALID_STATION << 16, CMD_BUILD_RAIL_WAYPOINT | CMD_MSG(STR_ERROR_CAN_T_BUILD_TRAIN_WAYPOINT));
- }
-}
-
-void CcStation(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
-{
- if (result.Failed()) return;
-
- if (_settings_client.sound.confirm) SndPlayTileFx(SND_20_SPLAT_2, tile);
- /* Only close the station builder window if the default station and non persistent building is chosen. */
- if (_railstation.station_class == STAT_CLASS_DFLT && _railstation.station_type == 0 && !_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
-}
-
-/**
- * Place a rail station.
- * @param tile Position to place or start dragging a station.
- */
-static void PlaceRail_Station(TileIndex tile)
-{
- if (_remove_button_clicked) {
- VpStartPlaceSizing(tile, VPM_X_AND_Y_LIMITED, DDSP_REMOVE_STATION);
- VpSetPlaceSizingLimit(-1);
- } else if (_settings_client.gui.station_dragdrop) {
- VpStartPlaceSizing(tile, VPM_X_AND_Y_LIMITED, DDSP_BUILD_STATION);
- VpSetPlaceSizingLimit(_settings_game.station.station_spread);
- } else {
- uint32 p1 = _cur_railtype | _railstation.orientation << 4 | _settings_client.gui.station_numtracks << 8 | _settings_client.gui.station_platlength << 16 | _ctrl_pressed << 24;
- uint32 p2 = _railstation.station_class | _railstation.station_type << 8 | INVALID_STATION << 16;
-
- int w = _settings_client.gui.station_numtracks;
- int h = _settings_client.gui.station_platlength;
- if (!_railstation.orientation) Swap(w, h);
-
- CommandContainer cmdcont = { tile, p1, p2, CMD_BUILD_RAIL_STATION | CMD_MSG(STR_ERROR_CAN_T_BUILD_RAILROAD_STATION), CcStation, "" };
- ShowSelectStationIfNeeded(cmdcont, TileArea(tile, w, h));
- }
-}
-
-/**
- * Build a new signal or edit/remove a present signal, use CmdBuildSingleSignal() or CmdRemoveSingleSignal() in rail_cmd.cpp
- *
- * @param tile The tile where the signal will build or edit
- */
-static void GenericPlaceSignals(TileIndex tile)
-{
- TrackBits trackbits = TrackStatusToTrackBits(GetTileTrackStatus(tile, TRANSPORT_RAIL, 0));
-
- if (trackbits & TRACK_BIT_VERT) { // N-S direction
- trackbits = (_tile_fract_coords.x <= _tile_fract_coords.y) ? TRACK_BIT_RIGHT : TRACK_BIT_LEFT;
- }
-
- if (trackbits & TRACK_BIT_HORZ) { // E-W direction
- trackbits = (_tile_fract_coords.x + _tile_fract_coords.y <= 15) ? TRACK_BIT_UPPER : TRACK_BIT_LOWER;
- }
-
- Track track = FindFirstTrack(trackbits);
-
- if (_remove_button_clicked) {
- DoCommandP(tile, track, 0, CMD_REMOVE_SIGNALS | CMD_MSG(STR_ERROR_CAN_T_REMOVE_SIGNALS_FROM), CcPlaySound1E);
- } else {
- const Window *w = FindWindowById(WC_BUILD_SIGNAL, 0);
-
- /* Map the setting cycle_signal_types to the lower and upper allowed signal type. */
- static const uint cycle_bounds[] = {SIGTYPE_NORMAL | (SIGTYPE_LAST_NOPBS << 3), SIGTYPE_PBS | (SIGTYPE_LAST << 3), SIGTYPE_NORMAL | (SIGTYPE_LAST << 3)};
-
- /* various bitstuffed elements for CmdBuildSingleSignal() */
- uint32 p1 = track;
-
- if (w != NULL) {
- /* signal GUI is used */
- SB(p1, 3, 1, _ctrl_pressed);
- SB(p1, 4, 1, _cur_signal_variant);
- SB(p1, 5, 3, _cur_signal_type);
- SB(p1, 8, 1, _convert_signal_button);
- SB(p1, 9, 6, cycle_bounds[_settings_client.gui.cycle_signal_types]);
- } else {
- SB(p1, 3, 1, _ctrl_pressed);
- SB(p1, 4, 1, (_cur_year < _settings_client.gui.semaphore_build_before ? SIG_SEMAPHORE : SIG_ELECTRIC));
- SB(p1, 5, 3, _default_signal_type[_settings_client.gui.default_signal_type]);
- SB(p1, 8, 1, 0);
- SB(p1, 9, 6, cycle_bounds[_settings_client.gui.cycle_signal_types]);
- }
-
- DoCommandP(tile, p1, 0, CMD_BUILD_SIGNALS |
- CMD_MSG((w != NULL && _convert_signal_button) ? STR_ERROR_SIGNAL_CAN_T_CONVERT_SIGNALS_HERE : STR_ERROR_CAN_T_BUILD_SIGNALS_HERE),
- CcPlaySound1E);
- }
-}
-
-/**
- * Start placing a rail bridge.
- * @param tile Position of the first tile of the bridge.
- * @param w Rail toolbar window.
- */
-static void PlaceRail_Bridge(TileIndex tile, Window *w)
-{
- if (IsBridgeTile(tile)) {
- TileIndex other_tile = GetOtherTunnelBridgeEnd(tile);
- Point pt = {0, 0};
- w->OnPlaceMouseUp(VPM_X_OR_Y, DDSP_BUILD_BRIDGE, pt, other_tile, tile);
- } else {
- VpStartPlaceSizing(tile, VPM_X_OR_Y, DDSP_BUILD_BRIDGE);
- }
-}
-
-/** Command callback for building a tunnel */
-void CcBuildRailTunnel(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
-{
- if (result.Succeeded()) {
- if (_settings_client.sound.confirm) SndPlayTileFx(SND_20_SPLAT_2, tile);
- if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
- } else {
- SetRedErrorSquare(_build_tunnel_endtile);
- }
-}
-
-/**
- * Toggles state of the Remove button of Build rail toolbar
- * @param w window the button belongs to
- */
-static void ToggleRailButton_Remove(Window *w)
-{
- DeleteWindowById(WC_SELECT_STATION, 0);
- w->ToggleWidgetLoweredState(WID_RAT_REMOVE);
- w->SetWidgetDirty(WID_RAT_REMOVE);
- _remove_button_clicked = w->IsWidgetLowered(WID_RAT_REMOVE);
- SetSelectionRed(_remove_button_clicked);
-}
-
-/**
- * Updates the Remove button because of Ctrl state change
- * @param w window the button belongs to
- * @return true iff the remove button was changed
- */
-static bool RailToolbar_CtrlChanged(Window *w)
-{
- if (w->IsWidgetDisabled(WID_RAT_REMOVE)) return false;
-
- /* allow ctrl to switch remove mode only for these widgets */
- for (uint i = WID_RAT_BUILD_NS; i <= WID_RAT_BUILD_STATION; i++) {
- if ((i <= WID_RAT_AUTORAIL || i >= WID_RAT_BUILD_WAYPOINT) && w->IsWidgetLowered(i)) {
- ToggleRailButton_Remove(w);
- return true;
- }
- }
-
- return false;
-}
-
-
-/**
- * The "remove"-button click proc of the build-rail toolbar.
- * @param w Build-rail toolbar window
- * @see BuildRailToolbarWindow::OnClick()
- */
-static void BuildRailClick_Remove(Window *w)
-{
- if (w->IsWidgetDisabled(WID_RAT_REMOVE)) return;
- ToggleRailButton_Remove(w);
- if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
-
- /* handle station builder */
- if (w->IsWidgetLowered(WID_RAT_BUILD_STATION)) {
- if (_remove_button_clicked) {
- /* starting drag & drop remove */
- if (!_settings_client.gui.station_dragdrop) {
- SetTileSelectSize(1, 1);
- } else {
- VpSetPlaceSizingLimit(-1);
- }
- } else {
- /* starting station build mode */
- if (!_settings_client.gui.station_dragdrop) {
- int x = _settings_client.gui.station_numtracks;
- int y = _settings_client.gui.station_platlength;
- if (_railstation.orientation == 0) Swap(x, y);
- SetTileSelectSize(x, y);
- } else {
- VpSetPlaceSizingLimit(_settings_game.station.station_spread);
- }
- }
- }
-}
-
-static void DoRailroadTrack(int mode)
-{
- DoCommandP(TileVirtXY(_thd.selstart.x, _thd.selstart.y), TileVirtXY(_thd.selend.x, _thd.selend.y), _cur_railtype | (mode << 4),
- _remove_button_clicked ?
- CMD_REMOVE_RAILROAD_TRACK | CMD_MSG(STR_ERROR_CAN_T_REMOVE_RAILROAD_TRACK) :
- CMD_BUILD_RAILROAD_TRACK | CMD_MSG(STR_ERROR_CAN_T_BUILD_RAILROAD_TRACK),
- CcPlaySound1E);
-}
-
-static void HandleAutodirPlacement()
-{
- int trackstat = _thd.drawstyle & HT_DIR_MASK; // 0..5
-
- if (_thd.drawstyle & HT_RAIL) { // one tile case
- GenericPlaceRail(TileVirtXY(_thd.selend.x, _thd.selend.y), trackstat);
- return;
- }
-
- DoRailroadTrack(trackstat);
-}
-
-/**
- * Build new signals or remove signals or (if only one tile marked) edit a signal.
- *
- * If one tile marked abort and use GenericPlaceSignals()
- * else use CmdBuildSingleSignal() or CmdRemoveSingleSignal() in rail_cmd.cpp to build many signals
- */
-static void HandleAutoSignalPlacement()
-{
- uint32 p2 = GB(_thd.drawstyle, 0, 3); // 0..5
-
- if ((_thd.drawstyle & HT_DRAG_MASK) == HT_RECT) { // one tile case
- GenericPlaceSignals(TileVirtXY(_thd.selend.x, _thd.selend.y));
- return;
- }
-
- const Window *w = FindWindowById(WC_BUILD_SIGNAL, 0);
-
- if (w != NULL) {
- /* signal GUI is used */
- SB(p2, 3, 1, 0);
- SB(p2, 4, 1, _cur_signal_variant);
- SB(p2, 6, 1, _ctrl_pressed);
- SB(p2, 7, 3, _cur_signal_type);
- SB(p2, 24, 8, _settings_client.gui.drag_signals_density);
- SB(p2, 10, 1, !_settings_client.gui.drag_signals_fixed_distance);
- } else {
- SB(p2, 3, 1, 0);
- SB(p2, 4, 1, (_cur_year < _settings_client.gui.semaphore_build_before ? SIG_SEMAPHORE : SIG_ELECTRIC));
- SB(p2, 6, 1, _ctrl_pressed);
- SB(p2, 7, 3, _default_signal_type[_settings_client.gui.default_signal_type]);
- SB(p2, 24, 8, _settings_client.gui.drag_signals_density);
- SB(p2, 10, 1, !_settings_client.gui.drag_signals_fixed_distance);
- }
-
- /* _settings_client.gui.drag_signals_density is given as a parameter such that each user
- * in a network game can specify his/her own signal density */
- DoCommandP(TileVirtXY(_thd.selstart.x, _thd.selstart.y), TileVirtXY(_thd.selend.x, _thd.selend.y), p2,
- _remove_button_clicked ?
- CMD_REMOVE_SIGNAL_TRACK | CMD_MSG(STR_ERROR_CAN_T_REMOVE_SIGNALS_FROM) :
- CMD_BUILD_SIGNAL_TRACK | CMD_MSG(STR_ERROR_CAN_T_BUILD_SIGNALS_HERE),
- CcPlaySound1E);
-}
-
-
-/** Rail toolbar management class. */
-struct BuildRailToolbarWindow : Window {
- RailType railtype; ///< Rail type to build.
- int last_user_action; ///< Last started user action.
-
- BuildRailToolbarWindow(WindowDesc *desc, RailType railtype) : Window(desc)
- {
- this->InitNested(TRANSPORT_RAIL);
- this->SetupRailToolbar(railtype);
- this->DisableWidget(WID_RAT_REMOVE);
- this->last_user_action = WIDGET_LIST_END;
-
- if (_settings_client.gui.link_terraform_toolbar) ShowTerraformToolbar(this);
- }
-
- ~BuildRailToolbarWindow()
- {
- if (_settings_client.gui.link_terraform_toolbar) DeleteWindowById(WC_SCEN_LAND_GEN, 0, false);
- }
-
- /**
- * Configures the rail toolbar for railtype given
- * @param railtype the railtype to display
- */
- void SetupRailToolbar(RailType railtype)
- {
- this->railtype = railtype;
- const RailtypeInfo *rti = GetRailTypeInfo(railtype);
-
- assert(railtype < RAILTYPE_END);
- this->GetWidget(WID_RAT_BUILD_NS)->widget_data = rti->gui_sprites.build_ns_rail;
- this->GetWidget(WID_RAT_BUILD_X)->widget_data = rti->gui_sprites.build_x_rail;
- this->GetWidget(WID_RAT_BUILD_EW)->widget_data = rti->gui_sprites.build_ew_rail;
- this->GetWidget(WID_RAT_BUILD_Y)->widget_data = rti->gui_sprites.build_y_rail;
- this->GetWidget(WID_RAT_AUTORAIL)->widget_data = rti->gui_sprites.auto_rail;
- this->GetWidget(WID_RAT_BUILD_DEPOT)->widget_data = rti->gui_sprites.build_depot;
- this->GetWidget(WID_RAT_CONVERT_RAIL)->widget_data = rti->gui_sprites.convert_rail;
- this->GetWidget(WID_RAT_BUILD_TUNNEL)->widget_data = rti->gui_sprites.build_tunnel;
- }
-
- /**
- * Switch to another rail type.
- * @param railtype New rail type.
- */
- void ModifyRailType(RailType railtype)
- {
- this->SetupRailToolbar(railtype);
- this->ReInit();
- }
-
- void UpdateRemoveWidgetStatus(int clicked_widget)
- {
- switch (clicked_widget) {
- case WID_RAT_REMOVE:
- /* If it is the removal button that has been clicked, do nothing,
- * as it is up to the other buttons to drive removal status */
- return;
-
- case WID_RAT_BUILD_NS:
- case WID_RAT_BUILD_X:
- case WID_RAT_BUILD_EW:
- case WID_RAT_BUILD_Y:
- case WID_RAT_AUTORAIL:
- case WID_RAT_BUILD_WAYPOINT:
- case WID_RAT_BUILD_STATION:
- case WID_RAT_BUILD_SIGNALS:
- /* Removal button is enabled only if the rail/signal/waypoint/station
- * button is still lowered. Once raised, it has to be disabled */
- this->SetWidgetDisabledState(WID_RAT_REMOVE, !this->IsWidgetLowered(clicked_widget));
- break;
-
- default:
- /* When any other buttons than rail/signal/waypoint/station, raise and
- * disable the removal button */
- this->DisableWidget(WID_RAT_REMOVE);
- this->RaiseWidget(WID_RAT_REMOVE);
- break;
- }
- }
-
- virtual void SetStringParameters(int widget) const
- {
- if (widget == WID_RAT_CAPTION) {
- const RailtypeInfo *rti = GetRailTypeInfo(this->railtype);
- if (rti->max_speed > 0) {
- SetDParam(0, STR_TOOLBAR_RAILTYPE_VELOCITY);
- SetDParam(1, rti->strings.toolbar_caption);
- SetDParam(2, rti->max_speed);
- } else {
- SetDParam(0, rti->strings.toolbar_caption);
- }
- }
- }
-
- virtual void OnClick(Point pt, int widget, int click_count)
- {
- if (widget < WID_RAT_BUILD_NS) return;
-
- _remove_button_clicked = false;
- switch (widget) {
- case WID_RAT_BUILD_NS:
- HandlePlacePushButton(this, WID_RAT_BUILD_NS, GetRailTypeInfo(_cur_railtype)->cursor.rail_ns, HT_LINE | HT_DIR_VL);
- this->last_user_action = widget;
- break;
-
- case WID_RAT_BUILD_X:
- HandlePlacePushButton(this, WID_RAT_BUILD_X, GetRailTypeInfo(_cur_railtype)->cursor.rail_swne, HT_LINE | HT_DIR_X);
- this->last_user_action = widget;
- break;
-
- case WID_RAT_BUILD_EW:
- HandlePlacePushButton(this, WID_RAT_BUILD_EW, GetRailTypeInfo(_cur_railtype)->cursor.rail_ew, HT_LINE | HT_DIR_HL);
- this->last_user_action = widget;
- break;
-
- case WID_RAT_BUILD_Y:
- HandlePlacePushButton(this, WID_RAT_BUILD_Y, GetRailTypeInfo(_cur_railtype)->cursor.rail_nwse, HT_LINE | HT_DIR_Y);
- this->last_user_action = widget;
- break;
-
- case WID_RAT_AUTORAIL:
- HandlePlacePushButton(this, WID_RAT_AUTORAIL, GetRailTypeInfo(_cur_railtype)->cursor.autorail, HT_RAIL);
- this->last_user_action = widget;
- break;
-
- case WID_RAT_DEMOLISH:
- HandlePlacePushButton(this, WID_RAT_DEMOLISH, ANIMCURSOR_DEMOLISH, HT_RECT | HT_DIAGONAL);
- this->last_user_action = widget;
- break;
-
- case WID_RAT_BUILD_DEPOT:
- if (HandlePlacePushButton(this, WID_RAT_BUILD_DEPOT, GetRailTypeInfo(_cur_railtype)->cursor.depot, HT_RECT)) {
- ShowBuildTrainDepotPicker(this);
- this->last_user_action = widget;
- }
- break;
-
- case WID_RAT_BUILD_WAYPOINT:
- this->last_user_action = widget;
- _waypoint_count = StationClass::Get(STAT_CLASS_WAYP)->GetSpecCount();
- if (HandlePlacePushButton(this, WID_RAT_BUILD_WAYPOINT, SPR_CURSOR_WAYPOINT, HT_RECT) && _waypoint_count > 1) {
- ShowBuildWaypointPicker(this);
- }
- break;
-
- case WID_RAT_BUILD_STATION:
- if (HandlePlacePushButton(this, WID_RAT_BUILD_STATION, SPR_CURSOR_RAIL_STATION, HT_RECT)) {
- ShowStationBuilder(this);
- this->last_user_action = widget;
- }
- break;
-
- case WID_RAT_BUILD_SIGNALS: {
- this->last_user_action = widget;
- bool started = HandlePlacePushButton(this, WID_RAT_BUILD_SIGNALS, ANIMCURSOR_BUILDSIGNALS, HT_RECT);
- if (started && _settings_client.gui.enable_signal_gui != _ctrl_pressed) {
- ShowSignalBuilder(this);
- }
- break;
- }
-
- case WID_RAT_BUILD_BRIDGE:
- HandlePlacePushButton(this, WID_RAT_BUILD_BRIDGE, SPR_CURSOR_BRIDGE, HT_RECT);
- this->last_user_action = widget;
- break;
-
- case WID_RAT_BUILD_TUNNEL:
- HandlePlacePushButton(this, WID_RAT_BUILD_TUNNEL, GetRailTypeInfo(_cur_railtype)->cursor.tunnel, HT_SPECIAL);
- this->last_user_action = widget;
- break;
-
- case WID_RAT_REMOVE:
- BuildRailClick_Remove(this);
- break;
-
- case WID_RAT_CONVERT_RAIL:
- HandlePlacePushButton(this, WID_RAT_CONVERT_RAIL, GetRailTypeInfo(_cur_railtype)->cursor.convert, HT_RECT | HT_DIAGONAL);
- this->last_user_action = widget;
- break;
-
- default: NOT_REACHED();
- }
- this->UpdateRemoveWidgetStatus(widget);
- if (_ctrl_pressed) RailToolbar_CtrlChanged(this);
- }
-
- virtual EventState OnHotkey(int hotkey)
- {
- MarkTileDirtyByTile(TileVirtXY(_thd.pos.x, _thd.pos.y)); // redraw tile selection
- return Window::OnHotkey(hotkey);
- }
-
- virtual void OnPlaceObject(Point pt, TileIndex tile)
- {
- switch (this->last_user_action) {
- case WID_RAT_BUILD_NS:
- VpStartPlaceSizing(tile, VPM_FIX_VERTICAL | VPM_RAILDIRS, DDSP_PLACE_RAIL);
- break;
-
- case WID_RAT_BUILD_X:
- VpStartPlaceSizing(tile, VPM_FIX_Y | VPM_RAILDIRS, DDSP_PLACE_RAIL);
- break;
-
- case WID_RAT_BUILD_EW:
- VpStartPlaceSizing(tile, VPM_FIX_HORIZONTAL | VPM_RAILDIRS, DDSP_PLACE_RAIL);
- break;
-
- case WID_RAT_BUILD_Y:
- VpStartPlaceSizing(tile, VPM_FIX_X | VPM_RAILDIRS, DDSP_PLACE_RAIL);
- break;
-
- case WID_RAT_AUTORAIL:
- VpStartPlaceSizing(tile, VPM_RAILDIRS, DDSP_PLACE_RAIL);
- break;
-
- case WID_RAT_DEMOLISH:
- PlaceProc_DemolishArea(tile);
- break;
-
- case WID_RAT_BUILD_DEPOT:
- DoCommandP(tile, _cur_railtype, _build_depot_direction,
- CMD_BUILD_TRAIN_DEPOT | CMD_MSG(STR_ERROR_CAN_T_BUILD_TRAIN_DEPOT),
- CcRailDepot);
- break;
-
- case WID_RAT_BUILD_WAYPOINT:
- PlaceRail_Waypoint(tile);
- break;
-
- case WID_RAT_BUILD_STATION:
- PlaceRail_Station(tile);
- break;
-
- case WID_RAT_BUILD_SIGNALS:
- VpStartPlaceSizing(tile, VPM_SIGNALDIRS, DDSP_BUILD_SIGNALS);
- break;
-
- case WID_RAT_BUILD_BRIDGE:
- PlaceRail_Bridge(tile, this);
- break;
-
- case WID_RAT_BUILD_TUNNEL:
- DoCommandP(tile, _cur_railtype | (TRANSPORT_RAIL << 8), 0, CMD_BUILD_TUNNEL | CMD_MSG(STR_ERROR_CAN_T_BUILD_TUNNEL_HERE), CcBuildRailTunnel);
- break;
-
- case WID_RAT_CONVERT_RAIL:
- VpStartPlaceSizing(tile, VPM_X_AND_Y, DDSP_CONVERT_RAIL);
- break;
-
- default: NOT_REACHED();
- }
- }
-
- virtual void OnPlaceDrag(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt)
- {
- /* no dragging if you have pressed the convert button */
- if (FindWindowById(WC_BUILD_SIGNAL, 0) != NULL && _convert_signal_button && this->IsWidgetLowered(WID_RAT_BUILD_SIGNALS)) return;
-
- VpSelectTilesWithMethod(pt.x, pt.y, select_method);
- }
-
- virtual void OnPlaceMouseUp(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt, TileIndex start_tile, TileIndex end_tile)
- {
- if (pt.x != -1) {
- switch (select_proc) {
- default: NOT_REACHED();
- case DDSP_BUILD_BRIDGE:
- if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
- ShowBuildBridgeWindow(start_tile, end_tile, TRANSPORT_RAIL, _cur_railtype);
- break;
-
- case DDSP_PLACE_RAIL:
- HandleAutodirPlacement();
- break;
-
- case DDSP_BUILD_SIGNALS:
- HandleAutoSignalPlacement();
- break;
-
- case DDSP_DEMOLISH_AREA:
- GUIPlaceProcDragXY(select_proc, start_tile, end_tile);
- break;
-
- case DDSP_CONVERT_RAIL:
- DoCommandP(end_tile, start_tile, _cur_railtype | (_ctrl_pressed ? 0x10 : 0), CMD_CONVERT_RAIL | CMD_MSG(STR_ERROR_CAN_T_CONVERT_RAIL), CcPlaySound10);
- break;
-
- case DDSP_REMOVE_STATION:
- case DDSP_BUILD_STATION:
- if (this->IsWidgetLowered(WID_RAT_BUILD_STATION)) {
- /* Station */
- if (_remove_button_clicked) {
- DoCommandP(end_tile, start_tile, _ctrl_pressed ? 0 : 1, CMD_REMOVE_FROM_RAIL_STATION | CMD_MSG(STR_ERROR_CAN_T_REMOVE_PART_OF_STATION), CcPlaySound1E);
- } else {
- HandleStationPlacement(start_tile, end_tile);
- }
- } else {
- /* Waypoint */
- if (_remove_button_clicked) {
- DoCommandP(end_tile, start_tile, _ctrl_pressed ? 0 : 1, CMD_REMOVE_FROM_RAIL_WAYPOINT | CMD_MSG(STR_ERROR_CAN_T_REMOVE_TRAIN_WAYPOINT), CcPlaySound1E);
- } else {
- TileArea ta(start_tile, end_tile);
- uint32 p1 = _cur_railtype | (select_method == VPM_FIX_X ? AXIS_X : AXIS_Y) << 4 | ta.w << 8 | ta.h << 16 | _ctrl_pressed << 24;
- uint32 p2 = STAT_CLASS_WAYP | _cur_waypoint_type << 8 | INVALID_STATION << 16;
-
- CommandContainer cmdcont = { ta.tile, p1, p2, CMD_BUILD_RAIL_WAYPOINT | CMD_MSG(STR_ERROR_CAN_T_BUILD_TRAIN_WAYPOINT), CcPlaySound1E, "" };
- ShowSelectWaypointIfNeeded(cmdcont, ta);
- }
- }
- break;
- }
- }
- }
-
- virtual void OnPlaceObjectAbort()
- {
- this->RaiseButtons();
- this->DisableWidget(WID_RAT_REMOVE);
- this->SetWidgetDirty(WID_RAT_REMOVE);
-
- DeleteWindowById(WC_BUILD_SIGNAL, TRANSPORT_RAIL);
- DeleteWindowById(WC_BUILD_STATION, TRANSPORT_RAIL);
- DeleteWindowById(WC_BUILD_DEPOT, TRANSPORT_RAIL);
- DeleteWindowById(WC_BUILD_WAYPOINT, TRANSPORT_RAIL);
- DeleteWindowById(WC_SELECT_STATION, 0);
- DeleteWindowByClass(WC_BUILD_BRIDGE);
- }
-
- virtual void OnPlacePresize(Point pt, TileIndex tile)
- {
- DoCommand(tile, _cur_railtype | (TRANSPORT_RAIL << 8), 0, DC_AUTO, CMD_BUILD_TUNNEL);
- VpSetPresizeRange(tile, _build_tunnel_endtile == 0 ? tile : _build_tunnel_endtile);
- }
-
- virtual EventState OnCTRLStateChange()
- {
- /* do not toggle Remove button by Ctrl when placing station */
- if (!this->IsWidgetLowered(WID_RAT_BUILD_STATION) && !this->IsWidgetLowered(WID_RAT_BUILD_WAYPOINT) && RailToolbar_CtrlChanged(this)) return ES_HANDLED;
- return ES_NOT_HANDLED;
- }
-
- static HotkeyList hotkeys;
-};
-
-/**
- * Handler for global hotkeys of the BuildRailToolbarWindow.
- * @param hotkey Hotkey
- * @return ES_HANDLED if hotkey was accepted.
- */
-static EventState RailToolbarGlobalHotkeys(int hotkey)
-{
- if (_game_mode != GM_NORMAL || !CanBuildVehicleInfrastructure(VEH_TRAIN)) return ES_NOT_HANDLED;
- extern RailType _last_built_railtype;
- Window *w = ShowBuildRailToolbar(_last_built_railtype);
- if (w == NULL) return ES_NOT_HANDLED;
- return w->OnHotkey(hotkey);
-}
-
-const uint16 _railtoolbar_autorail_keys[] = {'5', 'A' | WKC_GLOBAL_HOTKEY, 0};
-
-static Hotkey railtoolbar_hotkeys[] = {
- Hotkey('1', "build_ns", WID_RAT_BUILD_NS),
- Hotkey('2', "build_x", WID_RAT_BUILD_X),
- Hotkey('3', "build_ew", WID_RAT_BUILD_EW),
- Hotkey('4', "build_y", WID_RAT_BUILD_Y),
- Hotkey(_railtoolbar_autorail_keys, "autorail", WID_RAT_AUTORAIL),
- Hotkey('6', "demolish", WID_RAT_DEMOLISH),
- Hotkey('7', "depot", WID_RAT_BUILD_DEPOT),
- Hotkey('8', "waypoint", WID_RAT_BUILD_WAYPOINT),
- Hotkey('9', "station", WID_RAT_BUILD_STATION),
- Hotkey('S', "signal", WID_RAT_BUILD_SIGNALS),
- Hotkey('B', "bridge", WID_RAT_BUILD_BRIDGE),
- Hotkey('T', "tunnel", WID_RAT_BUILD_TUNNEL),
- Hotkey('R', "remove", WID_RAT_REMOVE),
- Hotkey('C', "convert", WID_RAT_CONVERT_RAIL),
- HOTKEY_LIST_END
-};
-HotkeyList BuildRailToolbarWindow::hotkeys("railtoolbar", railtoolbar_hotkeys, RailToolbarGlobalHotkeys);
-
-static const NWidgetPart _nested_build_rail_widgets[] = {
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
- NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, WID_RAT_CAPTION), SetDataTip(STR_WHITE_STRING, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
- NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN),
- EndContainer(),
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_RAT_BUILD_NS),
- SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_RAIL_NS, STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_RAT_BUILD_X),
- SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_RAIL_NE, STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_RAT_BUILD_EW),
- SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_RAIL_EW, STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_RAT_BUILD_Y),
- SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_RAIL_NW, STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_RAT_AUTORAIL),
- SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_AUTORAIL, STR_RAIL_TOOLBAR_TOOLTIP_BUILD_AUTORAIL),
-
- NWidget(WWT_PANEL, COLOUR_DARK_GREEN), SetMinimalSize(4, 22), SetDataTip(0x0, STR_NULL), EndContainer(),
-
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_RAT_DEMOLISH),
- SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_DYNAMITE, STR_TOOLTIP_DEMOLISH_BUILDINGS_ETC),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_RAT_BUILD_DEPOT),
- SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_DEPOT_RAIL, STR_RAIL_TOOLBAR_TOOLTIP_BUILD_TRAIN_DEPOT_FOR_BUILDING),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_RAT_BUILD_WAYPOINT),
- SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_WAYPOINT, STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL_TO_WAYPOINT),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_RAT_BUILD_STATION),
- SetFill(0, 1), SetMinimalSize(42, 22), SetDataTip(SPR_IMG_RAIL_STATION, STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_STATION),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_RAT_BUILD_SIGNALS),
- SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_RAIL_SIGNALS, STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_SIGNALS),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_RAT_BUILD_BRIDGE),
- SetFill(0, 1), SetMinimalSize(42, 22), SetDataTip(SPR_IMG_BRIDGE, STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_BRIDGE),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_RAT_BUILD_TUNNEL),
- SetFill(0, 1), SetMinimalSize(20, 22), SetDataTip(SPR_IMG_TUNNEL_RAIL, STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TUNNEL),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_RAT_REMOVE),
- SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_REMOVE, STR_RAIL_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_RAT_CONVERT_RAIL),
- SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_CONVERT_RAIL, STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL),
- EndContainer(),
-};
-
-static WindowDesc _build_rail_desc(
- WDP_ALIGN_TOOLBAR, "toolbar_rail", 0, 0,
- WC_BUILD_TOOLBAR, WC_NONE,
- WDF_CONSTRUCTION,
- _nested_build_rail_widgets, lengthof(_nested_build_rail_widgets),
- &BuildRailToolbarWindow::hotkeys
-);
-
-
-/**
- * Open the build rail toolbar window for a specific rail type.
- *
- * If the terraform toolbar is linked to the toolbar, that window is also opened.
- *
- * @param railtype Rail type to open the window for
- * @return newly opened rail toolbar, or NULL if the toolbar could not be opened.
- */
-Window *ShowBuildRailToolbar(RailType railtype)
-{
- if (!Company::IsValidID(_local_company)) return NULL;
- if (!ValParamRailtype(railtype)) return NULL;
-
- DeleteWindowByClass(WC_BUILD_TOOLBAR);
- _cur_railtype = railtype;
- _remove_button_clicked = false;
- return new BuildRailToolbarWindow(&_build_rail_desc, railtype);
-}
-
-/* TODO: For custom stations, respect their allowed platforms/lengths bitmasks!
- * --pasky */
-
-static void HandleStationPlacement(TileIndex start, TileIndex end)
-{
- TileArea ta(start, end);
- uint numtracks = ta.w;
- uint platlength = ta.h;
-
- if (_railstation.orientation == AXIS_X) Swap(numtracks, platlength);
-
- uint32 p1 = _cur_railtype | _railstation.orientation << 4 | numtracks << 8 | platlength << 16 | _ctrl_pressed << 24;
- uint32 p2 = _railstation.station_class | _railstation.station_type << 8 | INVALID_STATION << 16;
-
- CommandContainer cmdcont = { ta.tile, p1, p2, CMD_BUILD_RAIL_STATION | CMD_MSG(STR_ERROR_CAN_T_BUILD_RAILROAD_STATION), CcStation, "" };
- ShowSelectStationIfNeeded(cmdcont, ta);
-}
-
-struct BuildRailStationWindow : public PickerWindowBase {
-private:
- uint line_height; ///< Height of a single line in the newstation selection matrix (#WID_BRAS_NEWST_LIST widget).
- uint coverage_height; ///< Height of the coverage texts.
- Scrollbar *vscroll; ///< Vertical scrollbar of the new station list.
- Scrollbar *vscroll2; ///< Vertical scrollbar of the matrix with new stations.
-
- /**
- * Verify whether the currently selected station size is allowed after selecting a new station class/type.
- * If not, change the station size variables ( _settings_client.gui.station_numtracks and _settings_client.gui.station_platlength ).
- * @param statspec Specification of the new station class/type
- */
- void CheckSelectedSize(const StationSpec *statspec)
- {
- if (statspec == NULL || _settings_client.gui.station_dragdrop) return;
-
- /* If current number of tracks is not allowed, make it as big as possible */
- if (HasBit(statspec->disallowed_platforms, _settings_client.gui.station_numtracks - 1)) {
- this->RaiseWidget(_settings_client.gui.station_numtracks + WID_BRAS_PLATFORM_NUM_BEGIN);
- _settings_client.gui.station_numtracks = 1;
- if (statspec->disallowed_platforms != UINT8_MAX) {
- while (HasBit(statspec->disallowed_platforms, _settings_client.gui.station_numtracks - 1)) {
- _settings_client.gui.station_numtracks++;
- }
- this->LowerWidget(_settings_client.gui.station_numtracks + WID_BRAS_PLATFORM_NUM_BEGIN);
- }
- }
-
- if (HasBit(statspec->disallowed_lengths, _settings_client.gui.station_platlength - 1)) {
- this->RaiseWidget(_settings_client.gui.station_platlength + WID_BRAS_PLATFORM_LEN_BEGIN);
- _settings_client.gui.station_platlength = 1;
- if (statspec->disallowed_lengths != UINT8_MAX) {
- while (HasBit(statspec->disallowed_lengths, _settings_client.gui.station_platlength - 1)) {
- _settings_client.gui.station_platlength++;
- }
- this->LowerWidget(_settings_client.gui.station_platlength + WID_BRAS_PLATFORM_LEN_BEGIN);
- }
- }
- }
-
-public:
- BuildRailStationWindow(WindowDesc *desc, Window *parent, bool newstation) : PickerWindowBase(desc, parent)
- {
- this->coverage_height = 2 * FONT_HEIGHT_NORMAL + 3 * WD_PAR_VSEP_NORMAL;
- this->vscroll = NULL;
- _railstation.newstations = newstation;
-
- this->CreateNestedTree();
- NWidgetStacked *newst_additions = this->GetWidget(WID_BRAS_SHOW_NEWST_ADDITIONS);
- newst_additions->SetDisplayedPlane(newstation ? 0 : SZSP_NONE);
- newst_additions = this->GetWidget(WID_BRAS_SHOW_NEWST_MATRIX);
- newst_additions->SetDisplayedPlane(newstation ? 0 : SZSP_NONE);
- newst_additions = this->GetWidget(WID_BRAS_SHOW_NEWST_DEFSIZE);
- newst_additions->SetDisplayedPlane(newstation ? 0 : SZSP_NONE);
- newst_additions = this->GetWidget(WID_BRAS_SHOW_NEWST_RESIZE);
- newst_additions->SetDisplayedPlane(newstation ? 0 : SZSP_NONE);
- if (newstation) {
- this->vscroll = this->GetScrollbar(WID_BRAS_NEWST_SCROLL);
- this->vscroll2 = this->GetScrollbar(WID_BRAS_MATRIX_SCROLL);
- }
- this->FinishInitNested(TRANSPORT_RAIL);
-
- this->LowerWidget(_railstation.orientation + WID_BRAS_PLATFORM_DIR_X);
- if (_settings_client.gui.station_dragdrop) {
- this->LowerWidget(WID_BRAS_PLATFORM_DRAG_N_DROP);
- } else {
- this->LowerWidget(_settings_client.gui.station_numtracks + WID_BRAS_PLATFORM_NUM_BEGIN);
- this->LowerWidget(_settings_client.gui.station_platlength + WID_BRAS_PLATFORM_LEN_BEGIN);
- }
- this->SetWidgetLoweredState(WID_BRAS_HIGHLIGHT_OFF, !_settings_client.gui.station_show_coverage);
- this->SetWidgetLoweredState(WID_BRAS_HIGHLIGHT_ON, _settings_client.gui.station_show_coverage);
-
- if (!newstation || _railstation.station_class >= (int)StationClass::GetClassCount()) {
- /* New stations are not available or changed, so ensure the default station
- * type is 'selected'. */
- _railstation.station_class = STAT_CLASS_DFLT;
- _railstation.station_type = 0;
- this->vscroll2 = NULL;
- }
- if (newstation) {
- _railstation.station_count = StationClass::Get(_railstation.station_class)->GetSpecCount();
- _railstation.station_type = min(_railstation.station_type, _railstation.station_count - 1);
-
- int count = 0;
- for (uint i = 0; i < StationClass::GetClassCount(); i++) {
- if (i == STAT_CLASS_WAYP) continue;
- count++;
- }
- this->vscroll->SetCount(count);
- this->vscroll->SetPosition(Clamp(_railstation.station_class - 2, 0, max(this->vscroll->GetCount() - this->vscroll->GetCapacity(), 0)));
-
- NWidgetMatrix *matrix = this->GetWidget(WID_BRAS_MATRIX);
- matrix->SetScrollbar(this->vscroll2);
- matrix->SetCount(_railstation.station_count);
- matrix->SetClicked(_railstation.station_type);
- }
- }
-
- virtual ~BuildRailStationWindow()
- {
- DeleteWindowById(WC_SELECT_STATION, 0);
- }
-
- virtual void OnPaint()
- {
- bool newstations = _railstation.newstations;
- const StationSpec *statspec = newstations ? StationClass::Get(_railstation.station_class)->GetSpec(_railstation.station_type) : NULL;
-
- if (_settings_client.gui.station_dragdrop) {
- SetTileSelectSize(1, 1);
- } else {
- int x = _settings_client.gui.station_numtracks;
- int y = _settings_client.gui.station_platlength;
- if (_railstation.orientation == AXIS_X) Swap(x, y);
- if (!_remove_button_clicked) {
- SetTileSelectSize(x, y);
- }
- }
-
- int rad = (_settings_game.station.modified_catchment) ? CA_TRAIN : CA_UNMODIFIED;
-
- if (_settings_client.gui.station_show_coverage) SetTileSelectBigSize(-rad, -rad, 2 * rad, 2 * rad);
-
- for (uint bits = 0; bits < 7; bits++) {
- bool disable = bits >= _settings_game.station.station_spread;
- if (statspec == NULL) {
- this->SetWidgetDisabledState(bits + WID_BRAS_PLATFORM_NUM_1, disable);
- this->SetWidgetDisabledState(bits + WID_BRAS_PLATFORM_LEN_1, disable);
- } else {
- this->SetWidgetDisabledState(bits + WID_BRAS_PLATFORM_NUM_1, HasBit(statspec->disallowed_platforms, bits) || disable);
- this->SetWidgetDisabledState(bits + WID_BRAS_PLATFORM_LEN_1, HasBit(statspec->disallowed_lengths, bits) || disable);
- }
- }
-
- this->DrawWidgets();
-
- /* 'Accepts' and 'Supplies' texts. */
- NWidgetBase *cov = this->GetWidget(WID_BRAS_COVERAGE_TEXTS);
- int top = cov->pos_y + WD_PAR_VSEP_NORMAL;
- int left = cov->pos_x + WD_FRAMERECT_LEFT;
- int right = cov->pos_x + cov->current_x - WD_FRAMERECT_RIGHT;
- int bottom = cov->pos_y + cov->current_y;
- top = DrawStationCoverageAreaText(left, right, top, SCT_ALL, rad, false) + WD_PAR_VSEP_NORMAL;
- top = DrawStationCoverageAreaText(left, right, top, SCT_ALL, rad, true) + WD_PAR_VSEP_NORMAL;
- /* Resize background if the window is too small.
- * Never make the window smaller to avoid oscillating if the size change affects the acceptance.
- * (This is the case, if making the window bigger moves the mouse into the window.) */
- if (top > bottom) {
- this->coverage_height += top - bottom;
- this->ReInit();
- }
- }
-
- virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
- {
- switch (widget) {
- case WID_BRAS_NEWST_LIST: {
- Dimension d = {0, 0};
- for (uint i = 0; i < StationClass::GetClassCount(); i++) {
- if (i == STAT_CLASS_WAYP) continue;
- SetDParam(0, StationClass::Get((StationClassID)i)->name);
- d = maxdim(d, GetStringBoundingBox(STR_BLACK_STRING));
- }
- size->width = max(size->width, d.width + padding.width);
- this->line_height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
- size->height = 5 * this->line_height;
- resize->height = this->line_height;
- break;
- }
-
- case WID_BRAS_SHOW_NEWST_TYPE: {
- if (!_railstation.newstations) {
- size->width = 0;
- size->height = 0;
- break;
- }
-
- /* If newstations exist, compute the non-zero minimal size. */
- Dimension d = {0, 0};
- StringID str = this->GetWidget(widget)->widget_data;
- for (StationClassID statclass = STAT_CLASS_BEGIN; statclass < (StationClassID)StationClass::GetClassCount(); statclass++) {
- if (statclass == STAT_CLASS_WAYP) continue;
- StationClass *stclass = StationClass::Get(statclass);
- for (uint16 j = 0; j < stclass->GetSpecCount(); j++) {
- const StationSpec *statspec = stclass->GetSpec(j);
- SetDParam(0, (statspec != NULL && statspec->name != 0) ? statspec->name : STR_STATION_CLASS_DFLT);
- d = maxdim(d, GetStringBoundingBox(str));
- }
- }
- size->width = max(size->width, d.width + padding.width);
- break;
- }
-
- case WID_BRAS_COVERAGE_TEXTS:
- size->height = this->coverage_height;
- break;
-
- case WID_BRAS_MATRIX:
- fill->height = 1;
- resize->height = 1;
- break;
- }
- }
-
- virtual void DrawWidget(const Rect &r, int widget) const
- {
- DrawPixelInfo tmp_dpi;
-
- switch (GB(widget, 0, 16)) {
- case WID_BRAS_PLATFORM_DIR_X:
- /* Set up a clipping area for the '/' station preview */
- if (FillDrawPixelInfo(&tmp_dpi, r.left, r.top, r.right - r.left + 1, r.bottom - r.top + 1)) {
- DrawPixelInfo *old_dpi = _cur_dpi;
- _cur_dpi = &tmp_dpi;
- if (!DrawStationTile(32, 28, _cur_railtype, AXIS_X, _railstation.station_class, _railstation.station_type)) {
- StationPickerDrawSprite(32, 28, STATION_RAIL, _cur_railtype, INVALID_ROADTYPE, 2);
- }
- _cur_dpi = old_dpi;
- }
- break;
-
- case WID_BRAS_PLATFORM_DIR_Y:
- /* Set up a clipping area for the '\' station preview */
- if (FillDrawPixelInfo(&tmp_dpi, r.left, r.top, r.right - r.left + 1, r.bottom - r.top + 1)) {
- DrawPixelInfo *old_dpi = _cur_dpi;
- _cur_dpi = &tmp_dpi;
- if (!DrawStationTile(32, 28, _cur_railtype, AXIS_Y, _railstation.station_class, _railstation.station_type)) {
- StationPickerDrawSprite(32, 28, STATION_RAIL, _cur_railtype, INVALID_ROADTYPE, 3);
- }
- _cur_dpi = old_dpi;
- }
- break;
-
- case WID_BRAS_NEWST_LIST: {
- uint statclass = 0;
- uint row = 0;
- for (uint i = 0; i < StationClass::GetClassCount(); i++) {
- if (i == STAT_CLASS_WAYP) continue;
- if (this->vscroll->IsVisible(statclass)) {
- SetDParam(0, StationClass::Get((StationClassID)i)->name);
- DrawString(r.left + WD_MATRIX_LEFT, r.right - WD_MATRIX_RIGHT, row * this->line_height + r.top + WD_MATRIX_TOP, STR_JUST_STRING,
- (StationClassID)i == _railstation.station_class ? TC_WHITE : TC_BLACK);
- row++;
- }
- statclass++;
- }
- break;
- }
-
- case WID_BRAS_IMAGE: {
- byte type = GB(widget, 16, 16);
- assert(type < _railstation.station_count);
- /* Check station availability callback */
- const StationSpec *statspec = StationClass::Get(_railstation.station_class)->GetSpec(type);
- if (!IsStationAvailable(statspec)) {
- GfxFillRect(r.left + 1, r.top + 1, r.right - 1, r.bottom - 1, PC_BLACK, FILLRECT_CHECKER);
- }
-
- /* Set up a clipping area for the station preview. */
- if (FillDrawPixelInfo(&tmp_dpi, r.left, r.top, r.right - r.left + 1, r.bottom - r.top + 1)) {
- DrawPixelInfo *old_dpi = _cur_dpi;
- _cur_dpi = &tmp_dpi;
- if (!DrawStationTile(32, 28, _cur_railtype, _railstation.orientation, _railstation.station_class, type)) {
- StationPickerDrawSprite(32, 28, STATION_RAIL, _cur_railtype, INVALID_ROADTYPE, 2 + _railstation.orientation);
- }
- _cur_dpi = old_dpi;
- }
- break;
- }
- }
- }
-
- virtual void OnResize()
- {
- if (this->vscroll != NULL) { // New stations available.
- this->vscroll->SetCapacityFromWidget(this, WID_BRAS_NEWST_LIST);
- }
- }
-
- virtual void SetStringParameters(int widget) const
- {
- if (widget == WID_BRAS_SHOW_NEWST_TYPE) {
- const StationSpec *statspec = StationClass::Get(_railstation.station_class)->GetSpec(_railstation.station_type);
- SetDParam(0, (statspec != NULL && statspec->name != 0) ? statspec->name : STR_STATION_CLASS_DFLT);
- }
- }
-
- virtual void OnClick(Point pt, int widget, int click_count)
- {
- switch (GB(widget, 0, 16)) {
- case WID_BRAS_PLATFORM_DIR_X:
- case WID_BRAS_PLATFORM_DIR_Y:
- this->RaiseWidget(_railstation.orientation + WID_BRAS_PLATFORM_DIR_X);
- _railstation.orientation = (Axis)(widget - WID_BRAS_PLATFORM_DIR_X);
- this->LowerWidget(_railstation.orientation + WID_BRAS_PLATFORM_DIR_X);
- if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
- this->SetDirty();
- DeleteWindowById(WC_SELECT_STATION, 0);
- break;
-
- case WID_BRAS_PLATFORM_NUM_1:
- case WID_BRAS_PLATFORM_NUM_2:
- case WID_BRAS_PLATFORM_NUM_3:
- case WID_BRAS_PLATFORM_NUM_4:
- case WID_BRAS_PLATFORM_NUM_5:
- case WID_BRAS_PLATFORM_NUM_6:
- case WID_BRAS_PLATFORM_NUM_7: {
- this->RaiseWidget(_settings_client.gui.station_numtracks + WID_BRAS_PLATFORM_NUM_BEGIN);
- this->RaiseWidget(WID_BRAS_PLATFORM_DRAG_N_DROP);
-
- _settings_client.gui.station_numtracks = widget - WID_BRAS_PLATFORM_NUM_BEGIN;
- _settings_client.gui.station_dragdrop = false;
-
- _settings_client.gui.station_dragdrop = false;
-
- const StationSpec *statspec = _railstation.newstations ? StationClass::Get(_railstation.station_class)->GetSpec(_railstation.station_type) : NULL;
- if (statspec != NULL && HasBit(statspec->disallowed_lengths, _settings_client.gui.station_platlength - 1)) {
- /* The previously selected number of platforms in invalid */
- for (uint i = 0; i < 7; i++) {
- if (!HasBit(statspec->disallowed_lengths, i)) {
- this->RaiseWidget(_settings_client.gui.station_platlength + WID_BRAS_PLATFORM_LEN_BEGIN);
- _settings_client.gui.station_platlength = i + 1;
- break;
- }
- }
- }
-
- this->LowerWidget(_settings_client.gui.station_numtracks + WID_BRAS_PLATFORM_NUM_BEGIN);
- this->LowerWidget(_settings_client.gui.station_platlength + WID_BRAS_PLATFORM_LEN_BEGIN);
- if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
- this->SetDirty();
- DeleteWindowById(WC_SELECT_STATION, 0);
- break;
- }
-
- case WID_BRAS_PLATFORM_LEN_1:
- case WID_BRAS_PLATFORM_LEN_2:
- case WID_BRAS_PLATFORM_LEN_3:
- case WID_BRAS_PLATFORM_LEN_4:
- case WID_BRAS_PLATFORM_LEN_5:
- case WID_BRAS_PLATFORM_LEN_6:
- case WID_BRAS_PLATFORM_LEN_7: {
- this->RaiseWidget(_settings_client.gui.station_platlength + WID_BRAS_PLATFORM_LEN_BEGIN);
- this->RaiseWidget(WID_BRAS_PLATFORM_DRAG_N_DROP);
-
- _settings_client.gui.station_platlength = widget - WID_BRAS_PLATFORM_LEN_BEGIN;
- _settings_client.gui.station_dragdrop = false;
-
- _settings_client.gui.station_dragdrop = false;
-
- const StationSpec *statspec = _railstation.newstations ? StationClass::Get(_railstation.station_class)->GetSpec(_railstation.station_type) : NULL;
- if (statspec != NULL && HasBit(statspec->disallowed_platforms, _settings_client.gui.station_numtracks - 1)) {
- /* The previously selected number of tracks in invalid */
- for (uint i = 0; i < 7; i++) {
- if (!HasBit(statspec->disallowed_platforms, i)) {
- this->RaiseWidget(_settings_client.gui.station_numtracks + WID_BRAS_PLATFORM_NUM_BEGIN);
- _settings_client.gui.station_numtracks = i + 1;
- break;
- }
- }
- }
-
- this->LowerWidget(_settings_client.gui.station_numtracks + WID_BRAS_PLATFORM_NUM_BEGIN);
- this->LowerWidget(_settings_client.gui.station_platlength + WID_BRAS_PLATFORM_LEN_BEGIN);
- if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
- this->SetDirty();
- DeleteWindowById(WC_SELECT_STATION, 0);
- break;
- }
-
- case WID_BRAS_PLATFORM_DRAG_N_DROP: {
- _settings_client.gui.station_dragdrop ^= true;
-
- this->ToggleWidgetLoweredState(WID_BRAS_PLATFORM_DRAG_N_DROP);
-
- /* get the first allowed length/number of platforms */
- const StationSpec *statspec = _railstation.newstations ? StationClass::Get(_railstation.station_class)->GetSpec(_railstation.station_type) : NULL;
- if (statspec != NULL && HasBit(statspec->disallowed_lengths, _settings_client.gui.station_platlength - 1)) {
- for (uint i = 0; i < 7; i++) {
- if (!HasBit(statspec->disallowed_lengths, i)) {
- this->RaiseWidget(_settings_client.gui.station_platlength + WID_BRAS_PLATFORM_LEN_BEGIN);
- _settings_client.gui.station_platlength = i + 1;
- break;
- }
- }
- }
- if (statspec != NULL && HasBit(statspec->disallowed_platforms, _settings_client.gui.station_numtracks - 1)) {
- for (uint i = 0; i < 7; i++) {
- if (!HasBit(statspec->disallowed_platforms, i)) {
- this->RaiseWidget(_settings_client.gui.station_numtracks + WID_BRAS_PLATFORM_NUM_BEGIN);
- _settings_client.gui.station_numtracks = i + 1;
- break;
- }
- }
- }
-
- this->SetWidgetLoweredState(_settings_client.gui.station_numtracks + WID_BRAS_PLATFORM_NUM_BEGIN, !_settings_client.gui.station_dragdrop);
- this->SetWidgetLoweredState(_settings_client.gui.station_platlength + WID_BRAS_PLATFORM_LEN_BEGIN, !_settings_client.gui.station_dragdrop);
- if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
- this->SetDirty();
- DeleteWindowById(WC_SELECT_STATION, 0);
- break;
- }
-
- case WID_BRAS_HIGHLIGHT_OFF:
- case WID_BRAS_HIGHLIGHT_ON:
- _settings_client.gui.station_show_coverage = (widget != WID_BRAS_HIGHLIGHT_OFF);
-
- this->SetWidgetLoweredState(WID_BRAS_HIGHLIGHT_OFF, !_settings_client.gui.station_show_coverage);
- this->SetWidgetLoweredState(WID_BRAS_HIGHLIGHT_ON, _settings_client.gui.station_show_coverage);
- if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
- this->SetDirty();
- break;
-
- case WID_BRAS_NEWST_LIST: {
- int y = this->vscroll->GetScrolledRowFromWidget(pt.y, this, WID_BRAS_NEWST_LIST, 0, this->line_height);
- if (y >= (int)StationClass::GetClassCount()) return;
- for (uint i = 0; i < StationClass::GetClassCount(); i++) {
- if (i == STAT_CLASS_WAYP) continue;
- if (y == 0) {
- if (_railstation.station_class != (StationClassID)i) {
- _railstation.station_class = (StationClassID)i;
- StationClass *stclass = StationClass::Get(_railstation.station_class);
- _railstation.station_count = stclass->GetSpecCount();
- _railstation.station_type = min((int)_railstation.station_type, max(0, (int)_railstation.station_count - 1));
-
- this->CheckSelectedSize(stclass->GetSpec(_railstation.station_type));
-
- NWidgetMatrix *matrix = this->GetWidget(WID_BRAS_MATRIX);
- matrix->SetCount(_railstation.station_count);
- matrix->SetClicked(_railstation.station_type);
- }
- if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
- this->SetDirty();
- DeleteWindowById(WC_SELECT_STATION, 0);
- break;
- }
- y--;
- }
- break;
- }
-
- case WID_BRAS_IMAGE: {
- int y = GB(widget, 16, 16);
- if (y >= _railstation.station_count) return;
-
- /* Check station availability callback */
- const StationSpec *statspec = StationClass::Get(_railstation.station_class)->GetSpec(y);
- if (!IsStationAvailable(statspec)) return;
-
- _railstation.station_type = y;
-
- this->CheckSelectedSize(statspec);
- this->GetWidget(WID_BRAS_MATRIX)->SetClicked(_railstation.station_type);
-
- if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
- this->SetDirty();
- DeleteWindowById(WC_SELECT_STATION, 0);
- break;
- }
- }
- }
-
- virtual void OnTick()
- {
- CheckRedrawStationCoverage(this);
- }
-};
-
-static const NWidgetPart _nested_station_builder_widgets[] = {
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
- NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_STATION_BUILD_RAIL_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
- NWidget(NWID_SELECTION, INVALID_COLOUR, WID_BRAS_SHOW_NEWST_DEFSIZE),
- NWidget(WWT_DEFSIZEBOX, COLOUR_DARK_GREEN),
- EndContainer(),
- EndContainer(),
- NWidget(WWT_PANEL, COLOUR_DARK_GREEN),
- NWidget(NWID_HORIZONTAL),
- NWidget(NWID_VERTICAL),
- NWidget(NWID_SELECTION, INVALID_COLOUR, WID_BRAS_SHOW_NEWST_ADDITIONS),
- NWidget(NWID_HORIZONTAL), SetPIP(7, 0, 7), SetPadding(2, 0, 1, 0),
- NWidget(WWT_MATRIX, COLOUR_GREY, WID_BRAS_NEWST_LIST), SetMinimalSize(122, 71), SetFill(1, 0),
- SetMatrixDataTip(1, 0, STR_STATION_BUILD_STATION_CLASS_TOOLTIP), SetScrollbar(WID_BRAS_NEWST_SCROLL),
- NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_BRAS_NEWST_SCROLL),
- EndContainer(),
- EndContainer(),
- NWidget(WWT_LABEL, COLOUR_DARK_GREEN), SetMinimalSize(144, 11), SetDataTip(STR_STATION_BUILD_ORIENTATION, STR_NULL), SetPadding(1, 2, 0, 2),
- NWidget(NWID_HORIZONTAL),
- NWidget(NWID_SPACER), SetMinimalSize(7, 0), SetFill(1, 0),
- NWidget(WWT_PANEL, COLOUR_GREY, WID_BRAS_PLATFORM_DIR_X), SetSizingType(NWST_BUTTON), SetMinimalSize(66, 60), SetFill(0, 0), SetDataTip(0x0, STR_STATION_BUILD_RAILROAD_ORIENTATION_TOOLTIP), EndContainer(),
- NWidget(NWID_SPACER), SetMinimalSize(2, 0), SetFill(1, 0),
- NWidget(WWT_PANEL, COLOUR_GREY, WID_BRAS_PLATFORM_DIR_Y), SetSizingType(NWST_BUTTON), SetMinimalSize(66, 60), SetFill(0, 0), SetDataTip(0x0, STR_STATION_BUILD_RAILROAD_ORIENTATION_TOOLTIP), EndContainer(),
- NWidget(NWID_SPACER), SetMinimalSize(7, 0), SetFill(1, 0),
- EndContainer(),
- NWidget(WWT_LABEL, COLOUR_DARK_GREEN, WID_BRAS_SHOW_NEWST_TYPE), SetMinimalSize(144, 11), SetDataTip(STR_ORANGE_STRING, STR_NULL), SetPadding(1, 2, 4, 2),
- NWidget(WWT_LABEL, COLOUR_DARK_GREEN), SetMinimalSize(144, 11), SetDataTip(STR_STATION_BUILD_NUMBER_OF_TRACKS, STR_NULL), SetPadding(0, 2, 0, 2),
- NWidget(NWID_HORIZONTAL),
- NWidget(NWID_SPACER), SetFill(1, 0),
- NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_BRAS_PLATFORM_NUM_1), SetMinimalSize(15, 12), SetDataTip(STR_BLACK_1, STR_STATION_BUILD_NUMBER_OF_TRACKS_TOOLTIP),
- NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_BRAS_PLATFORM_NUM_2), SetMinimalSize(15, 12), SetDataTip(STR_BLACK_2, STR_STATION_BUILD_NUMBER_OF_TRACKS_TOOLTIP),
- NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_BRAS_PLATFORM_NUM_3), SetMinimalSize(15, 12), SetDataTip(STR_BLACK_3, STR_STATION_BUILD_NUMBER_OF_TRACKS_TOOLTIP),
- NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_BRAS_PLATFORM_NUM_4), SetMinimalSize(15, 12), SetDataTip(STR_BLACK_4, STR_STATION_BUILD_NUMBER_OF_TRACKS_TOOLTIP),
- NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_BRAS_PLATFORM_NUM_5), SetMinimalSize(15, 12), SetDataTip(STR_BLACK_5, STR_STATION_BUILD_NUMBER_OF_TRACKS_TOOLTIP),
- NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_BRAS_PLATFORM_NUM_6), SetMinimalSize(15, 12), SetDataTip(STR_BLACK_6, STR_STATION_BUILD_NUMBER_OF_TRACKS_TOOLTIP),
- NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_BRAS_PLATFORM_NUM_7), SetMinimalSize(15, 12), SetDataTip(STR_BLACK_7, STR_STATION_BUILD_NUMBER_OF_TRACKS_TOOLTIP),
- NWidget(NWID_SPACER), SetFill(1, 0),
- EndContainer(),
- NWidget(WWT_LABEL, COLOUR_DARK_GREEN), SetMinimalSize(144, 11), SetDataTip(STR_STATION_BUILD_PLATFORM_LENGTH, STR_NULL), SetPadding(2, 2, 0, 2),
- NWidget(NWID_HORIZONTAL),
- NWidget(NWID_SPACER), SetFill(1, 0),
- NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_BRAS_PLATFORM_LEN_1), SetMinimalSize(15, 12), SetDataTip(STR_BLACK_1, STR_STATION_BUILD_PLATFORM_LENGTH_TOOLTIP),
- NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_BRAS_PLATFORM_LEN_2), SetMinimalSize(15, 12), SetDataTip(STR_BLACK_2, STR_STATION_BUILD_PLATFORM_LENGTH_TOOLTIP),
- NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_BRAS_PLATFORM_LEN_3), SetMinimalSize(15, 12), SetDataTip(STR_BLACK_3, STR_STATION_BUILD_PLATFORM_LENGTH_TOOLTIP),
- NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_BRAS_PLATFORM_LEN_4), SetMinimalSize(15, 12), SetDataTip(STR_BLACK_4, STR_STATION_BUILD_PLATFORM_LENGTH_TOOLTIP),
- NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_BRAS_PLATFORM_LEN_5), SetMinimalSize(15, 12), SetDataTip(STR_BLACK_5, STR_STATION_BUILD_PLATFORM_LENGTH_TOOLTIP),
- NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_BRAS_PLATFORM_LEN_6), SetMinimalSize(15, 12), SetDataTip(STR_BLACK_6, STR_STATION_BUILD_PLATFORM_LENGTH_TOOLTIP),
- NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_BRAS_PLATFORM_LEN_7), SetMinimalSize(15, 12), SetDataTip(STR_BLACK_7, STR_STATION_BUILD_PLATFORM_LENGTH_TOOLTIP),
- NWidget(NWID_SPACER), SetFill(1, 0),
- EndContainer(),
- NWidget(NWID_SPACER), SetMinimalSize(0, 2),
- NWidget(NWID_HORIZONTAL),
- NWidget(NWID_SPACER), SetMinimalSize(2, 0), SetFill(1, 0),
- NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_BRAS_PLATFORM_DRAG_N_DROP), SetMinimalSize(75, 12), SetDataTip(STR_STATION_BUILD_DRAG_DROP, STR_STATION_BUILD_DRAG_DROP_TOOLTIP),
- NWidget(NWID_SPACER), SetMinimalSize(2, 0), SetFill(1, 0),
- EndContainer(),
- NWidget(WWT_LABEL, COLOUR_DARK_GREEN), SetMinimalSize(144, 11), SetDataTip(STR_STATION_BUILD_COVERAGE_AREA_TITLE, STR_NULL), SetPadding(3, 2, 0, 2),
- NWidget(NWID_HORIZONTAL),
- NWidget(NWID_SPACER), SetMinimalSize(2, 0), SetFill(1, 0),
- NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_BRAS_HIGHLIGHT_OFF), SetMinimalSize(60, 12),
- SetDataTip(STR_STATION_BUILD_COVERAGE_OFF, STR_STATION_BUILD_COVERAGE_AREA_OFF_TOOLTIP),
- NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_BRAS_HIGHLIGHT_ON), SetMinimalSize(60, 12),
- SetDataTip(STR_STATION_BUILD_COVERAGE_ON, STR_STATION_BUILD_COVERAGE_AREA_ON_TOOLTIP),
- NWidget(NWID_SPACER), SetMinimalSize(2, 0), SetFill(1, 0),
- EndContainer(),
- EndContainer(),
- NWidget(NWID_SELECTION, INVALID_COLOUR, WID_BRAS_SHOW_NEWST_MATRIX),
- /* We need an additional background for the matrix, as the matrix cannot handle the scrollbar due to not being an NWidgetCore. */
- NWidget(WWT_PANEL, COLOUR_DARK_GREEN), SetScrollbar(WID_BRAS_MATRIX_SCROLL),
- NWidget(NWID_HORIZONTAL),
- NWidget(NWID_MATRIX, COLOUR_DARK_GREEN, WID_BRAS_MATRIX), SetScrollbar(WID_BRAS_MATRIX_SCROLL), SetPIP(0, 2, 0), SetPadding(2, 0, 0, 0),
- NWidget(WWT_PANEL, COLOUR_DARK_GREEN, WID_BRAS_IMAGE), SetMinimalSize(66, 60),
- SetFill(0, 0), SetResize(0, 0), SetDataTip(0x0, STR_STATION_BUILD_STATION_TYPE_TOOLTIP), SetScrollbar(WID_BRAS_MATRIX_SCROLL),
- EndContainer(),
- EndContainer(),
- NWidget(NWID_VSCROLLBAR, COLOUR_DARK_GREEN, WID_BRAS_MATRIX_SCROLL),
- EndContainer(),
- EndContainer(),
- EndContainer(),
- EndContainer(),
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_EMPTY, INVALID_COLOUR, WID_BRAS_COVERAGE_TEXTS), SetFill(1, 1), SetResize(1, 0),
- NWidget(NWID_SELECTION, INVALID_COLOUR, WID_BRAS_SHOW_NEWST_RESIZE),
- NWidget(NWID_VERTICAL),
- NWidget(WWT_PANEL, COLOUR_DARK_GREEN), SetFill(0, 1), EndContainer(),
- NWidget(WWT_RESIZEBOX, COLOUR_DARK_GREEN),
- EndContainer(),
- EndContainer(),
- EndContainer(),
- EndContainer(),
-};
-
-/** High level window description of the station-build window (default & newGRF) */
-static WindowDesc _station_builder_desc(
- WDP_AUTO, "build_station_rail", 350, 0,
- WC_BUILD_STATION, WC_BUILD_TOOLBAR,
- WDF_CONSTRUCTION,
- _nested_station_builder_widgets, lengthof(_nested_station_builder_widgets)
-);
-
-/** Open station build window */
-static void ShowStationBuilder(Window *parent)
-{
- bool newstations = StationClass::GetClassCount() > 2 || StationClass::Get(STAT_CLASS_DFLT)->GetSpecCount() != 1;
- new BuildRailStationWindow(&_station_builder_desc, parent, newstations);
-}
-
-struct BuildSignalWindow : public PickerWindowBase {
-private:
- Dimension sig_sprite_size; ///< Maximum size of signal GUI sprites.
- int sig_sprite_bottom_offset; ///< Maximum extent of signal GUI sprite from reference point towards bottom.
-
- /**
- * Draw dynamic a signal-sprite in a button in the signal GUI
- * Draw the sprite +1px to the right and down if the button is lowered
- *
- * @param widget_index index of this widget in the window
- * @param image the sprite to draw
- */
- void DrawSignalSprite(byte widget_index, SpriteID image) const
- {
- Point offset;
- Dimension sprite_size = GetSpriteSize(image, &offset);
- const NWidgetBase *widget = this->GetWidget(widget_index);
- int x = widget->pos_x - offset.x +
- (widget->current_x - sprite_size.width + offset.x) / 2; // centered
- int y = widget->pos_y - sig_sprite_bottom_offset + WD_IMGBTN_TOP +
- (widget->current_y - WD_IMGBTN_TOP - WD_IMGBTN_BOTTOM + sig_sprite_size.height) / 2; // aligned to bottom
-
- DrawSprite(image, PAL_NONE,
- x + this->IsWidgetLowered(widget_index),
- y + this->IsWidgetLowered(widget_index));
- }
-
-public:
- BuildSignalWindow(WindowDesc *desc, Window *parent) : PickerWindowBase(desc, parent)
- {
- this->InitNested(TRANSPORT_RAIL);
- this->OnInvalidateData();
- }
-
- ~BuildSignalWindow()
- {
- _convert_signal_button = false;
- }
-
- virtual void OnInit()
- {
- /* Calculate maximum signal sprite size. */
- this->sig_sprite_size.width = 0;
- this->sig_sprite_size.height = 0;
- this->sig_sprite_bottom_offset = 0;
- const RailtypeInfo *rti = GetRailTypeInfo(_cur_railtype);
- for (uint type = SIGTYPE_NORMAL; type < SIGTYPE_END; type++) {
- for (uint variant = SIG_ELECTRIC; variant <= SIG_SEMAPHORE; variant++) {
- for (uint lowered = 0; lowered < 2; lowered++) {
- Point offset;
- Dimension sprite_size = GetSpriteSize(rti->gui_sprites.signals[type][variant][lowered], &offset);
- this->sig_sprite_bottom_offset = max(this->sig_sprite_bottom_offset, sprite_size.height);
- this->sig_sprite_size.width = max(this->sig_sprite_size.width, sprite_size.width - offset.x);
- this->sig_sprite_size.height = max(this->sig_sprite_size.height, sprite_size.height - offset.y);
- }
- }
- }
- }
-
- virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
- {
- if (widget == WID_BS_DRAG_SIGNALS_DENSITY_LABEL) {
- /* Two digits for signals density. */
- size->width = max(size->width, 2 * GetDigitWidth() + padding.width + WD_FRAMERECT_LEFT + WD_FRAMERECT_RIGHT);
- } else if (IsInsideMM(widget, WID_BS_SEMAPHORE_NORM, WID_BS_ELECTRIC_PBS_OWAY + 1)) {
- size->width = max(size->width, this->sig_sprite_size.width + WD_IMGBTN_LEFT + WD_IMGBTN_RIGHT);
- size->height = max(size->height, this->sig_sprite_size.height + WD_IMGBTN_TOP + WD_IMGBTN_BOTTOM);
- }
- }
-
- virtual void SetStringParameters(int widget) const
- {
- switch (widget) {
- case WID_BS_DRAG_SIGNALS_DENSITY_LABEL:
- SetDParam(0, _settings_client.gui.drag_signals_density);
- break;
- }
- }
-
- virtual void DrawWidget(const Rect &r, int widget) const
- {
- if (IsInsideMM(widget, WID_BS_SEMAPHORE_NORM, WID_BS_ELECTRIC_PBS_OWAY + 1)) {
- /* Extract signal from widget number. */
- int type = (widget - WID_BS_SEMAPHORE_NORM) % SIGTYPE_END;
- int var = SIG_SEMAPHORE - (widget - WID_BS_SEMAPHORE_NORM) / SIGTYPE_END; // SignalVariant order is reversed compared to the widgets.
- SpriteID sprite = GetRailTypeInfo(_cur_railtype)->gui_sprites.signals[type][var][this->IsWidgetLowered(widget)];
-
- this->DrawSignalSprite(widget, sprite);
- }
- }
-
- virtual void OnClick(Point pt, int widget, int click_count)
- {
- switch (widget) {
- case WID_BS_SEMAPHORE_NORM:
- case WID_BS_SEMAPHORE_ENTRY:
- case WID_BS_SEMAPHORE_EXIT:
- case WID_BS_SEMAPHORE_COMBO:
- case WID_BS_SEMAPHORE_PBS:
- case WID_BS_SEMAPHORE_PBS_OWAY:
- case WID_BS_ELECTRIC_NORM:
- case WID_BS_ELECTRIC_ENTRY:
- case WID_BS_ELECTRIC_EXIT:
- case WID_BS_ELECTRIC_COMBO:
- case WID_BS_ELECTRIC_PBS:
- case WID_BS_ELECTRIC_PBS_OWAY:
- this->RaiseWidget((_cur_signal_variant == SIG_ELECTRIC ? WID_BS_ELECTRIC_NORM : WID_BS_SEMAPHORE_NORM) + _cur_signal_type);
-
- _cur_signal_type = (SignalType)((uint)((widget - WID_BS_SEMAPHORE_NORM) % (SIGTYPE_LAST + 1)));
- _cur_signal_variant = widget >= WID_BS_ELECTRIC_NORM ? SIG_ELECTRIC : SIG_SEMAPHORE;
-
- /* If 'remove' button of rail build toolbar is active, disable it. */
- if (_remove_button_clicked) {
- Window *w = FindWindowById(WC_BUILD_TOOLBAR, TRANSPORT_RAIL);
- if (w != NULL) ToggleRailButton_Remove(w);
- }
-
- break;
-
- case WID_BS_CONVERT:
- _convert_signal_button = !_convert_signal_button;
- break;
-
- case WID_BS_DRAG_SIGNALS_DENSITY_DECREASE:
- if (_settings_client.gui.drag_signals_density > 1) {
- _settings_client.gui.drag_signals_density--;
- SetWindowDirty(WC_GAME_OPTIONS, WN_GAME_OPTIONS_GAME_SETTINGS);
- }
- break;
-
- case WID_BS_DRAG_SIGNALS_DENSITY_INCREASE:
- if (_settings_client.gui.drag_signals_density < 20) {
- _settings_client.gui.drag_signals_density++;
- SetWindowDirty(WC_GAME_OPTIONS, WN_GAME_OPTIONS_GAME_SETTINGS);
- }
- break;
-
- default: break;
- }
-
- this->InvalidateData();
- }
-
- /**
- * Some data on this window has become invalid.
- * @param data Information about the changed data.
- * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
- */
- virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
- {
- if (!gui_scope) return;
- this->LowerWidget((_cur_signal_variant == SIG_ELECTRIC ? WID_BS_ELECTRIC_NORM : WID_BS_SEMAPHORE_NORM) + _cur_signal_type);
-
- this->SetWidgetLoweredState(WID_BS_CONVERT, _convert_signal_button);
-
- this->SetWidgetDisabledState(WID_BS_DRAG_SIGNALS_DENSITY_DECREASE, _settings_client.gui.drag_signals_density == 1);
- this->SetWidgetDisabledState(WID_BS_DRAG_SIGNALS_DENSITY_INCREASE, _settings_client.gui.drag_signals_density == 20);
- }
-};
-
-/** Nested widget definition of the build signal window */
-static const NWidgetPart _nested_signal_builder_widgets[] = {
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
- NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_BUILD_SIGNAL_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
- EndContainer(),
- NWidget(NWID_VERTICAL, NC_EQUALSIZE),
- NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
- NWidget(WWT_PANEL, COLOUR_DARK_GREEN, WID_BS_SEMAPHORE_NORM), SetDataTip(STR_NULL, STR_BUILD_SIGNAL_SEMAPHORE_NORM_TOOLTIP), EndContainer(), SetFill(1, 1),
- NWidget(WWT_PANEL, COLOUR_DARK_GREEN, WID_BS_SEMAPHORE_ENTRY), SetDataTip(STR_NULL, STR_BUILD_SIGNAL_SEMAPHORE_ENTRY_TOOLTIP), EndContainer(), SetFill(1, 1),
- NWidget(WWT_PANEL, COLOUR_DARK_GREEN, WID_BS_SEMAPHORE_EXIT), SetDataTip(STR_NULL, STR_BUILD_SIGNAL_SEMAPHORE_EXIT_TOOLTIP), EndContainer(), SetFill(1, 1),
- NWidget(WWT_PANEL, COLOUR_DARK_GREEN, WID_BS_SEMAPHORE_COMBO), SetDataTip(STR_NULL, STR_BUILD_SIGNAL_SEMAPHORE_COMBO_TOOLTIP), EndContainer(), SetFill(1, 1),
- NWidget(WWT_PANEL, COLOUR_DARK_GREEN, WID_BS_SEMAPHORE_PBS), SetDataTip(STR_NULL, STR_BUILD_SIGNAL_SEMAPHORE_PBS_TOOLTIP), EndContainer(), SetFill(1, 1),
- NWidget(WWT_PANEL, COLOUR_DARK_GREEN, WID_BS_SEMAPHORE_PBS_OWAY), SetDataTip(STR_NULL, STR_BUILD_SIGNAL_SEMAPHORE_PBS_OWAY_TOOLTIP), EndContainer(), SetFill(1, 1),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_BS_CONVERT), SetDataTip(SPR_IMG_SIGNAL_CONVERT, STR_BUILD_SIGNAL_CONVERT_TOOLTIP), SetFill(1, 1),
- EndContainer(),
- NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
- NWidget(WWT_PANEL, COLOUR_DARK_GREEN, WID_BS_ELECTRIC_NORM), SetDataTip(STR_NULL, STR_BUILD_SIGNAL_ELECTRIC_NORM_TOOLTIP), EndContainer(), SetFill(1, 1),
- NWidget(WWT_PANEL, COLOUR_DARK_GREEN, WID_BS_ELECTRIC_ENTRY), SetDataTip(STR_NULL, STR_BUILD_SIGNAL_ELECTRIC_ENTRY_TOOLTIP), EndContainer(), SetFill(1, 1),
- NWidget(WWT_PANEL, COLOUR_DARK_GREEN, WID_BS_ELECTRIC_EXIT), SetDataTip(STR_NULL, STR_BUILD_SIGNAL_ELECTRIC_EXIT_TOOLTIP), EndContainer(), SetFill(1, 1),
- NWidget(WWT_PANEL, COLOUR_DARK_GREEN, WID_BS_ELECTRIC_COMBO), SetDataTip(STR_NULL, STR_BUILD_SIGNAL_ELECTRIC_COMBO_TOOLTIP), EndContainer(), SetFill(1, 1),
- NWidget(WWT_PANEL, COLOUR_DARK_GREEN, WID_BS_ELECTRIC_PBS), SetDataTip(STR_NULL, STR_BUILD_SIGNAL_ELECTRIC_PBS_TOOLTIP), EndContainer(), SetFill(1, 1),
- NWidget(WWT_PANEL, COLOUR_DARK_GREEN, WID_BS_ELECTRIC_PBS_OWAY), SetDataTip(STR_NULL, STR_BUILD_SIGNAL_ELECTRIC_PBS_OWAY_TOOLTIP), EndContainer(), SetFill(1, 1),
- NWidget(WWT_PANEL, COLOUR_DARK_GREEN), SetDataTip(STR_NULL, STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP), SetFill(1, 1),
- NWidget(WWT_LABEL, COLOUR_DARK_GREEN, WID_BS_DRAG_SIGNALS_DENSITY_LABEL), SetDataTip(STR_ORANGE_INT, STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_TOOLTIP), SetFill(1, 1),
- NWidget(NWID_HORIZONTAL), SetPIP(2, 0, 2),
- NWidget(NWID_SPACER), SetFill(1, 0),
- NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_BS_DRAG_SIGNALS_DENSITY_DECREASE), SetSizingType(NWST_STEP), SetMinimalSize(9, 12), SetDataTip(AWV_DECREASE, STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_DECREASE_TOOLTIP),
- NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_BS_DRAG_SIGNALS_DENSITY_INCREASE), SetSizingType(NWST_STEP), SetMinimalSize(9, 12), SetDataTip(AWV_INCREASE, STR_BUILD_SIGNAL_DRAG_SIGNALS_DENSITY_INCREASE_TOOLTIP),
- NWidget(NWID_SPACER), SetFill(1, 0),
- EndContainer(),
- NWidget(NWID_SPACER), SetMinimalSize(0, 2), SetFill(1, 0),
- EndContainer(),
- EndContainer(),
- EndContainer(),
-};
-
-/** Signal selection window description */
-static WindowDesc _signal_builder_desc(
- WDP_AUTO, "build_signal", 0, 0,
- WC_BUILD_SIGNAL, WC_BUILD_TOOLBAR,
- WDF_CONSTRUCTION,
- _nested_signal_builder_widgets, lengthof(_nested_signal_builder_widgets)
-);
-
-/**
- * Open the signal selection window
- */
-static void ShowSignalBuilder(Window *parent)
-{
- new BuildSignalWindow(&_signal_builder_desc, parent);
-}
-
-struct BuildRailDepotWindow : public PickerWindowBase {
- BuildRailDepotWindow(WindowDesc *desc, Window *parent) : PickerWindowBase(desc, parent)
- {
- this->InitNested(TRANSPORT_RAIL);
- this->LowerWidget(_build_depot_direction + WID_BRAD_DEPOT_NE);
- }
-
- virtual void DrawWidget(const Rect &r, int widget) const
- {
- if (!IsInsideMM(widget, WID_BRAD_DEPOT_NE, WID_BRAD_DEPOT_NW + 1)) return;
-
- DrawTrainDepotSprite(r.left - 1, r.top, widget - WID_BRAD_DEPOT_NE + DIAGDIR_NE, _cur_railtype);
- }
-
- virtual void OnClick(Point pt, int widget, int click_count)
- {
- switch (widget) {
- case WID_BRAD_DEPOT_NE:
- case WID_BRAD_DEPOT_SE:
- case WID_BRAD_DEPOT_SW:
- case WID_BRAD_DEPOT_NW:
- this->RaiseWidget(_build_depot_direction + WID_BRAD_DEPOT_NE);
- _build_depot_direction = (DiagDirection)(widget - WID_BRAD_DEPOT_NE);
- this->LowerWidget(_build_depot_direction + WID_BRAD_DEPOT_NE);
- if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
- this->SetDirty();
- break;
- }
- }
-};
-
-/** Nested widget definition of the build rail depot window */
-static const NWidgetPart _nested_build_depot_widgets[] = {
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
- NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_BUILD_DEPOT_TRAIN_ORIENTATION_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
- EndContainer(),
- NWidget(WWT_PANEL, COLOUR_DARK_GREEN),
- NWidget(NWID_SPACER), SetMinimalSize(0, 3),
- NWidget(NWID_HORIZONTAL_LTR),
- NWidget(NWID_SPACER), SetMinimalSize(3, 0), SetFill(1, 0),
- NWidget(NWID_VERTICAL),
- NWidget(WWT_PANEL, COLOUR_GREY, WID_BRAD_DEPOT_NW), SetSizingType(NWST_BUTTON), SetMinimalSize(66, 50), SetDataTip(0x0, STR_BUILD_DEPOT_TRAIN_ORIENTATION_TOOLTIP),
- EndContainer(),
- NWidget(NWID_SPACER), SetMinimalSize(0, 2),
- NWidget(WWT_PANEL, COLOUR_GREY, WID_BRAD_DEPOT_SW), SetSizingType(NWST_BUTTON), SetMinimalSize(66, 50), SetDataTip(0x0, STR_BUILD_DEPOT_TRAIN_ORIENTATION_TOOLTIP),
- EndContainer(),
- EndContainer(),
- NWidget(NWID_SPACER), SetMinimalSize(2, 0),
- NWidget(NWID_VERTICAL),
- NWidget(WWT_PANEL, COLOUR_GREY, WID_BRAD_DEPOT_NE), SetSizingType(NWST_BUTTON), SetMinimalSize(66, 50), SetDataTip(0x0, STR_BUILD_DEPOT_TRAIN_ORIENTATION_TOOLTIP),
- EndContainer(),
- NWidget(NWID_SPACER), SetMinimalSize(0, 2),
- NWidget(WWT_PANEL, COLOUR_GREY, WID_BRAD_DEPOT_SE), SetSizingType(NWST_BUTTON), SetMinimalSize(66, 50), SetDataTip(0x0, STR_BUILD_DEPOT_TRAIN_ORIENTATION_TOOLTIP),
- EndContainer(),
- EndContainer(),
- NWidget(NWID_SPACER), SetMinimalSize(3, 0), SetFill(1, 0),
- EndContainer(),
- NWidget(NWID_SPACER), SetMinimalSize(0, 3),
- EndContainer(),
-};
-
-static WindowDesc _build_depot_desc(
- WDP_AUTO, NULL, 0, 0,
- WC_BUILD_DEPOT, WC_BUILD_TOOLBAR,
- WDF_CONSTRUCTION,
- _nested_build_depot_widgets, lengthof(_nested_build_depot_widgets)
-);
-
-static void ShowBuildTrainDepotPicker(Window *parent)
-{
- new BuildRailDepotWindow(&_build_depot_desc, parent);
-}
-
-struct BuildRailWaypointWindow : PickerWindowBase {
- BuildRailWaypointWindow(WindowDesc *desc, Window *parent) : PickerWindowBase(desc, parent)
- {
- this->CreateNestedTree();
-
- NWidgetMatrix *matrix = this->GetWidget(WID_BRW_WAYPOINT_MATRIX);
- matrix->SetScrollbar(this->GetScrollbar(WID_BRW_SCROLL));
-
- this->FinishInitNested(TRANSPORT_RAIL);
-
- matrix->SetCount(_waypoint_count);
- matrix->SetClicked(_cur_waypoint_type);
- }
-
- virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
- {
- switch (widget) {
- case WID_BRW_WAYPOINT_MATRIX:
- /* Three blobs high and wide. */
- size->width += resize->width * 2;
- size->height += resize->height * 2;
-
- /* Resizing in X direction only at blob size, but at pixel level in Y. */
- resize->height = 1;
- break;
- }
- }
-
- virtual void DrawWidget(const Rect &r, int widget) const
- {
- switch (GB(widget, 0, 16)) {
- case WID_BRW_WAYPOINT: {
- byte type = GB(widget, 16, 16);
- const StationSpec *statspec = StationClass::Get(STAT_CLASS_WAYP)->GetSpec(type);
- DrawWaypointSprite(r.left + TILE_PIXELS, r.bottom - TILE_PIXELS, type, _cur_railtype);
-
- if (!IsStationAvailable(statspec)) {
- GfxFillRect(r.left + 1, r.top + 1, r.right - 1, r.bottom - 1, PC_BLACK, FILLRECT_CHECKER);
- }
- }
- }
- }
-
- virtual void OnClick(Point pt, int widget, int click_count)
- {
- switch (GB(widget, 0, 16)) {
- case WID_BRW_WAYPOINT: {
- byte type = GB(widget, 16, 16);
- this->GetWidget(WID_BRW_WAYPOINT_MATRIX)->SetClicked(_cur_waypoint_type);
-
- /* Check station availability callback */
- const StationSpec *statspec = StationClass::Get(STAT_CLASS_WAYP)->GetSpec(type);
- if (!IsStationAvailable(statspec)) return;
-
- _cur_waypoint_type = type;
- this->GetWidget(WID_BRW_WAYPOINT_MATRIX)->SetClicked(_cur_waypoint_type);
- if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
- this->SetDirty();
- break;
- }
- }
- }
-};
-
-/** Nested widget definition for the build NewGRF rail waypoint window */
-static const NWidgetPart _nested_build_waypoint_widgets[] = {
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
- NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_WAYPOINT_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
- NWidget(WWT_DEFSIZEBOX, COLOUR_DARK_GREEN),
- EndContainer(),
- NWidget(NWID_HORIZONTAL),
- NWidget(NWID_MATRIX, COLOUR_DARK_GREEN, WID_BRW_WAYPOINT_MATRIX), SetPIP(3, 2, 3), SetScrollbar(WID_BRW_SCROLL),
- NWidget(WWT_PANEL, COLOUR_DARK_GREEN, WID_BRW_WAYPOINT), SetMinimalSize(66, 60), SetDataTip(0x0, STR_WAYPOINT_GRAPHICS_TOOLTIP), SetScrollbar(WID_BRW_SCROLL), EndContainer(),
- EndContainer(),
- NWidget(NWID_VERTICAL),
- NWidget(NWID_VSCROLLBAR, COLOUR_DARK_GREEN, WID_BRW_SCROLL),
- NWidget(WWT_RESIZEBOX, COLOUR_DARK_GREEN),
- EndContainer(),
- EndContainer(),
-};
-
-static WindowDesc _build_waypoint_desc(
- WDP_AUTO, "build_waypoint", 0, 0,
- WC_BUILD_WAYPOINT, WC_BUILD_TOOLBAR,
- WDF_CONSTRUCTION,
- _nested_build_waypoint_widgets, lengthof(_nested_build_waypoint_widgets)
-);
-
-static void ShowBuildWaypointPicker(Window *parent)
-{
- new BuildRailWaypointWindow(&_build_waypoint_desc, parent);
-}
-
-/**
- * Initialize rail building GUI settings
- */
-void InitializeRailGui()
-{
- _build_depot_direction = DIAGDIR_NW;
-}
-
-/**
- * Re-initialize rail-build toolbar after toggling support for electric trains
- * @param disable Boolean whether electric trains are disabled (removed from the game)
- */
-void ReinitGuiAfterToggleElrail(bool disable)
-{
- extern RailType _last_built_railtype;
- if (disable && _last_built_railtype == RAILTYPE_ELECTRIC) {
- _last_built_railtype = _cur_railtype = RAILTYPE_RAIL;
- BuildRailToolbarWindow *w = dynamic_cast(FindWindowById(WC_BUILD_TOOLBAR, TRANSPORT_RAIL));
- if (w != NULL) w->ModifyRailType(_cur_railtype);
- }
- MarkWholeScreenDirty();
-}
-
-/** Set the initial (default) railtype to use */
-static void SetDefaultRailGui()
-{
- if (_local_company == COMPANY_SPECTATOR || !Company::IsValidID(_local_company)) return;
-
- extern RailType _last_built_railtype;
- RailType rt = (RailType)(_settings_client.gui.default_rail_type + RAILTYPE_END);
- if (rt == DEF_RAILTYPE_MOST_USED) {
- /* Find the most used rail type */
- RailType count[RAILTYPE_END];
- memset(count, 0, sizeof(count));
- for (TileIndex t = 0; t < MapSize(); t++) {
- if (IsTileType(t, MP_RAILWAY) || IsLevelCrossingTile(t) || HasStationTileRail(t) ||
- (IsTileType(t, MP_TUNNELBRIDGE) && GetTunnelBridgeTransportType(t) == TRANSPORT_RAIL)) {
- count[GetRailType(t)]++;
- }
- }
-
- rt = RAILTYPE_RAIL;
- for (RailType r = RAILTYPE_ELECTRIC; r < RAILTYPE_END; r++) {
- if (count[r] >= count[rt]) rt = r;
- }
-
- /* No rail, just get the first available one */
- if (count[rt] == 0) rt = DEF_RAILTYPE_FIRST;
- }
- switch (rt) {
- case DEF_RAILTYPE_FIRST:
- rt = RAILTYPE_RAIL;
- while (rt < RAILTYPE_END && !HasRailtypeAvail(_local_company, rt)) rt++;
- break;
-
- case DEF_RAILTYPE_LAST:
- rt = GetBestRailtype(_local_company);
- break;
-
- default:
- break;
- }
-
- _last_built_railtype = _cur_railtype = rt;
- BuildRailToolbarWindow *w = dynamic_cast(FindWindowById(WC_BUILD_TOOLBAR, TRANSPORT_RAIL));
- if (w != NULL) w->ModifyRailType(_cur_railtype);
-}
-
-/**
- * Updates the current signal variant used in the signal GUI
- * to the one adequate to current year.
- * @param p needed to be called when a setting changes
- * @return success, needed for settings
- */
-bool ResetSignalVariant(int32 p)
-{
- SignalVariant new_variant = (_cur_year < _settings_client.gui.semaphore_build_before ? SIG_SEMAPHORE : SIG_ELECTRIC);
-
- if (new_variant != _cur_signal_variant) {
- Window *w = FindWindowById(WC_BUILD_SIGNAL, 0);
- if (w != NULL) {
- w->SetDirty();
- w->RaiseWidget((_cur_signal_variant == SIG_ELECTRIC ? WID_BS_ELECTRIC_NORM : WID_BS_SEMAPHORE_NORM) + _cur_signal_type);
- }
- _cur_signal_variant = new_variant;
- }
-
- return true;
-}
-
-/**
- * Resets the rail GUI - sets default railtype to build
- * and resets the signal GUI
- */
-void InitializeRailGUI()
-{
- SetDefaultRailGui();
-
- _convert_signal_button = false;
- _cur_signal_type = _default_signal_type[_settings_client.gui.default_signal_type];
- ResetSignalVariant();
-}
-
-/**
- * Compare railtypes based on their sorting order.
- * @param first The railtype to compare to.
- * @param second The railtype to compare.
- * @return True iff the first should be sorted before the second.
- */
-static int CDECL CompareRailTypes(const DropDownListItem * const *first, const DropDownListItem * const *second)
-{
- return GetRailTypeInfo((RailType)(*first)->result)->sorting_order - GetRailTypeInfo((RailType)(*second)->result)->sorting_order;
-}
-
-/**
- * Create a drop down list for all the rail types of the local company.
- * @param for_replacement Whether this list is for the replacement window.
- * @return The populated and sorted #DropDownList.
- */
-DropDownList *GetRailTypeDropDownList(bool for_replacement)
-{
- RailTypes used_railtypes = RAILTYPES_NONE;
-
- /* Find the used railtypes. */
- Engine *e;
- FOR_ALL_ENGINES_OF_TYPE(e, VEH_TRAIN) {
- if (!HasBit(e->info.climates, _settings_game.game_creation.landscape)) continue;
-
- used_railtypes |= GetRailTypeInfo(e->u.rail.railtype)->introduces_railtypes;
- }
-
- /* Get the date introduced railtypes as well. */
- used_railtypes = AddDateIntroducedRailTypes(used_railtypes, MAX_DAY);
-
- const Company *c = Company::Get(_local_company);
- DropDownList *list = new DropDownList();
- for (RailType rt = RAILTYPE_BEGIN; rt != RAILTYPE_END; rt++) {
- /* If it's not used ever, don't show it to the user. */
- if (!HasBit(used_railtypes, rt)) continue;
-
- const RailtypeInfo *rti = GetRailTypeInfo(rt);
- /* Skip rail type if it has no label */
- if (rti->label == 0) continue;
-
- StringID str = for_replacement ? rti->strings.replace_text : (rti->max_speed > 0 ? STR_TOOLBAR_RAILTYPE_VELOCITY : STR_JUST_STRING);
- DropDownListParamStringItem *item = new DropDownListParamStringItem(str, rt, !HasBit(c->avail_railtypes, rt));
- item->SetParam(0, rti->strings.menu_text);
- item->SetParam(1, rti->max_speed);
- *list->Append() = item;
- }
- QSortT(list->Begin(), list->Length(), CompareRailTypes);
- return list;
-}
diff --git a/src/road_gui.cpp.orig b/src/road_gui.cpp.orig
deleted file mode 100644
index 04387cbb7d..0000000000
--- a/src/road_gui.cpp.orig
+++ /dev/null
@@ -1,1092 +0,0 @@
-/* $Id$ */
-
-/*
- * This file is part of OpenTTD.
- * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
- * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see .
- */
-
-/** @file road_gui.cpp GUI for building roads. */
-
-#include "stdafx.h"
-#include "gui.h"
-#include "window_gui.h"
-#include "station_gui.h"
-#include "terraform_gui.h"
-#include "viewport_func.h"
-#include "command_func.h"
-#include "road_cmd.h"
-#include "station_func.h"
-#include "window_func.h"
-#include "vehicle_func.h"
-#include "sound_func.h"
-#include "company_func.h"
-#include "tunnelbridge.h"
-#include "tunnelbridge_map.h"
-#include "tilehighlight_func.h"
-#include "company_base.h"
-#include "hotkeys.h"
-#include "road_gui.h"
-
-#include "widgets/road_widget.h"
-
-#include "table/strings.h"
-
-static void ShowRVStationPicker(Window *parent, RoadStopType rs);
-static void ShowRoadDepotPicker(Window *parent);
-
-static bool _remove_button_clicked;
-static bool _one_way_button_clicked;
-
-/**
- * Define the values of the RoadFlags
- * @see CmdBuildLongRoad
- */
-enum RoadFlags {
- RF_NONE = 0x00,
- RF_START_HALFROAD_Y = 0x01, // The start tile in Y-dir should have only a half road
- RF_END_HALFROAD_Y = 0x02, // The end tile in Y-dir should have only a half road
- RF_DIR_Y = 0x04, // The direction is Y-dir
- RF_DIR_X = RF_NONE, // Dummy; Dir X is set when RF_DIR_Y is not set
- RF_START_HALFROAD_X = 0x08, // The start tile in X-dir should have only a half road
- RF_END_HALFROAD_X = 0x10, // The end tile in X-dir should have only a half road
-};
-DECLARE_ENUM_AS_BIT_SET(RoadFlags)
-
-static RoadFlags _place_road_flag;
-
-static RoadType _cur_roadtype;
-
-static DiagDirection _road_depot_orientation;
-static DiagDirection _road_station_picker_orientation;
-
-void CcPlaySound1D(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
-{
- if (result.Succeeded() && _settings_client.sound.confirm) SndPlayTileFx(SND_1F_SPLAT, tile);
-}
-
-/**
- * Callback to start placing a bridge.
- * @param tile Start tile of the bridge.
- */
-static void PlaceRoad_Bridge(TileIndex tile, Window *w)
-{
- if (IsBridgeTile(tile)) {
- TileIndex other_tile = GetOtherTunnelBridgeEnd(tile);
- Point pt = {0, 0};
- w->OnPlaceMouseUp(VPM_X_OR_Y, DDSP_BUILD_BRIDGE, pt, other_tile, tile);
- } else {
- VpStartPlaceSizing(tile, VPM_X_OR_Y, DDSP_BUILD_BRIDGE);
- }
-}
-
-/**
- * Callback executed after a build road tunnel command has been called.
- *
- * @param result Whether the build succeeded.
- * @param start_tile Starting tile of the tunnel.
- * @param p1 bit 0-3 railtype or roadtypes
- * bit 8-9 transport type
- * @param p2 unused
- */
-void CcBuildRoadTunnel(const CommandCost &result, TileIndex start_tile, uint32 p1, uint32 p2)
-{
- if (result.Succeeded()) {
- if (_settings_client.sound.confirm) SndPlayTileFx(SND_20_SPLAT_2, start_tile);
- if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
-
- DiagDirection start_direction = ReverseDiagDir(GetTunnelBridgeDirection(start_tile));
- ConnectRoadToStructure(start_tile, start_direction);
-
- TileIndex end_tile = GetOtherTunnelBridgeEnd(start_tile);
- DiagDirection end_direction = ReverseDiagDir(GetTunnelBridgeDirection(end_tile));
- ConnectRoadToStructure(end_tile, end_direction);
- } else {
- SetRedErrorSquare(_build_tunnel_endtile);
- }
-}
-
-/** Structure holding information per roadtype for several functions */
-struct RoadTypeInfo {
- StringID err_build_road; ///< Building a normal piece of road
- StringID err_remove_road; ///< Removing a normal piece of road
- StringID err_depot; ///< Building a depot
- StringID err_build_station[2]; ///< Building a bus or truck station
- StringID err_remove_station[2]; ///< Removing of a bus or truck station
-
- StringID picker_title[2]; ///< Title for the station picker for bus or truck stations
- StringID picker_tooltip[2]; ///< Tooltip for the station picker for bus or truck stations
-
- SpriteID cursor_nesw; ///< Cursor for building NE and SW bits
- SpriteID cursor_nwse; ///< Cursor for building NW and SE bits
- SpriteID cursor_autoroad; ///< Cursor for building autoroad
-};
-
-/** What errors/cursors must be shown for several types of roads */
-static const RoadTypeInfo _road_type_infos[] = {
- {
- STR_ERROR_CAN_T_BUILD_ROAD_HERE,
- STR_ERROR_CAN_T_REMOVE_ROAD_FROM,
- STR_ERROR_CAN_T_BUILD_ROAD_DEPOT,
- { STR_ERROR_CAN_T_BUILD_BUS_STATION, STR_ERROR_CAN_T_BUILD_TRUCK_STATION },
- { STR_ERROR_CAN_T_REMOVE_BUS_STATION, STR_ERROR_CAN_T_REMOVE_TRUCK_STATION },
- { STR_STATION_BUILD_BUS_ORIENTATION, STR_STATION_BUILD_TRUCK_ORIENTATION },
- { STR_STATION_BUILD_BUS_ORIENTATION_TOOLTIP, STR_STATION_BUILD_TRUCK_ORIENTATION_TOOLTIP },
-
- SPR_CURSOR_ROAD_NESW,
- SPR_CURSOR_ROAD_NWSE,
- SPR_CURSOR_AUTOROAD,
- },
- {
- STR_ERROR_CAN_T_BUILD_TRAMWAY_HERE,
- STR_ERROR_CAN_T_REMOVE_TRAMWAY_FROM,
- STR_ERROR_CAN_T_BUILD_TRAM_DEPOT,
- { STR_ERROR_CAN_T_BUILD_PASSENGER_TRAM_STATION, STR_ERROR_CAN_T_BUILD_CARGO_TRAM_STATION },
- { STR_ERROR_CAN_T_REMOVE_PASSENGER_TRAM_STATION, STR_ERROR_CAN_T_REMOVE_CARGO_TRAM_STATION },
- { STR_STATION_BUILD_PASSENGER_TRAM_ORIENTATION, STR_STATION_BUILD_CARGO_TRAM_ORIENTATION },
- { STR_STATION_BUILD_PASSENGER_TRAM_ORIENTATION_TOOLTIP, STR_STATION_BUILD_CARGO_TRAM_ORIENTATION_TOOLTIP },
-
- SPR_CURSOR_TRAMWAY_NESW,
- SPR_CURSOR_TRAMWAY_NWSE,
- SPR_CURSOR_AUTOTRAM,
- },
-};
-
-/**
- * If required, connects a new structure to an existing road or tram by building the missing roadbit.
- * @param tile Tile containing the structure to connect.
- * @param direction Direction to check.
- */
-void ConnectRoadToStructure(TileIndex tile, DiagDirection direction)
-{
- tile += TileOffsByDiagDir(direction);
- /* if there is a roadpiece just outside of the station entrance, build a connecting route */
- if (IsNormalRoadTile(tile)) {
- if (GetRoadBits(tile, _cur_roadtype) != ROAD_NONE) {
- DoCommandP(tile, _cur_roadtype << 4 | DiagDirToRoadBits(ReverseDiagDir(direction)), 0, CMD_BUILD_ROAD);
- }
- }
-}
-
-void CcRoadDepot(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
-{
- if (result.Failed()) return;
-
- DiagDirection dir = (DiagDirection)GB(p1, 0, 2);
- if (_settings_client.sound.confirm) SndPlayTileFx(SND_1F_SPLAT, tile);
- if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
- ConnectRoadToStructure(tile, dir);
-}
-
-/**
- * Command callback for building road stops.
- * @param result Result of the build road stop command.
- * @param tile Start tile.
- * @param p1 bit 0..7: Width of the road stop.
- * bit 8..15: Length of the road stop.
- * @param p2 bit 0: 0 For bus stops, 1 for truck stops.
- * bit 1: 0 For normal stops, 1 for drive-through.
- * bit 2..3: The roadtypes.
- * bit 5: Allow stations directly adjacent to other stations.
- * bit 6..7: Entrance direction (#DiagDirection).
- * bit 16..31: Station ID to join (NEW_STATION if build new one).
- * @see CmdBuildRoadStop
- */
-void CcRoadStop(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
-{
- if (result.Failed()) return;
-
- DiagDirection dir = (DiagDirection)GB(p2, 6, 2);
- if (_settings_client.sound.confirm) SndPlayTileFx(SND_1F_SPLAT, tile);
- if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
- TileArea roadstop_area(tile, GB(p1, 0, 8), GB(p1, 8, 8));
- TILE_AREA_LOOP(cur_tile, roadstop_area) {
- ConnectRoadToStructure(cur_tile, dir);
- /* For a drive-through road stop build connecting road for other entrance. */
- if (HasBit(p2, 1)) ConnectRoadToStructure(cur_tile, ReverseDiagDir(dir));
- }
-}
-
-/**
- * Place a new road stop.
- * @param start_tile First tile of the area.
- * @param end_tile Last tile of the area.
- * @param p2 bit 0: 0 For bus stops, 1 for truck stops.
- * bit 2..3: The roadtypes.
- * bit 5: Allow stations directly adjacent to other stations.
- * @param cmd Command to use.
- * @see CcRoadStop()
- */
-static void PlaceRoadStop(TileIndex start_tile, TileIndex end_tile, uint32 p2, uint32 cmd)
-{
- uint8 ddir = _road_station_picker_orientation;
- SB(p2, 16, 16, INVALID_STATION); // no station to join
-
- if (ddir >= DIAGDIR_END) {
- SetBit(p2, 1); // It's a drive-through stop.
- ddir -= DIAGDIR_END; // Adjust picker result to actual direction.
- }
- p2 |= ddir << 6; // Set the DiagDirecion into p2 bits 6 and 7.
-
- TileArea ta(start_tile, end_tile);
- CommandContainer cmdcont = { ta.tile, ta.w | ta.h << 8, p2, cmd, CcRoadStop, "" };
- ShowSelectStationIfNeeded(cmdcont, ta);
-}
-
-/**
- * Callback for placing a bus station.
- * @param tile Position to place the station.
- */
-static void PlaceRoad_BusStation(TileIndex tile)
-{
- if (_remove_button_clicked) {
- VpStartPlaceSizing(tile, VPM_X_AND_Y, DDSP_REMOVE_BUSSTOP);
- } else {
- if (_road_station_picker_orientation < DIAGDIR_END) { // Not a drive-through stop.
- VpStartPlaceSizing(tile, (DiagDirToAxis(_road_station_picker_orientation) == AXIS_X) ? VPM_X_LIMITED : VPM_Y_LIMITED, DDSP_BUILD_BUSSTOP);
- } else {
- VpStartPlaceSizing(tile, VPM_X_AND_Y_LIMITED, DDSP_BUILD_BUSSTOP);
- }
- VpSetPlaceSizingLimit(_settings_game.station.station_spread);
- }
-}
-
-/**
- * Callback for placing a truck station.
- * @param tile Position to place the station.
- */
-static void PlaceRoad_TruckStation(TileIndex tile)
-{
- if (_remove_button_clicked) {
- VpStartPlaceSizing(tile, VPM_X_AND_Y, DDSP_REMOVE_TRUCKSTOP);
- } else {
- if (_road_station_picker_orientation < DIAGDIR_END) { // Not a drive-through stop.
- VpStartPlaceSizing(tile, (DiagDirToAxis(_road_station_picker_orientation) == AXIS_X) ? VPM_X_LIMITED : VPM_Y_LIMITED, DDSP_BUILD_TRUCKSTOP);
- } else {
- VpStartPlaceSizing(tile, VPM_X_AND_Y_LIMITED, DDSP_BUILD_TRUCKSTOP);
- }
- VpSetPlaceSizingLimit(_settings_game.station.station_spread);
- }
-}
-
-typedef void OnButtonClick(Window *w);
-
-/**
- * Toggles state of the Remove button of Build road toolbar
- * @param w window the button belongs to
- */
-static void ToggleRoadButton_Remove(Window *w)
-{
- w->ToggleWidgetLoweredState(WID_ROT_REMOVE);
- w->SetWidgetDirty(WID_ROT_REMOVE);
- _remove_button_clicked = w->IsWidgetLowered(WID_ROT_REMOVE);
- SetSelectionRed(_remove_button_clicked);
-}
-
-/**
- * Updates the Remove button because of Ctrl state change
- * @param w window the button belongs to
- * @return true iff the remove button was changed
- */
-static bool RoadToolbar_CtrlChanged(Window *w)
-{
- if (w->IsWidgetDisabled(WID_ROT_REMOVE)) return false;
-
- /* allow ctrl to switch remove mode only for these widgets */
- for (uint i = WID_ROT_ROAD_X; i <= WID_ROT_AUTOROAD; i++) {
- if (w->IsWidgetLowered(i)) {
- ToggleRoadButton_Remove(w);
- return true;
- }
- }
-
- return false;
-}
-
-/** Road toolbar window handler. */
-struct BuildRoadToolbarWindow : Window {
- int last_started_action; ///< Last started user action.
-
- BuildRoadToolbarWindow(WindowDesc *desc, WindowNumber window_number) : Window(desc)
- {
- this->InitNested(window_number);
- this->SetWidgetsDisabledState(true,
- WID_ROT_REMOVE,
- WID_ROT_ONE_WAY,
- WIDGET_LIST_END);
-
- this->OnInvalidateData();
- this->last_started_action = WIDGET_LIST_END;
-
- if (_settings_client.gui.link_terraform_toolbar) ShowTerraformToolbar(this);
- }
-
- ~BuildRoadToolbarWindow()
- {
- if (_settings_client.gui.link_terraform_toolbar) DeleteWindowById(WC_SCEN_LAND_GEN, 0, false);
- }
-
- /**
- * Some data on this window has become invalid.
- * @param data Information about the changed data.
- * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
- */
- virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
- {
- if (!gui_scope) return;
- this->SetWidgetsDisabledState(!CanBuildVehicleInfrastructure(VEH_ROAD),
- WID_ROT_DEPOT,
- WID_ROT_BUS_STATION,
- WID_ROT_TRUCK_STATION,
- WIDGET_LIST_END);
- }
-
- /**
- * Update the remove button lowered state of the road toolbar
- *
- * @param clicked_widget The widget which the client clicked just now
- */
- void UpdateOptionWidgetStatus(RoadToolbarWidgets clicked_widget)
- {
- /* The remove and the one way button state is driven
- * by the other buttons so they don't act on themselves.
- * Both are only valid if they are able to apply as options. */
- switch (clicked_widget) {
- case WID_ROT_REMOVE:
- this->RaiseWidget(WID_ROT_ONE_WAY);
- this->SetWidgetDirty(WID_ROT_ONE_WAY);
- break;
-
- case WID_ROT_ONE_WAY:
- this->RaiseWidget(WID_ROT_REMOVE);
- this->SetWidgetDirty(WID_ROT_REMOVE);
- break;
-
- case WID_ROT_BUS_STATION:
- case WID_ROT_TRUCK_STATION:
- this->DisableWidget(WID_ROT_ONE_WAY);
- this->SetWidgetDisabledState(WID_ROT_REMOVE, !this->IsWidgetLowered(clicked_widget));
- break;
-
- case WID_ROT_ROAD_X:
- case WID_ROT_ROAD_Y:
- case WID_ROT_AUTOROAD:
- this->SetWidgetsDisabledState(!this->IsWidgetLowered(clicked_widget),
- WID_ROT_REMOVE,
- WID_ROT_ONE_WAY,
- WIDGET_LIST_END);
- break;
-
- default:
- /* When any other buttons than road/station, raise and
- * disable the removal button */
- this->SetWidgetsDisabledState(true,
- WID_ROT_REMOVE,
- WID_ROT_ONE_WAY,
- WIDGET_LIST_END);
- this->SetWidgetsLoweredState(false,
- WID_ROT_REMOVE,
- WID_ROT_ONE_WAY,
- WIDGET_LIST_END);
- break;
- }
- }
-
- virtual void OnClick(Point pt, int widget, int click_count)
- {
- _remove_button_clicked = false;
- _one_way_button_clicked = false;
- switch (widget) {
- case WID_ROT_ROAD_X:
- HandlePlacePushButton(this, WID_ROT_ROAD_X, _road_type_infos[_cur_roadtype].cursor_nwse, HT_RECT);
- this->last_started_action = widget;
- break;
-
- case WID_ROT_ROAD_Y:
- HandlePlacePushButton(this, WID_ROT_ROAD_Y, _road_type_infos[_cur_roadtype].cursor_nesw, HT_RECT);
- this->last_started_action = widget;
- break;
-
- case WID_ROT_AUTOROAD:
- HandlePlacePushButton(this, WID_ROT_AUTOROAD, _road_type_infos[_cur_roadtype].cursor_autoroad, HT_RECT);
- this->last_started_action = widget;
- break;
-
- case WID_ROT_DEMOLISH:
- HandlePlacePushButton(this, WID_ROT_DEMOLISH, ANIMCURSOR_DEMOLISH, HT_RECT | HT_DIAGONAL);
- this->last_started_action = widget;
- break;
-
- case WID_ROT_DEPOT:
- if (_game_mode == GM_EDITOR || !CanBuildVehicleInfrastructure(VEH_ROAD)) return;
- if (HandlePlacePushButton(this, WID_ROT_DEPOT, SPR_CURSOR_ROAD_DEPOT, HT_RECT)) {
- ShowRoadDepotPicker(this);
- this->last_started_action = widget;
- }
- break;
-
- case WID_ROT_BUS_STATION:
- if (_game_mode == GM_EDITOR || !CanBuildVehicleInfrastructure(VEH_ROAD)) return;
- if (HandlePlacePushButton(this, WID_ROT_BUS_STATION, SPR_CURSOR_BUS_STATION, HT_RECT)) {
- ShowRVStationPicker(this, ROADSTOP_BUS);
- this->last_started_action = widget;
- }
- break;
-
- case WID_ROT_TRUCK_STATION:
- if (_game_mode == GM_EDITOR || !CanBuildVehicleInfrastructure(VEH_ROAD)) return;
- if (HandlePlacePushButton(this, WID_ROT_TRUCK_STATION, SPR_CURSOR_TRUCK_STATION, HT_RECT)) {
- ShowRVStationPicker(this, ROADSTOP_TRUCK);
- this->last_started_action = widget;
- }
- break;
-
- case WID_ROT_ONE_WAY:
- if (this->IsWidgetDisabled(WID_ROT_ONE_WAY)) return;
- this->SetDirty();
- this->ToggleWidgetLoweredState(WID_ROT_ONE_WAY);
- SetSelectionRed(false);
- break;
-
- case WID_ROT_BUILD_BRIDGE:
- HandlePlacePushButton(this, WID_ROT_BUILD_BRIDGE, SPR_CURSOR_BRIDGE, HT_RECT);
- this->last_started_action = widget;
- break;
-
- case WID_ROT_BUILD_TUNNEL:
- HandlePlacePushButton(this, WID_ROT_BUILD_TUNNEL, SPR_CURSOR_ROAD_TUNNEL, HT_SPECIAL);
- this->last_started_action = widget;
- break;
-
- case WID_ROT_REMOVE:
- if (this->IsWidgetDisabled(WID_ROT_REMOVE)) return;
-
- DeleteWindowById(WC_SELECT_STATION, 0);
- ToggleRoadButton_Remove(this);
- if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
- break;
-
- default: NOT_REACHED();
- }
- this->UpdateOptionWidgetStatus((RoadToolbarWidgets)widget);
- if (_ctrl_pressed) RoadToolbar_CtrlChanged(this);
- }
-
- virtual EventState OnHotkey(int hotkey)
- {
- MarkTileDirtyByTile(TileVirtXY(_thd.pos.x, _thd.pos.y)); // redraw tile selection
- return Window::OnHotkey(hotkey);
- }
-
- virtual void OnPlaceObject(Point pt, TileIndex tile)
- {
- _remove_button_clicked = this->IsWidgetLowered(WID_ROT_REMOVE);
- _one_way_button_clicked = this->IsWidgetLowered(WID_ROT_ONE_WAY);
- switch (this->last_started_action) {
- case WID_ROT_ROAD_X:
- _place_road_flag = RF_DIR_X;
- if (_tile_fract_coords.x >= 8) _place_road_flag |= RF_START_HALFROAD_X;
- VpStartPlaceSizing(tile, VPM_FIX_Y, DDSP_PLACE_ROAD_X_DIR);
- break;
-
- case WID_ROT_ROAD_Y:
- _place_road_flag = RF_DIR_Y;
- if (_tile_fract_coords.y >= 8) _place_road_flag |= RF_START_HALFROAD_Y;
- VpStartPlaceSizing(tile, VPM_FIX_X, DDSP_PLACE_ROAD_Y_DIR);
- break;
-
- case WID_ROT_AUTOROAD:
- _place_road_flag = RF_NONE;
- if (_tile_fract_coords.x >= 8) _place_road_flag |= RF_START_HALFROAD_X;
- if (_tile_fract_coords.y >= 8) _place_road_flag |= RF_START_HALFROAD_Y;
- VpStartPlaceSizing(tile, VPM_X_OR_Y, DDSP_PLACE_AUTOROAD);
- break;
-
- case WID_ROT_DEMOLISH:
- PlaceProc_DemolishArea(tile);
- break;
-
- case WID_ROT_DEPOT:
- DoCommandP(tile, _cur_roadtype << 2 | _road_depot_orientation, 0,
- CMD_BUILD_ROAD_DEPOT | CMD_MSG(_road_type_infos[_cur_roadtype].err_depot), CcRoadDepot);
- break;
-
- case WID_ROT_BUS_STATION:
- PlaceRoad_BusStation(tile);
- break;
-
- case WID_ROT_TRUCK_STATION:
- PlaceRoad_TruckStation(tile);
- break;
-
- case WID_ROT_BUILD_BRIDGE:
- PlaceRoad_Bridge(tile, this);
- break;
-
- case WID_ROT_BUILD_TUNNEL:
- DoCommandP(tile, RoadTypeToRoadTypes(_cur_roadtype) | (TRANSPORT_ROAD << 8), 0,
- CMD_BUILD_TUNNEL | CMD_MSG(STR_ERROR_CAN_T_BUILD_TUNNEL_HERE), CcBuildRoadTunnel);
- break;
-
- default: NOT_REACHED();
- }
- }
-
- virtual void OnPlaceObjectAbort()
- {
- this->RaiseButtons();
- this->SetWidgetsDisabledState(true,
- WID_ROT_REMOVE,
- WID_ROT_ONE_WAY,
- WIDGET_LIST_END);
- this->SetWidgetDirty(WID_ROT_REMOVE);
- this->SetWidgetDirty(WID_ROT_ONE_WAY);
-
- DeleteWindowById(WC_BUS_STATION, TRANSPORT_ROAD);
- DeleteWindowById(WC_TRUCK_STATION, TRANSPORT_ROAD);
- DeleteWindowById(WC_BUILD_DEPOT, TRANSPORT_ROAD);
- DeleteWindowById(WC_SELECT_STATION, 0);
- DeleteWindowByClass(WC_BUILD_BRIDGE);
- }
-
- virtual void OnPlaceDrag(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt)
- {
- /* Here we update the end tile flags
- * of the road placement actions.
- * At first we reset the end halfroad
- * bits and if needed we set them again. */
- switch (select_proc) {
- case DDSP_PLACE_ROAD_X_DIR:
- _place_road_flag &= ~RF_END_HALFROAD_X;
- if (pt.x & 8) _place_road_flag |= RF_END_HALFROAD_X;
- break;
-
- case DDSP_PLACE_ROAD_Y_DIR:
- _place_road_flag &= ~RF_END_HALFROAD_Y;
- if (pt.y & 8) _place_road_flag |= RF_END_HALFROAD_Y;
- break;
-
- case DDSP_PLACE_AUTOROAD:
- _place_road_flag &= ~(RF_END_HALFROAD_Y | RF_END_HALFROAD_X);
- if (pt.y & 8) _place_road_flag |= RF_END_HALFROAD_Y;
- if (pt.x & 8) _place_road_flag |= RF_END_HALFROAD_X;
-
- /* For autoroad we need to update the
- * direction of the road */
- if (_thd.size.x > _thd.size.y || (_thd.size.x == _thd.size.y &&
- ( (_tile_fract_coords.x < _tile_fract_coords.y && (_tile_fract_coords.x + _tile_fract_coords.y) < 16) ||
- (_tile_fract_coords.x > _tile_fract_coords.y && (_tile_fract_coords.x + _tile_fract_coords.y) > 16) ))) {
- /* Set dir = X */
- _place_road_flag &= ~RF_DIR_Y;
- } else {
- /* Set dir = Y */
- _place_road_flag |= RF_DIR_Y;
- }
-
- break;
-
- default:
- break;
- }
-
- VpSelectTilesWithMethod(pt.x, pt.y, select_method);
- }
-
- virtual void OnPlaceMouseUp(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt, TileIndex start_tile, TileIndex end_tile)
- {
- if (pt.x != -1) {
- switch (select_proc) {
- default: NOT_REACHED();
- case DDSP_BUILD_BRIDGE:
- if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
- ShowBuildBridgeWindow(start_tile, end_tile, TRANSPORT_ROAD, RoadTypeToRoadTypes(_cur_roadtype));
- break;
-
- case DDSP_DEMOLISH_AREA:
- GUIPlaceProcDragXY(select_proc, start_tile, end_tile);
- break;
-
- case DDSP_PLACE_ROAD_X_DIR:
- case DDSP_PLACE_ROAD_Y_DIR:
- case DDSP_PLACE_AUTOROAD:
- /* Flag description:
- * Use the first three bits (0x07) if dir == Y
- * else use the last 2 bits (X dir has
- * not the 3rd bit set) */
- _place_road_flag = (RoadFlags)((_place_road_flag & RF_DIR_Y) ? (_place_road_flag & 0x07) : (_place_road_flag >> 3));
-
- DoCommandP(start_tile, end_tile, _place_road_flag | (_cur_roadtype << 3) | (_one_way_button_clicked << 5),
- _remove_button_clicked ?
- CMD_REMOVE_LONG_ROAD | CMD_MSG(_road_type_infos[_cur_roadtype].err_remove_road) :
- CMD_BUILD_LONG_ROAD | CMD_MSG(_road_type_infos[_cur_roadtype].err_build_road), CcPlaySound1D);
- break;
-
- case DDSP_BUILD_BUSSTOP:
- PlaceRoadStop(start_tile, end_tile, (_ctrl_pressed << 5) | RoadTypeToRoadTypes(_cur_roadtype) << 2 | ROADSTOP_BUS, CMD_BUILD_ROAD_STOP | CMD_MSG(_road_type_infos[_cur_roadtype].err_build_station[ROADSTOP_BUS]));
- break;
-
- case DDSP_BUILD_TRUCKSTOP:
- PlaceRoadStop(start_tile, end_tile, (_ctrl_pressed << 5) | RoadTypeToRoadTypes(_cur_roadtype) << 2 | ROADSTOP_TRUCK, CMD_BUILD_ROAD_STOP | CMD_MSG(_road_type_infos[_cur_roadtype].err_build_station[ROADSTOP_TRUCK]));
- break;
-
- case DDSP_REMOVE_BUSSTOP: {
- TileArea ta(start_tile, end_tile);
- DoCommandP(ta.tile, ta.w | ta.h << 8, ROADSTOP_BUS, CMD_REMOVE_ROAD_STOP | CMD_MSG(_road_type_infos[_cur_roadtype].err_remove_station[ROADSTOP_BUS]), CcPlaySound1D);
- break;
- }
-
- case DDSP_REMOVE_TRUCKSTOP: {
- TileArea ta(start_tile, end_tile);
- DoCommandP(ta.tile, ta.w | ta.h << 8, ROADSTOP_TRUCK, CMD_REMOVE_ROAD_STOP | CMD_MSG(_road_type_infos[_cur_roadtype].err_remove_station[ROADSTOP_TRUCK]), CcPlaySound1D);
- break;
- }
- }
- }
- }
-
- virtual void OnPlacePresize(Point pt, TileIndex tile)
- {
- DoCommand(tile, RoadTypeToRoadTypes(_cur_roadtype) | (TRANSPORT_ROAD << 8), 0, DC_AUTO, CMD_BUILD_TUNNEL);
- VpSetPresizeRange(tile, _build_tunnel_endtile == 0 ? tile : _build_tunnel_endtile);
- }
-
- virtual EventState OnCTRLStateChange()
- {
- if (RoadToolbar_CtrlChanged(this)) return ES_HANDLED;
- return ES_NOT_HANDLED;
- }
-
- static HotkeyList hotkeys;
-};
-
-/**
- * Handler for global hotkeys of the BuildRoadToolbarWindow.
- * @param hotkey Hotkey
- * @return ES_HANDLED if hotkey was accepted.
- */
-static EventState RoadToolbarGlobalHotkeys(int hotkey)
-{
- Window *w = NULL;
- switch (_game_mode) {
- case GM_NORMAL: {
- extern RoadType _last_built_roadtype;
- w = ShowBuildRoadToolbar(_last_built_roadtype);
- break;
- }
-
- case GM_EDITOR:
- w = ShowBuildRoadScenToolbar();
- break;
-
- default:
- break;
- }
-
- if (w == NULL) return ES_NOT_HANDLED;
- return w->OnHotkey(hotkey);
-}
-
-static Hotkey roadtoolbar_hotkeys[] = {
- Hotkey('1', "build_x", WID_ROT_ROAD_X),
- Hotkey('2', "build_y", WID_ROT_ROAD_Y),
- Hotkey('3', "autoroad", WID_ROT_AUTOROAD),
- Hotkey('4', "demolish", WID_ROT_DEMOLISH),
- Hotkey('5', "depot", WID_ROT_DEPOT),
- Hotkey('6', "bus_station", WID_ROT_BUS_STATION),
- Hotkey('7', "truck_station", WID_ROT_TRUCK_STATION),
- Hotkey('8', "oneway", WID_ROT_ONE_WAY),
- Hotkey('B', "bridge", WID_ROT_BUILD_BRIDGE),
- Hotkey('T', "tunnel", WID_ROT_BUILD_TUNNEL),
- Hotkey('R', "remove", WID_ROT_REMOVE),
- HOTKEY_LIST_END
-};
-HotkeyList BuildRoadToolbarWindow::hotkeys("roadtoolbar", roadtoolbar_hotkeys, RoadToolbarGlobalHotkeys);
-
-
-static const NWidgetPart _nested_build_road_widgets[] = {
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
- NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_ROAD_TOOLBAR_ROAD_CONSTRUCTION_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
- NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN),
- EndContainer(),
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_ROAD_X),
- SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_ROAD_X_DIR, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_SECTION),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_ROAD_Y),
- SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_ROAD_Y_DIR, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_SECTION),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_AUTOROAD),
- SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_AUTOROAD, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOROAD),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_DEMOLISH),
- SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_DYNAMITE, STR_TOOLTIP_DEMOLISH_BUILDINGS_ETC),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_DEPOT),
- SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_ROAD_DEPOT, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_VEHICLE_DEPOT),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_BUS_STATION),
- SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_BUS_STATION, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_BUS_STATION),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_TRUCK_STATION),
- SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_TRUCK_BAY, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRUCK_LOADING_BAY),
- NWidget(WWT_PANEL, COLOUR_DARK_GREEN, -1), SetMinimalSize(0, 22), SetFill(1, 1), EndContainer(),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_ONE_WAY),
- SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_ROAD_ONE_WAY, STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_ONE_WAY_ROAD),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_BUILD_BRIDGE),
- SetFill(0, 1), SetMinimalSize(43, 22), SetDataTip(SPR_IMG_BRIDGE, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_BRIDGE),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_BUILD_TUNNEL),
- SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_ROAD_TUNNEL, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_TUNNEL),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_REMOVE),
- SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_REMOVE, STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_ROAD),
- EndContainer(),
-};
-
-static WindowDesc _build_road_desc(
- WDP_ALIGN_TOOLBAR, "toolbar_road", 0, 0,
- WC_BUILD_TOOLBAR, WC_NONE,
- WDF_CONSTRUCTION,
- _nested_build_road_widgets, lengthof(_nested_build_road_widgets),
- &BuildRoadToolbarWindow::hotkeys
-);
-
-static const NWidgetPart _nested_build_tramway_widgets[] = {
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
- NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_ROAD_TOOLBAR_TRAM_CONSTRUCTION_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
- NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN),
- EndContainer(),
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_ROAD_X),
- SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_TRAMWAY_X_DIR, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_SECTION),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_ROAD_Y),
- SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_TRAMWAY_Y_DIR, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_SECTION),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_AUTOROAD),
- SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_AUTOTRAM, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOTRAM),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_DEMOLISH),
- SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_DYNAMITE, STR_TOOLTIP_DEMOLISH_BUILDINGS_ETC),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_DEPOT),
- SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_ROAD_DEPOT, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAM_VEHICLE_DEPOT),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_BUS_STATION),
- SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_BUS_STATION, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_PASSENGER_TRAM_STATION),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_TRUCK_STATION),
- SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_TRUCK_BAY, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_CARGO_TRAM_STATION),
- NWidget(WWT_PANEL, COLOUR_DARK_GREEN, -1), SetMinimalSize(0, 22), SetFill(1, 1), EndContainer(),
- NWidget(WWT_EMPTY, COLOUR_DARK_GREEN, WID_ROT_ONE_WAY), SetMinimalSize(0, 0),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_BUILD_BRIDGE),
- SetFill(0, 1), SetMinimalSize(43, 22), SetDataTip(SPR_IMG_BRIDGE, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_BRIDGE),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_BUILD_TUNNEL),
- SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_ROAD_TUNNEL, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_TUNNEL),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_REMOVE),
- SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_REMOVE, STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_TRAMWAYS),
- EndContainer(),
-};
-
-static WindowDesc _build_tramway_desc(
- WDP_ALIGN_TOOLBAR, "toolbar_tramway", 0, 0,
- WC_BUILD_TOOLBAR, WC_NONE,
- WDF_CONSTRUCTION,
- _nested_build_tramway_widgets, lengthof(_nested_build_tramway_widgets),
- &BuildRoadToolbarWindow::hotkeys
-);
-
-/**
- * Open the build road toolbar window
- *
- * If the terraform toolbar is linked to the toolbar, that window is also opened.
- *
- * @return newly opened road toolbar, or NULL if the toolbar could not be opened.
- */
-Window *ShowBuildRoadToolbar(RoadType roadtype)
-{
- if (!Company::IsValidID(_local_company)) return NULL;
- _cur_roadtype = roadtype;
-
- DeleteWindowByClass(WC_BUILD_TOOLBAR);
- return AllocateWindowDescFront(roadtype == ROADTYPE_ROAD ? &_build_road_desc : &_build_tramway_desc, TRANSPORT_ROAD);
-}
-
-static const NWidgetPart _nested_build_road_scen_widgets[] = {
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
- NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_ROAD_TOOLBAR_ROAD_CONSTRUCTION_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
- NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN),
- EndContainer(),
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_ROAD_X),
- SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_ROAD_X_DIR, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_SECTION),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_ROAD_Y),
- SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_ROAD_Y_DIR, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_SECTION),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_AUTOROAD),
- SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_AUTOROAD, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOROAD),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_DEMOLISH),
- SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_DYNAMITE, STR_TOOLTIP_DEMOLISH_BUILDINGS_ETC),
- NWidget(WWT_PANEL, COLOUR_DARK_GREEN, -1), SetMinimalSize(0, 22), SetFill(1, 1), EndContainer(),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_ONE_WAY),
- SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_ROAD_ONE_WAY, STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_ONE_WAY_ROAD),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_BUILD_BRIDGE),
- SetFill(0, 1), SetMinimalSize(43, 22), SetDataTip(SPR_IMG_BRIDGE, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_BRIDGE),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_BUILD_TUNNEL),
- SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_ROAD_TUNNEL, STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_TUNNEL),
- NWidget(WWT_IMGBTN, COLOUR_DARK_GREEN, WID_ROT_REMOVE),
- SetFill(0, 1), SetMinimalSize(22, 22), SetDataTip(SPR_IMG_REMOVE, STR_ROAD_TOOLBAR_TOOLTIP_TOGGLE_BUILD_REMOVE_FOR_ROAD),
- EndContainer(),
-};
-
-static WindowDesc _build_road_scen_desc(
- WDP_AUTO, "toolbar_road_scen", 0, 0,
- WC_SCEN_BUILD_TOOLBAR, WC_NONE,
- WDF_CONSTRUCTION,
- _nested_build_road_scen_widgets, lengthof(_nested_build_road_scen_widgets),
- &BuildRoadToolbarWindow::hotkeys
-);
-
-/**
- * Show the road building toolbar in the scenario editor.
- * @return The just opened toolbar.
- */
-Window *ShowBuildRoadScenToolbar()
-{
- _cur_roadtype = ROADTYPE_ROAD;
- return AllocateWindowDescFront(&_build_road_scen_desc, TRANSPORT_ROAD);
-}
-
-struct BuildRoadDepotWindow : public PickerWindowBase {
- BuildRoadDepotWindow(WindowDesc *desc, Window *parent) : PickerWindowBase(desc, parent)
- {
- this->CreateNestedTree();
-
- this->LowerWidget(_road_depot_orientation + WID_BROD_DEPOT_NE);
- if ( _cur_roadtype == ROADTYPE_TRAM) {
- this->GetWidget(WID_BROD_CAPTION)->widget_data = STR_BUILD_DEPOT_TRAM_ORIENTATION_CAPTION;
- for (int i = WID_BROD_DEPOT_NE; i <= WID_BROD_DEPOT_NW; i++) this->GetWidget(i)->tool_tip = STR_BUILD_DEPOT_TRAM_ORIENTATION_SELECT_TOOLTIP;
- }
-
- this->FinishInitNested(TRANSPORT_ROAD);
- }
-
- virtual void DrawWidget(const Rect &r, int widget) const
- {
- if (!IsInsideMM(widget, WID_BROD_DEPOT_NE, WID_BROD_DEPOT_NW + 1)) return;
-
- DrawRoadDepotSprite(r.left - 1, r.top, (DiagDirection)(widget - WID_BROD_DEPOT_NE + DIAGDIR_NE), _cur_roadtype);
- }
-
- virtual void OnClick(Point pt, int widget, int click_count)
- {
- switch (widget) {
- case WID_BROD_DEPOT_NW:
- case WID_BROD_DEPOT_NE:
- case WID_BROD_DEPOT_SW:
- case WID_BROD_DEPOT_SE:
- this->RaiseWidget(_road_depot_orientation + WID_BROD_DEPOT_NE);
- _road_depot_orientation = (DiagDirection)(widget - WID_BROD_DEPOT_NE);
- this->LowerWidget(_road_depot_orientation + WID_BROD_DEPOT_NE);
- if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
- this->SetDirty();
- break;
-
- default:
- break;
- }
- }
-};
-
-static const NWidgetPart _nested_build_road_depot_widgets[] = {
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
- NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, WID_BROD_CAPTION), SetDataTip(STR_BUILD_DEPOT_ROAD_ORIENTATION_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
- EndContainer(),
- NWidget(WWT_PANEL, COLOUR_DARK_GREEN),
- NWidget(NWID_SPACER), SetMinimalSize(0, 3),
- NWidget(NWID_HORIZONTAL_LTR),
- NWidget(NWID_SPACER), SetMinimalSize(3, 0), SetFill(1, 0),
- NWidget(NWID_VERTICAL),
- NWidget(WWT_PANEL, COLOUR_GREY, WID_BROD_DEPOT_NW), SetSizingType(NWST_BUTTON), SetMinimalSize(66, 50), SetDataTip(0x0, STR_BUILD_DEPOT_ROAD_ORIENTATION_SELECT_TOOLTIP),
- EndContainer(),
- NWidget(NWID_SPACER), SetMinimalSize(0, 2),
- NWidget(WWT_PANEL, COLOUR_GREY, WID_BROD_DEPOT_SW), SetSizingType(NWST_BUTTON), SetMinimalSize(66, 50), SetDataTip(0x0, STR_BUILD_DEPOT_ROAD_ORIENTATION_SELECT_TOOLTIP),
- EndContainer(),
- EndContainer(),
- NWidget(NWID_SPACER), SetMinimalSize(2, 0),
- NWidget(NWID_VERTICAL),
- NWidget(WWT_PANEL, COLOUR_GREY, WID_BROD_DEPOT_NE), SetSizingType(NWST_BUTTON), SetMinimalSize(66, 50), SetDataTip(0x0, STR_BUILD_DEPOT_ROAD_ORIENTATION_SELECT_TOOLTIP),
- EndContainer(),
- NWidget(NWID_SPACER), SetMinimalSize(0, 2),
- NWidget(WWT_PANEL, COLOUR_GREY, WID_BROD_DEPOT_SE), SetSizingType(NWST_BUTTON), SetMinimalSize(66, 50), SetDataTip(0x0, STR_BUILD_DEPOT_ROAD_ORIENTATION_SELECT_TOOLTIP),
- EndContainer(),
- EndContainer(),
- NWidget(NWID_SPACER), SetMinimalSize(3, 0), SetFill(1, 0),
- EndContainer(),
- NWidget(NWID_SPACER), SetMinimalSize(0, 3),
- EndContainer(),
-};
-
-static WindowDesc _build_road_depot_desc(
- WDP_AUTO, NULL, 0, 0,
- WC_BUILD_DEPOT, WC_BUILD_TOOLBAR,
- WDF_CONSTRUCTION,
- _nested_build_road_depot_widgets, lengthof(_nested_build_road_depot_widgets)
-);
-
-static void ShowRoadDepotPicker(Window *parent)
-{
- new BuildRoadDepotWindow(&_build_road_depot_desc, parent);
-}
-
-struct BuildRoadStationWindow : public PickerWindowBase {
- BuildRoadStationWindow(WindowDesc *desc, Window *parent, RoadStopType rs) : PickerWindowBase(desc, parent)
- {
- this->CreateNestedTree();
-
- /* Trams don't have non-drivethrough stations */
- if (_cur_roadtype == ROADTYPE_TRAM && _road_station_picker_orientation < DIAGDIR_END) {
- _road_station_picker_orientation = DIAGDIR_END;
- }
- this->SetWidgetsDisabledState(_cur_roadtype == ROADTYPE_TRAM,
- WID_BROS_STATION_NE,
- WID_BROS_STATION_SE,
- WID_BROS_STATION_SW,
- WID_BROS_STATION_NW,
- WIDGET_LIST_END);
-
- this->GetWidget(WID_BROS_CAPTION)->widget_data = _road_type_infos[_cur_roadtype].picker_title[rs];
- for (uint i = WID_BROS_STATION_NE; i < WID_BROS_LT_OFF; i++) this->GetWidget(i)->tool_tip = _road_type_infos[_cur_roadtype].picker_tooltip[rs];
-
- this->LowerWidget(_road_station_picker_orientation + WID_BROS_STATION_NE);
- this->LowerWidget(_settings_client.gui.station_show_coverage + WID_BROS_LT_OFF);
-
- this->FinishInitNested(TRANSPORT_ROAD);
-
- this->window_class = (rs == ROADSTOP_BUS) ? WC_BUS_STATION : WC_TRUCK_STATION;
- }
-
- virtual ~BuildRoadStationWindow()
- {
- DeleteWindowById(WC_SELECT_STATION, 0);
- }
-
- virtual void OnPaint()
- {
- this->DrawWidgets();
-
- int rad = _settings_game.station.modified_catchment ? ((this->window_class == WC_BUS_STATION) ? CA_BUS : CA_TRUCK) : CA_UNMODIFIED;
- if (_settings_client.gui.station_show_coverage) {
- SetTileSelectBigSize(-rad, -rad, 2 * rad, 2 * rad);
- } else {
- SetTileSelectSize(1, 1);
- }
-
- /* 'Accepts' and 'Supplies' texts. */
- StationCoverageType sct = (this->window_class == WC_BUS_STATION) ? SCT_PASSENGERS_ONLY : SCT_NON_PASSENGERS_ONLY;
- int top = this->GetWidget(WID_BROS_LT_ON)->pos_y + this->GetWidget(WID_BROS_LT_ON)->current_y + WD_PAR_VSEP_NORMAL;
- NWidgetBase *back_nwi = this->GetWidget(WID_BROS_BACKGROUND);
- int right = back_nwi->pos_x + back_nwi->current_x;
- int bottom = back_nwi->pos_y + back_nwi->current_y;
- top = DrawStationCoverageAreaText(back_nwi->pos_x + WD_FRAMERECT_LEFT, right - WD_FRAMERECT_RIGHT, top, sct, rad, false) + WD_PAR_VSEP_NORMAL;
- top = DrawStationCoverageAreaText(back_nwi->pos_x + WD_FRAMERECT_LEFT, right - WD_FRAMERECT_RIGHT, top, sct, rad, true) + WD_PAR_VSEP_NORMAL;
- /* Resize background if the window is too small.
- * Never make the window smaller to avoid oscillating if the size change affects the acceptance.
- * (This is the case, if making the window bigger moves the mouse into the window.) */
- if (top > bottom) {
- ResizeWindow(this, 0, top - bottom);
- }
- }
-
- virtual void DrawWidget(const Rect &r, int widget) const
- {
- if (!IsInsideMM(widget, WID_BROS_STATION_NE, WID_BROS_STATION_Y + 1)) return;
-
- StationType st = (this->window_class == WC_BUS_STATION) ? STATION_BUS : STATION_TRUCK;
- StationPickerDrawSprite(r.left + TILE_PIXELS, r.bottom - TILE_PIXELS, st, INVALID_RAILTYPE, widget < WID_BROS_STATION_X ? ROADTYPE_ROAD : _cur_roadtype, widget - WID_BROS_STATION_NE);
- }
-
- virtual void OnClick(Point pt, int widget, int click_count)
- {
- switch (widget) {
- case WID_BROS_STATION_NE:
- case WID_BROS_STATION_SE:
- case WID_BROS_STATION_SW:
- case WID_BROS_STATION_NW:
- case WID_BROS_STATION_X:
- case WID_BROS_STATION_Y:
- this->RaiseWidget(_road_station_picker_orientation + WID_BROS_STATION_NE);
- _road_station_picker_orientation = (DiagDirection)(widget - WID_BROS_STATION_NE);
- this->LowerWidget(_road_station_picker_orientation + WID_BROS_STATION_NE);
- if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
- this->SetDirty();
- DeleteWindowById(WC_SELECT_STATION, 0);
- break;
-
- case WID_BROS_LT_OFF:
- case WID_BROS_LT_ON:
- this->RaiseWidget(_settings_client.gui.station_show_coverage + WID_BROS_LT_OFF);
- _settings_client.gui.station_show_coverage = (widget != WID_BROS_LT_OFF);
- this->LowerWidget(_settings_client.gui.station_show_coverage + WID_BROS_LT_OFF);
- if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
- this->SetDirty();
- break;
-
- default:
- break;
- }
- }
-
- virtual void OnTick()
- {
- CheckRedrawStationCoverage(this);
- }
-};
-
-/** Widget definition of the build road station window */
-static const NWidgetPart _nested_rv_station_picker_widgets[] = {
- NWidget(NWID_HORIZONTAL),
- NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
- NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, WID_BROS_CAPTION),
- EndContainer(),
- NWidget(WWT_PANEL, COLOUR_DARK_GREEN, WID_BROS_BACKGROUND),
- NWidget(NWID_SPACER), SetMinimalSize(0, 3),
- NWidget(NWID_HORIZONTAL), SetPIP(0, 2, 0),
- NWidget(NWID_SPACER), SetFill(1, 0),
- NWidget(WWT_PANEL, COLOUR_GREY, WID_BROS_STATION_NW), SetSizingType(NWST_BUTTON), SetMinimalSize(66, 50), EndContainer(),
- NWidget(WWT_PANEL, COLOUR_GREY, WID_BROS_STATION_NE), SetSizingType(NWST_BUTTON), SetMinimalSize(66, 50), EndContainer(),
- NWidget(WWT_PANEL, COLOUR_GREY, WID_BROS_STATION_X), SetSizingType(NWST_BUTTON), SetMinimalSize(66, 50), EndContainer(),
- NWidget(NWID_SPACER), SetFill(1, 0),
- EndContainer(),
- NWidget(NWID_SPACER), SetMinimalSize(0, 2),
- NWidget(NWID_HORIZONTAL), SetPIP(0, 2, 0),
- NWidget(NWID_SPACER), SetFill(1, 0),
- NWidget(WWT_PANEL, COLOUR_GREY, WID_BROS_STATION_SW), SetSizingType(NWST_BUTTON), SetMinimalSize(66, 50), EndContainer(),
- NWidget(WWT_PANEL, COLOUR_GREY, WID_BROS_STATION_SE), SetSizingType(NWST_BUTTON), SetMinimalSize(66, 50), EndContainer(),
- NWidget(WWT_PANEL, COLOUR_GREY, WID_BROS_STATION_Y), SetSizingType(NWST_BUTTON), SetMinimalSize(66, 50), EndContainer(),
- NWidget(NWID_SPACER), SetFill(1, 0),
- EndContainer(),
- NWidget(NWID_SPACER), SetMinimalSize(0, 1),
- NWidget(NWID_HORIZONTAL), SetPIP(2, 0, 2),
- NWidget(WWT_LABEL, COLOUR_DARK_GREEN, WID_BROS_INFO), SetMinimalSize(140, 14), SetDataTip(STR_STATION_BUILD_COVERAGE_AREA_TITLE, STR_NULL),
- NWidget(NWID_SPACER), SetFill(1, 0),
- EndContainer(),
- NWidget(NWID_HORIZONTAL), SetPIP(2, 0, 2),
- NWidget(NWID_SPACER), SetFill(1, 0),
- NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_BROS_LT_OFF), SetMinimalSize(60, 12),
- SetDataTip(STR_STATION_BUILD_COVERAGE_OFF, STR_STATION_BUILD_COVERAGE_AREA_OFF_TOOLTIP),
- NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_BROS_LT_ON), SetMinimalSize(60, 12),
- SetDataTip(STR_STATION_BUILD_COVERAGE_ON, STR_STATION_BUILD_COVERAGE_AREA_ON_TOOLTIP),
- NWidget(NWID_SPACER), SetFill(1, 0),
- EndContainer(),
- NWidget(NWID_SPACER), SetMinimalSize(0, 10), SetResize(0, 1),
- EndContainer(),
-};
-
-static WindowDesc _rv_station_picker_desc(
- WDP_AUTO, NULL, 0, 0,
- WC_BUS_STATION, WC_BUILD_TOOLBAR,
- WDF_CONSTRUCTION,
- _nested_rv_station_picker_widgets, lengthof(_nested_rv_station_picker_widgets)
-);
-
-static void ShowRVStationPicker(Window *parent, RoadStopType rs)
-{
- new BuildRoadStationWindow(&_rv_station_picker_desc, parent, rs);
-}
-
-void InitializeRoadGui()
-{
- _road_depot_orientation = DIAGDIR_NW;
- _road_station_picker_orientation = DIAGDIR_NW;
-}
diff --git a/src/script/api/game/game_window.hpp.sq.orig b/src/script/api/game/game_window.hpp.sq.orig
deleted file mode 100644
index 280bf1e532..0000000000
--- a/src/script/api/game/game_window.hpp.sq.orig
+++ /dev/null
@@ -1,1328 +0,0 @@
-/* $Id$ */
-
-/*
- * This file is part of OpenTTD.
- * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
- * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see .
- */
-
-/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
-
-#include "../script_window.hpp"
-#include "../template/template_window.hpp.sq"
-
-
-template <> const char *GetClassName() { return "GSWindow"; }
-
-void SQGSWindow_Register(Squirrel *engine)
-{
- DefSQClass SQGSWindow("GSWindow");
- SQGSWindow.PreRegister(engine);
- SQGSWindow.AddConstructor(engine, "x");
-
- SQGSWindow.DefSQConst(engine, ScriptWindow::WN_GAME_OPTIONS_AI, "WN_GAME_OPTIONS_AI");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WN_GAME_OPTIONS_ABOUT, "WN_GAME_OPTIONS_ABOUT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WN_GAME_OPTIONS_NEWGRF_STATE, "WN_GAME_OPTIONS_NEWGRF_STATE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WN_GAME_OPTIONS_GAME_OPTIONS, "WN_GAME_OPTIONS_GAME_OPTIONS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WN_GAME_OPTIONS_GAME_SETTINGS, "WN_GAME_OPTIONS_GAME_SETTINGS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WN_QUERY_STRING, "WN_QUERY_STRING");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WN_QUERY_STRING_SIGN, "WN_QUERY_STRING_SIGN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WN_CONFIRM_POPUP_QUERY, "WN_CONFIRM_POPUP_QUERY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WN_CONFIRM_POPUP_QUERY_BOOTSTRAP, "WN_CONFIRM_POPUP_QUERY_BOOTSTRAP");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WN_NETWORK_WINDOW_GAME, "WN_NETWORK_WINDOW_GAME");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WN_NETWORK_WINDOW_LOBBY, "WN_NETWORK_WINDOW_LOBBY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WN_NETWORK_WINDOW_CONTENT_LIST, "WN_NETWORK_WINDOW_CONTENT_LIST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WN_NETWORK_WINDOW_START, "WN_NETWORK_WINDOW_START");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WN_NETWORK_STATUS_WINDOW_JOIN, "WN_NETWORK_STATUS_WINDOW_JOIN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WN_NETWORK_STATUS_WINDOW_CONTENT_DOWNLOAD, "WN_NETWORK_STATUS_WINDOW_CONTENT_DOWNLOAD");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_NONE, "WC_NONE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_MAIN_WINDOW, "WC_MAIN_WINDOW");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_MAIN_TOOLBAR, "WC_MAIN_TOOLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_STATUS_BAR, "WC_STATUS_BAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_BUILD_TOOLBAR, "WC_BUILD_TOOLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_SCEN_BUILD_TOOLBAR, "WC_SCEN_BUILD_TOOLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_BUILD_TREES, "WC_BUILD_TREES");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_TRANSPARENCY_TOOLBAR, "WC_TRANSPARENCY_TOOLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_BUILD_SIGNAL, "WC_BUILD_SIGNAL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_SMALLMAP, "WC_SMALLMAP");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_ERRMSG, "WC_ERRMSG");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_TOOLTIPS, "WC_TOOLTIPS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_QUERY_STRING, "WC_QUERY_STRING");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_CONFIRM_POPUP_QUERY, "WC_CONFIRM_POPUP_QUERY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_GOAL_QUESTION, "WC_GOAL_QUESTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_SAVELOAD, "WC_SAVELOAD");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_LAND_INFO, "WC_LAND_INFO");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_DROPDOWN_MENU, "WC_DROPDOWN_MENU");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_OSK, "WC_OSK");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_SET_DATE, "WC_SET_DATE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_AI_SETTINGS, "WC_AI_SETTINGS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_GRF_PARAMETERS, "WC_GRF_PARAMETERS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_TEXTFILE, "WC_TEXTFILE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_TOWN_AUTHORITY, "WC_TOWN_AUTHORITY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_VEHICLE_DETAILS, "WC_VEHICLE_DETAILS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_VEHICLE_REFIT, "WC_VEHICLE_REFIT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_VEHICLE_ORDERS, "WC_VEHICLE_ORDERS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_REPLACE_VEHICLE, "WC_REPLACE_VEHICLE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_VEHICLE_TIMETABLE, "WC_VEHICLE_TIMETABLE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_COMPANY_COLOUR, "WC_COMPANY_COLOUR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_COMPANY_MANAGER_FACE, "WC_COMPANY_MANAGER_FACE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_SELECT_STATION, "WC_SELECT_STATION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_NEWS_WINDOW, "WC_NEWS_WINDOW");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_TOWN_DIRECTORY, "WC_TOWN_DIRECTORY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_SUBSIDIES_LIST, "WC_SUBSIDIES_LIST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_INDUSTRY_DIRECTORY, "WC_INDUSTRY_DIRECTORY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_MESSAGE_HISTORY, "WC_MESSAGE_HISTORY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_SIGN_LIST, "WC_SIGN_LIST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_AI_LIST, "WC_AI_LIST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_GOALS_LIST, "WC_GOALS_LIST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_STORY_BOOK, "WC_STORY_BOOK");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_STATION_LIST, "WC_STATION_LIST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_TRAINS_LIST, "WC_TRAINS_LIST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_ROADVEH_LIST, "WC_ROADVEH_LIST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_SHIPS_LIST, "WC_SHIPS_LIST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_AIRCRAFT_LIST, "WC_AIRCRAFT_LIST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_TOWN_VIEW, "WC_TOWN_VIEW");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_VEHICLE_VIEW, "WC_VEHICLE_VIEW");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_STATION_VIEW, "WC_STATION_VIEW");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_VEHICLE_DEPOT, "WC_VEHICLE_DEPOT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_WAYPOINT_VIEW, "WC_WAYPOINT_VIEW");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_INDUSTRY_VIEW, "WC_INDUSTRY_VIEW");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_COMPANY, "WC_COMPANY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_BUILD_OBJECT, "WC_BUILD_OBJECT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_BUILD_VEHICLE, "WC_BUILD_VEHICLE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_BUILD_BRIDGE, "WC_BUILD_BRIDGE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_BUILD_STATION, "WC_BUILD_STATION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_BUS_STATION, "WC_BUS_STATION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_TRUCK_STATION, "WC_TRUCK_STATION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_BUILD_DEPOT, "WC_BUILD_DEPOT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_BUILD_WAYPOINT, "WC_BUILD_WAYPOINT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_FOUND_TOWN, "WC_FOUND_TOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_BUILD_INDUSTRY, "WC_BUILD_INDUSTRY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_SELECT_GAME, "WC_SELECT_GAME");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_SCEN_LAND_GEN, "WC_SCEN_LAND_GEN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_GENERATE_LANDSCAPE, "WC_GENERATE_LANDSCAPE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_MODAL_PROGRESS, "WC_MODAL_PROGRESS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_NETWORK_WINDOW, "WC_NETWORK_WINDOW");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_CLIENT_LIST, "WC_CLIENT_LIST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_CLIENT_LIST_POPUP, "WC_CLIENT_LIST_POPUP");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_NETWORK_STATUS_WINDOW, "WC_NETWORK_STATUS_WINDOW");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_SEND_NETWORK_MSG, "WC_SEND_NETWORK_MSG");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_COMPANY_PASSWORD_WINDOW, "WC_COMPANY_PASSWORD_WINDOW");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_INDUSTRY_CARGOES, "WC_INDUSTRY_CARGOES");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_GRAPH_LEGEND, "WC_GRAPH_LEGEND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_FINANCES, "WC_FINANCES");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_INCOME_GRAPH, "WC_INCOME_GRAPH");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_OPERATING_PROFIT, "WC_OPERATING_PROFIT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_DELIVERED_CARGO, "WC_DELIVERED_CARGO");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_PERFORMANCE_HISTORY, "WC_PERFORMANCE_HISTORY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_COMPANY_VALUE, "WC_COMPANY_VALUE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_COMPANY_LEAGUE, "WC_COMPANY_LEAGUE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_PAYMENT_RATES, "WC_PAYMENT_RATES");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_PERFORMANCE_DETAIL, "WC_PERFORMANCE_DETAIL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_COMPANY_INFRASTRUCTURE, "WC_COMPANY_INFRASTRUCTURE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_BUY_COMPANY, "WC_BUY_COMPANY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_ENGINE_PREVIEW, "WC_ENGINE_PREVIEW");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_MUSIC_WINDOW, "WC_MUSIC_WINDOW");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_MUSIC_TRACK_SELECTION, "WC_MUSIC_TRACK_SELECTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_GAME_OPTIONS, "WC_GAME_OPTIONS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_CUSTOM_CURRENCY, "WC_CUSTOM_CURRENCY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_CHEATS, "WC_CHEATS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_EXTRA_VIEW_PORT, "WC_EXTRA_VIEW_PORT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_CONSOLE, "WC_CONSOLE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_BOOTSTRAP, "WC_BOOTSTRAP");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_HIGHSCORE, "WC_HIGHSCORE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_ENDSCREEN, "WC_ENDSCREEN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_AI_DEBUG, "WC_AI_DEBUG");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_NEWGRF_INSPECT, "WC_NEWGRF_INSPECT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_SPRITE_ALIGNER, "WC_SPRITE_ALIGNER");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_LINKGRAPH_LEGEND, "WC_LINKGRAPH_LEGEND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WC_INVALID, "WC_INVALID");
- SQGSWindow.DefSQConst(engine, ScriptWindow::TC_BLUE, "TC_BLUE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::TC_SILVER, "TC_SILVER");
- SQGSWindow.DefSQConst(engine, ScriptWindow::TC_GOLD, "TC_GOLD");
- SQGSWindow.DefSQConst(engine, ScriptWindow::TC_RED, "TC_RED");
- SQGSWindow.DefSQConst(engine, ScriptWindow::TC_PURPLE, "TC_PURPLE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::TC_LIGHT_BROWN, "TC_LIGHT_BROWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::TC_ORANGE, "TC_ORANGE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::TC_GREEN, "TC_GREEN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::TC_YELLOW, "TC_YELLOW");
- SQGSWindow.DefSQConst(engine, ScriptWindow::TC_DARK_GREEN, "TC_DARK_GREEN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::TC_CREAM, "TC_CREAM");
- SQGSWindow.DefSQConst(engine, ScriptWindow::TC_BROWN, "TC_BROWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::TC_WHITE, "TC_WHITE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::TC_LIGHT_BLUE, "TC_LIGHT_BLUE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::TC_GREY, "TC_GREY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::TC_DARK_BLUE, "TC_DARK_BLUE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::TC_BLACK, "TC_BLACK");
- SQGSWindow.DefSQConst(engine, ScriptWindow::TC_INVALID, "TC_INVALID");
- SQGSWindow.DefSQConst(engine, ScriptWindow::NUMBER_ALL, "NUMBER_ALL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WIDGET_ALL, "WIDGET_ALL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIL_CAPTION, "WID_AIL_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIL_LIST, "WID_AIL_LIST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIL_SCROLLBAR, "WID_AIL_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIL_INFO_BG, "WID_AIL_INFO_BG");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIL_ACCEPT, "WID_AIL_ACCEPT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIL_CANCEL, "WID_AIL_CANCEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIS_CAPTION, "WID_AIS_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIS_BACKGROUND, "WID_AIS_BACKGROUND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIS_SCROLLBAR, "WID_AIS_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIS_ACCEPT, "WID_AIS_ACCEPT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIS_RESET, "WID_AIS_RESET");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIC_BACKGROUND, "WID_AIC_BACKGROUND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIC_DECREASE, "WID_AIC_DECREASE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIC_INCREASE, "WID_AIC_INCREASE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIC_NUMBER, "WID_AIC_NUMBER");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIC_GAMELIST, "WID_AIC_GAMELIST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIC_LIST, "WID_AIC_LIST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIC_SCROLLBAR, "WID_AIC_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIC_MOVE_UP, "WID_AIC_MOVE_UP");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIC_MOVE_DOWN, "WID_AIC_MOVE_DOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIC_CHANGE, "WID_AIC_CHANGE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIC_CONFIGURE, "WID_AIC_CONFIGURE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIC_CLOSE, "WID_AIC_CLOSE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIC_TEXTFILE, "WID_AIC_TEXTFILE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AIC_CONTENT_DOWNLOAD, "WID_AIC_CONTENT_DOWNLOAD");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AID_VIEW, "WID_AID_VIEW");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AID_NAME_TEXT, "WID_AID_NAME_TEXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AID_SETTINGS, "WID_AID_SETTINGS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AID_SCRIPT_GAME, "WID_AID_SCRIPT_GAME");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AID_RELOAD_TOGGLE, "WID_AID_RELOAD_TOGGLE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AID_LOG_PANEL, "WID_AID_LOG_PANEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AID_SCROLLBAR, "WID_AID_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AID_COMPANY_BUTTON_START, "WID_AID_COMPANY_BUTTON_START");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AID_COMPANY_BUTTON_END, "WID_AID_COMPANY_BUTTON_END");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AID_BREAK_STRING_WIDGETS, "WID_AID_BREAK_STRING_WIDGETS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AID_BREAK_STR_ON_OFF_BTN, "WID_AID_BREAK_STR_ON_OFF_BTN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AID_BREAK_STR_EDIT_BOX, "WID_AID_BREAK_STR_EDIT_BOX");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AID_MATCH_CASE_BTN, "WID_AID_MATCH_CASE_BTN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AID_CONTINUE_BTN, "WID_AID_CONTINUE_BTN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AT_AIRPORT, "WID_AT_AIRPORT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AT_DEMOLISH, "WID_AT_DEMOLISH");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AP_CLASS_DROPDOWN, "WID_AP_CLASS_DROPDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AP_AIRPORT_LIST, "WID_AP_AIRPORT_LIST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AP_SCROLLBAR, "WID_AP_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AP_LAYOUT_NUM, "WID_AP_LAYOUT_NUM");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AP_LAYOUT_DECREASE, "WID_AP_LAYOUT_DECREASE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AP_LAYOUT_INCREASE, "WID_AP_LAYOUT_INCREASE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AP_AIRPORT_SPRITE, "WID_AP_AIRPORT_SPRITE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AP_EXTRA_TEXT, "WID_AP_EXTRA_TEXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AP_BOTTOMPANEL, "WID_AP_BOTTOMPANEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AP_COVERAGE_LABEL, "WID_AP_COVERAGE_LABEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AP_BTN_DONTHILIGHT, "WID_AP_BTN_DONTHILIGHT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_AP_BTN_DOHILIGHT, "WID_AP_BTN_DOHILIGHT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RV_CAPTION, "WID_RV_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RV_LEFT_MATRIX, "WID_RV_LEFT_MATRIX");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RV_LEFT_SCROLLBAR, "WID_RV_LEFT_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RV_RIGHT_MATRIX, "WID_RV_RIGHT_MATRIX");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RV_RIGHT_SCROLLBAR, "WID_RV_RIGHT_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RV_LEFT_DETAILS, "WID_RV_LEFT_DETAILS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RV_RIGHT_DETAILS, "WID_RV_RIGHT_DETAILS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RV_START_REPLACE, "WID_RV_START_REPLACE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RV_INFO_TAB, "WID_RV_INFO_TAB");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RV_STOP_REPLACE, "WID_RV_STOP_REPLACE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RV_TRAIN_ENGINEWAGON_TOGGLE, "WID_RV_TRAIN_ENGINEWAGON_TOGGLE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RV_TRAIN_FLUFF_LEFT, "WID_RV_TRAIN_FLUFF_LEFT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RV_TRAIN_RAILTYPE_DROPDOWN, "WID_RV_TRAIN_RAILTYPE_DROPDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RV_TRAIN_FLUFF_RIGHT, "WID_RV_TRAIN_FLUFF_RIGHT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RV_TRAIN_WAGONREMOVE_TOGGLE, "WID_RV_TRAIN_WAGONREMOVE_TOGGLE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BB_BACKGROUND, "WID_BB_BACKGROUND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BAFD_QUESTION, "WID_BAFD_QUESTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BAFD_YES, "WID_BAFD_YES");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BAFD_NO, "WID_BAFD_NO");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BBS_CAPTION, "WID_BBS_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BBS_DROPDOWN_ORDER, "WID_BBS_DROPDOWN_ORDER");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BBS_DROPDOWN_CRITERIA, "WID_BBS_DROPDOWN_CRITERIA");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BBS_BRIDGE_LIST, "WID_BBS_BRIDGE_LIST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BBS_SCROLLBAR, "WID_BBS_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BV_CAPTION, "WID_BV_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BV_SORT_ASSENDING_DESCENDING, "WID_BV_SORT_ASSENDING_DESCENDING");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BV_SORT_DROPDOWN, "WID_BV_SORT_DROPDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BV_CARGO_FILTER_DROPDOWN, "WID_BV_CARGO_FILTER_DROPDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BV_LIST, "WID_BV_LIST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BV_SCROLLBAR, "WID_BV_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BV_PANEL, "WID_BV_PANEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BV_BUILD, "WID_BV_BUILD");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BV_BUILD_SEL, "WID_BV_BUILD_SEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BV_RENAME, "WID_BV_RENAME");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_PANEL, "WID_C_PANEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_CAPTION, "WID_C_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_FACE, "WID_C_FACE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_FACE_TITLE, "WID_C_FACE_TITLE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_DESC_INAUGURATION, "WID_C_DESC_INAUGURATION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_DESC_COLOUR_SCHEME, "WID_C_DESC_COLOUR_SCHEME");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_DESC_COLOUR_SCHEME_EXAMPLE, "WID_C_DESC_COLOUR_SCHEME_EXAMPLE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_DESC_VEHICLE, "WID_C_DESC_VEHICLE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_DESC_VEHICLE_COUNTS, "WID_C_DESC_VEHICLE_COUNTS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_DESC_COMPANY_VALUE, "WID_C_DESC_COMPANY_VALUE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_DESC_INFRASTRUCTURE, "WID_C_DESC_INFRASTRUCTURE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_DESC_INFRASTRUCTURE_COUNTS, "WID_C_DESC_INFRASTRUCTURE_COUNTS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_SELECT_DESC_OWNERS, "WID_C_SELECT_DESC_OWNERS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_DESC_OWNERS, "WID_C_DESC_OWNERS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_SELECT_BUTTONS, "WID_C_SELECT_BUTTONS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_NEW_FACE, "WID_C_NEW_FACE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_COLOUR_SCHEME, "WID_C_COLOUR_SCHEME");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_PRESIDENT_NAME, "WID_C_PRESIDENT_NAME");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_COMPANY_NAME, "WID_C_COMPANY_NAME");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_BUY_SHARE, "WID_C_BUY_SHARE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_SELL_SHARE, "WID_C_SELL_SHARE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_SELECT_VIEW_BUILD_HQ, "WID_C_SELECT_VIEW_BUILD_HQ");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_VIEW_HQ, "WID_C_VIEW_HQ");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_BUILD_HQ, "WID_C_BUILD_HQ");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_SELECT_RELOCATE, "WID_C_SELECT_RELOCATE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_RELOCATE_HQ, "WID_C_RELOCATE_HQ");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_VIEW_INFRASTRUCTURE, "WID_C_VIEW_INFRASTRUCTURE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_HAS_PASSWORD, "WID_C_HAS_PASSWORD");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_SELECT_MULTIPLAYER, "WID_C_SELECT_MULTIPLAYER");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_COMPANY_PASSWORD, "WID_C_COMPANY_PASSWORD");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_COMPANY_JOIN, "WID_C_COMPANY_JOIN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_CAPTION, "WID_CF_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_TOGGLE_SIZE, "WID_CF_TOGGLE_SIZE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_SEL_PANEL, "WID_CF_SEL_PANEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_EXPS_CATEGORY, "WID_CF_EXPS_CATEGORY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_EXPS_PRICE1, "WID_CF_EXPS_PRICE1");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_EXPS_PRICE2, "WID_CF_EXPS_PRICE2");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_EXPS_PRICE3, "WID_CF_EXPS_PRICE3");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_TOTAL_PANEL, "WID_CF_TOTAL_PANEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_SEL_MAXLOAN, "WID_CF_SEL_MAXLOAN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_BALANCE_VALUE, "WID_CF_BALANCE_VALUE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_LOAN_VALUE, "WID_CF_LOAN_VALUE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_LOAN_LINE, "WID_CF_LOAN_LINE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_TOTAL_VALUE, "WID_CF_TOTAL_VALUE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_MAXLOAN_GAP, "WID_CF_MAXLOAN_GAP");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_MAXLOAN_VALUE, "WID_CF_MAXLOAN_VALUE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_SEL_BUTTONS, "WID_CF_SEL_BUTTONS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_INCREASE_LOAN, "WID_CF_INCREASE_LOAN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_REPAY_LOAN, "WID_CF_REPAY_LOAN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CF_INFRASTRUCTURE, "WID_CF_INFRASTRUCTURE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCL_CAPTION, "WID_SCL_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCL_CLASS_GENERAL, "WID_SCL_CLASS_GENERAL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCL_CLASS_RAIL, "WID_SCL_CLASS_RAIL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCL_CLASS_ROAD, "WID_SCL_CLASS_ROAD");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCL_CLASS_SHIP, "WID_SCL_CLASS_SHIP");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCL_CLASS_AIRCRAFT, "WID_SCL_CLASS_AIRCRAFT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCL_SPACER_DROPDOWN, "WID_SCL_SPACER_DROPDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCL_PRI_COL_DROPDOWN, "WID_SCL_PRI_COL_DROPDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCL_SEC_COL_DROPDOWN, "WID_SCL_SEC_COL_DROPDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCL_MATRIX, "WID_SCL_MATRIX");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_CAPTION, "WID_SCMF_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_TOGGLE_LARGE_SMALL, "WID_SCMF_TOGGLE_LARGE_SMALL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_SELECT_FACE, "WID_SCMF_SELECT_FACE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_CANCEL, "WID_SCMF_CANCEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_ACCEPT, "WID_SCMF_ACCEPT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_MALE, "WID_SCMF_MALE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_FEMALE, "WID_SCMF_FEMALE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_MALE2, "WID_SCMF_MALE2");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_FEMALE2, "WID_SCMF_FEMALE2");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_SEL_LOADSAVE, "WID_SCMF_SEL_LOADSAVE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_SEL_MALEFEMALE, "WID_SCMF_SEL_MALEFEMALE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_SEL_PARTS, "WID_SCMF_SEL_PARTS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_RANDOM_NEW_FACE, "WID_SCMF_RANDOM_NEW_FACE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_TOGGLE_LARGE_SMALL_BUTTON, "WID_SCMF_TOGGLE_LARGE_SMALL_BUTTON");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_FACE, "WID_SCMF_FACE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_LOAD, "WID_SCMF_LOAD");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_FACECODE, "WID_SCMF_FACECODE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_SAVE, "WID_SCMF_SAVE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_HAS_MOUSTACHE_EARRING_TEXT, "WID_SCMF_HAS_MOUSTACHE_EARRING_TEXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_TIE_EARRING_TEXT, "WID_SCMF_TIE_EARRING_TEXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_LIPS_MOUSTACHE_TEXT, "WID_SCMF_LIPS_MOUSTACHE_TEXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_HAS_GLASSES_TEXT, "WID_SCMF_HAS_GLASSES_TEXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_HAIR_TEXT, "WID_SCMF_HAIR_TEXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_EYEBROWS_TEXT, "WID_SCMF_EYEBROWS_TEXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_EYECOLOUR_TEXT, "WID_SCMF_EYECOLOUR_TEXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_GLASSES_TEXT, "WID_SCMF_GLASSES_TEXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_NOSE_TEXT, "WID_SCMF_NOSE_TEXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_CHIN_TEXT, "WID_SCMF_CHIN_TEXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_JACKET_TEXT, "WID_SCMF_JACKET_TEXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_COLLAR_TEXT, "WID_SCMF_COLLAR_TEXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_ETHNICITY_EUR, "WID_SCMF_ETHNICITY_EUR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_ETHNICITY_AFR, "WID_SCMF_ETHNICITY_AFR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_HAS_MOUSTACHE_EARRING, "WID_SCMF_HAS_MOUSTACHE_EARRING");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_HAS_GLASSES, "WID_SCMF_HAS_GLASSES");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_EYECOLOUR_L, "WID_SCMF_EYECOLOUR_L");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_EYECOLOUR, "WID_SCMF_EYECOLOUR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_EYECOLOUR_R, "WID_SCMF_EYECOLOUR_R");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_CHIN_L, "WID_SCMF_CHIN_L");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_CHIN, "WID_SCMF_CHIN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_CHIN_R, "WID_SCMF_CHIN_R");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_EYEBROWS_L, "WID_SCMF_EYEBROWS_L");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_EYEBROWS, "WID_SCMF_EYEBROWS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_EYEBROWS_R, "WID_SCMF_EYEBROWS_R");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_LIPS_MOUSTACHE_L, "WID_SCMF_LIPS_MOUSTACHE_L");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_LIPS_MOUSTACHE, "WID_SCMF_LIPS_MOUSTACHE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_LIPS_MOUSTACHE_R, "WID_SCMF_LIPS_MOUSTACHE_R");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_NOSE_L, "WID_SCMF_NOSE_L");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_NOSE, "WID_SCMF_NOSE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_NOSE_R, "WID_SCMF_NOSE_R");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_HAIR_L, "WID_SCMF_HAIR_L");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_HAIR, "WID_SCMF_HAIR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_HAIR_R, "WID_SCMF_HAIR_R");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_JACKET_L, "WID_SCMF_JACKET_L");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_JACKET, "WID_SCMF_JACKET");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_JACKET_R, "WID_SCMF_JACKET_R");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_COLLAR_L, "WID_SCMF_COLLAR_L");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_COLLAR, "WID_SCMF_COLLAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_COLLAR_R, "WID_SCMF_COLLAR_R");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_TIE_EARRING_L, "WID_SCMF_TIE_EARRING_L");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_TIE_EARRING, "WID_SCMF_TIE_EARRING");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_TIE_EARRING_R, "WID_SCMF_TIE_EARRING_R");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_GLASSES_L, "WID_SCMF_GLASSES_L");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_GLASSES, "WID_SCMF_GLASSES");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SCMF_GLASSES_R, "WID_SCMF_GLASSES_R");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CI_CAPTION, "WID_CI_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CI_RAIL_DESC, "WID_CI_RAIL_DESC");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CI_RAIL_COUNT, "WID_CI_RAIL_COUNT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CI_ROAD_DESC, "WID_CI_ROAD_DESC");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CI_ROAD_COUNT, "WID_CI_ROAD_COUNT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CI_WATER_DESC, "WID_CI_WATER_DESC");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CI_WATER_COUNT, "WID_CI_WATER_COUNT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CI_STATION_DESC, "WID_CI_STATION_DESC");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CI_STATION_COUNT, "WID_CI_STATION_COUNT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CI_TOTAL_DESC, "WID_CI_TOTAL_DESC");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CI_TOTAL, "WID_CI_TOTAL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BC_CAPTION, "WID_BC_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BC_FACE, "WID_BC_FACE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BC_QUESTION, "WID_BC_QUESTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BC_NO, "WID_BC_NO");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BC_YES, "WID_BC_YES");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_C_BACKGROUND, "WID_C_BACKGROUND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SD_DAY, "WID_SD_DAY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SD_MONTH, "WID_SD_MONTH");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SD_YEAR, "WID_SD_YEAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SD_SET_DATE, "WID_SD_SET_DATE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_D_CAPTION, "WID_D_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_D_SELL, "WID_D_SELL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_D_SHOW_SELL_CHAIN, "WID_D_SHOW_SELL_CHAIN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_D_SELL_CHAIN, "WID_D_SELL_CHAIN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_D_SELL_ALL, "WID_D_SELL_ALL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_D_AUTOREPLACE, "WID_D_AUTOREPLACE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_D_MATRIX, "WID_D_MATRIX");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_D_V_SCROLL, "WID_D_V_SCROLL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_D_SHOW_H_SCROLL, "WID_D_SHOW_H_SCROLL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_D_H_SCROLL, "WID_D_H_SCROLL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_D_BUILD, "WID_D_BUILD");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_D_CLONE, "WID_D_CLONE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_D_LOCATION, "WID_D_LOCATION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_D_SHOW_RENAME, "WID_D_SHOW_RENAME");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_D_RENAME, "WID_D_RENAME");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_D_VEHICLE_LIST, "WID_D_VEHICLE_LIST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_D_STOP_ALL, "WID_D_STOP_ALL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_D_START_ALL, "WID_D_START_ALL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BDD_BACKGROUND, "WID_BDD_BACKGROUND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BDD_X, "WID_BDD_X");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BDD_Y, "WID_BDD_Y");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_DT_CANAL, "WID_DT_CANAL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_DT_LOCK, "WID_DT_LOCK");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_DT_DEMOLISH, "WID_DT_DEMOLISH");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_DT_DEPOT, "WID_DT_DEPOT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_DT_STATION, "WID_DT_STATION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_DT_BUOY, "WID_DT_BUOY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_DT_RIVER, "WID_DT_RIVER");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_DT_BUILD_AQUEDUCT, "WID_DT_BUILD_AQUEDUCT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_DT_INVALID, "WID_DT_INVALID");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_DM_ITEMS, "WID_DM_ITEMS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_DM_SHOW_SCROLL, "WID_DM_SHOW_SCROLL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_DM_SCROLL, "WID_DM_SCROLL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_EP_QUESTION, "WID_EP_QUESTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_EP_NO, "WID_EP_NO");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_EP_YES, "WID_EP_YES");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_EM_CAPTION, "WID_EM_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_EM_FACE, "WID_EM_FACE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_EM_MESSAGE, "WID_EM_MESSAGE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_CAPTION, "WID_SL_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_SORT_BYNAME, "WID_SL_SORT_BYNAME");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_SORT_BYDATE, "WID_SL_SORT_BYDATE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_BACKGROUND, "WID_SL_BACKGROUND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_FILE_BACKGROUND, "WID_SL_FILE_BACKGROUND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_HOME_BUTTON, "WID_SL_HOME_BUTTON");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_DRIVES_DIRECTORIES_LIST, "WID_SL_DRIVES_DIRECTORIES_LIST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_SCROLLBAR, "WID_SL_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_CONTENT_DOWNLOAD, "WID_SL_CONTENT_DOWNLOAD");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_SAVE_OSK_TITLE, "WID_SL_SAVE_OSK_TITLE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_DELETE_SELECTION, "WID_SL_DELETE_SELECTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_SAVE_GAME, "WID_SL_SAVE_GAME");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_CONTENT_DOWNLOAD_SEL, "WID_SL_CONTENT_DOWNLOAD_SEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_DETAILS, "WID_SL_DETAILS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_NEWGRF_INFO, "WID_SL_NEWGRF_INFO");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_LOAD_BUTTON, "WID_SL_LOAD_BUTTON");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SL_MISSING_NEWGRFS, "WID_SL_MISSING_NEWGRFS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_TEMPERATE, "WID_GL_TEMPERATE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_ARCTIC, "WID_GL_ARCTIC");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_TROPICAL, "WID_GL_TROPICAL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_TOYLAND, "WID_GL_TOYLAND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_MAPSIZE_X_PULLDOWN, "WID_GL_MAPSIZE_X_PULLDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_MAPSIZE_Y_PULLDOWN, "WID_GL_MAPSIZE_Y_PULLDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_TOWN_PULLDOWN, "WID_GL_TOWN_PULLDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_INDUSTRY_PULLDOWN, "WID_GL_INDUSTRY_PULLDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_RANDOM_EDITBOX, "WID_GL_RANDOM_EDITBOX");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_RANDOM_BUTTON, "WID_GL_RANDOM_BUTTON");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_GENERATE_BUTTON, "WID_GL_GENERATE_BUTTON");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_START_DATE_DOWN, "WID_GL_START_DATE_DOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_START_DATE_TEXT, "WID_GL_START_DATE_TEXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_START_DATE_UP, "WID_GL_START_DATE_UP");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_SNOW_LEVEL_DOWN, "WID_GL_SNOW_LEVEL_DOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_SNOW_LEVEL_TEXT, "WID_GL_SNOW_LEVEL_TEXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_SNOW_LEVEL_UP, "WID_GL_SNOW_LEVEL_UP");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_TREE_PULLDOWN, "WID_GL_TREE_PULLDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_LANDSCAPE_PULLDOWN, "WID_GL_LANDSCAPE_PULLDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_HEIGHTMAP_NAME_TEXT, "WID_GL_HEIGHTMAP_NAME_TEXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_HEIGHTMAP_SIZE_TEXT, "WID_GL_HEIGHTMAP_SIZE_TEXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_HEIGHTMAP_ROTATION_PULLDOWN, "WID_GL_HEIGHTMAP_ROTATION_PULLDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_TERRAIN_PULLDOWN, "WID_GL_TERRAIN_PULLDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_WATER_PULLDOWN, "WID_GL_WATER_PULLDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_RIVER_PULLDOWN, "WID_GL_RIVER_PULLDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_SMOOTHNESS_PULLDOWN, "WID_GL_SMOOTHNESS_PULLDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_VARIETY_PULLDOWN, "WID_GL_VARIETY_PULLDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_BORDERS_RANDOM, "WID_GL_BORDERS_RANDOM");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_WATER_NW, "WID_GL_WATER_NW");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_WATER_NE, "WID_GL_WATER_NE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_WATER_SE, "WID_GL_WATER_SE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_WATER_SW, "WID_GL_WATER_SW");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CS_TEMPERATE, "WID_CS_TEMPERATE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CS_ARCTIC, "WID_CS_ARCTIC");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CS_TROPICAL, "WID_CS_TROPICAL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CS_TOYLAND, "WID_CS_TOYLAND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CS_EMPTY_WORLD, "WID_CS_EMPTY_WORLD");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CS_RANDOM_WORLD, "WID_CS_RANDOM_WORLD");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CS_MAPSIZE_X_PULLDOWN, "WID_CS_MAPSIZE_X_PULLDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CS_MAPSIZE_Y_PULLDOWN, "WID_CS_MAPSIZE_Y_PULLDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CS_START_DATE_DOWN, "WID_CS_START_DATE_DOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CS_START_DATE_TEXT, "WID_CS_START_DATE_TEXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CS_START_DATE_UP, "WID_CS_START_DATE_UP");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CS_FLAT_LAND_HEIGHT_DOWN, "WID_CS_FLAT_LAND_HEIGHT_DOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CS_FLAT_LAND_HEIGHT_TEXT, "WID_CS_FLAT_LAND_HEIGHT_TEXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CS_FLAT_LAND_HEIGHT_UP, "WID_CS_FLAT_LAND_HEIGHT_UP");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GP_PROGRESS_BAR, "WID_GP_PROGRESS_BAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GP_PROGRESS_TEXT, "WID_GP_PROGRESS_TEXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GP_ABORT, "WID_GP_ABORT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GOAL_CAPTION, "WID_GOAL_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GOAL_LIST, "WID_GOAL_LIST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GOAL_SCROLLBAR, "WID_GOAL_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GQ_CAPTION, "WID_GQ_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GQ_QUESTION, "WID_GQ_QUESTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GQ_BUTTONS, "WID_GQ_BUTTONS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GQ_BUTTON_1, "WID_GQ_BUTTON_1");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GQ_BUTTON_2, "WID_GQ_BUTTON_2");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GQ_BUTTON_3, "WID_GQ_BUTTON_3");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_BACKGROUND, "WID_GL_BACKGROUND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_FIRST_COMPANY, "WID_GL_FIRST_COMPANY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_LAST_COMPANY, "WID_GL_LAST_COMPANY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CV_KEY_BUTTON, "WID_CV_KEY_BUTTON");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CV_BACKGROUND, "WID_CV_BACKGROUND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CV_GRAPH, "WID_CV_GRAPH");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CV_RESIZE, "WID_CV_RESIZE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_PHG_KEY, "WID_PHG_KEY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_PHG_DETAILED_PERFORMANCE, "WID_PHG_DETAILED_PERFORMANCE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_PHG_BACKGROUND, "WID_PHG_BACKGROUND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_PHG_GRAPH, "WID_PHG_GRAPH");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_PHG_RESIZE, "WID_PHG_RESIZE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CPR_BACKGROUND, "WID_CPR_BACKGROUND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CPR_HEADER, "WID_CPR_HEADER");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CPR_GRAPH, "WID_CPR_GRAPH");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CPR_RESIZE, "WID_CPR_RESIZE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CPR_FOOTER, "WID_CPR_FOOTER");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CPR_ENABLE_CARGOES, "WID_CPR_ENABLE_CARGOES");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CPR_DISABLE_CARGOES, "WID_CPR_DISABLE_CARGOES");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CPR_CARGO_FIRST, "WID_CPR_CARGO_FIRST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CL_BACKGROUND, "WID_CL_BACKGROUND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_PRD_SCORE_FIRST, "WID_PRD_SCORE_FIRST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_PRD_SCORE_LAST, "WID_PRD_SCORE_LAST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_PRD_COMPANY_FIRST, "WID_PRD_COMPANY_FIRST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_PRD_COMPANY_LAST, "WID_PRD_COMPANY_LAST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_CAPTION, "WID_GL_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_SORT_BY_ORDER, "WID_GL_SORT_BY_ORDER");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_SORT_BY_DROPDOWN, "WID_GL_SORT_BY_DROPDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_LIST_VEHICLE, "WID_GL_LIST_VEHICLE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_LIST_VEHICLE_SCROLLBAR, "WID_GL_LIST_VEHICLE_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_AVAILABLE_VEHICLES, "WID_GL_AVAILABLE_VEHICLES");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_MANAGE_VEHICLES_DROPDOWN, "WID_GL_MANAGE_VEHICLES_DROPDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_STOP_ALL, "WID_GL_STOP_ALL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_START_ALL, "WID_GL_START_ALL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_ALL_VEHICLES, "WID_GL_ALL_VEHICLES");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_DEFAULT_VEHICLES, "WID_GL_DEFAULT_VEHICLES");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_LIST_GROUP, "WID_GL_LIST_GROUP");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_LIST_GROUP_SCROLLBAR, "WID_GL_LIST_GROUP_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_CREATE_GROUP, "WID_GL_CREATE_GROUP");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_DELETE_GROUP, "WID_GL_DELETE_GROUP");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_RENAME_GROUP, "WID_GL_RENAME_GROUP");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GL_REPLACE_PROTECTION, "WID_GL_REPLACE_PROTECTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_H_BACKGROUND, "WID_H_BACKGROUND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_DPI_MATRIX_WIDGET, "WID_DPI_MATRIX_WIDGET");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_DPI_SCROLLBAR, "WID_DPI_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_DPI_INFOPANEL, "WID_DPI_INFOPANEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_DPI_DISPLAY_WIDGET, "WID_DPI_DISPLAY_WIDGET");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_DPI_FUND_WIDGET, "WID_DPI_FUND_WIDGET");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_IV_CAPTION, "WID_IV_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_IV_VIEWPORT, "WID_IV_VIEWPORT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_IV_INFO, "WID_IV_INFO");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_IV_GOTO, "WID_IV_GOTO");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_IV_DISPLAY, "WID_IV_DISPLAY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ID_DROPDOWN_ORDER, "WID_ID_DROPDOWN_ORDER");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ID_DROPDOWN_CRITERIA, "WID_ID_DROPDOWN_CRITERIA");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ID_INDUSTRY_LIST, "WID_ID_INDUSTRY_LIST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ID_SCROLLBAR, "WID_ID_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_IC_CAPTION, "WID_IC_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_IC_NOTIFY, "WID_IC_NOTIFY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_IC_PANEL, "WID_IC_PANEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_IC_SCROLLBAR, "WID_IC_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_IC_CARGO_DROPDOWN, "WID_IC_CARGO_DROPDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_IC_IND_DROPDOWN, "WID_IC_IND_DROPDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_GENERATE_GAME, "WID_SGI_GENERATE_GAME");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_LOAD_GAME, "WID_SGI_LOAD_GAME");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_PLAY_SCENARIO, "WID_SGI_PLAY_SCENARIO");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_PLAY_HEIGHTMAP, "WID_SGI_PLAY_HEIGHTMAP");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_EDIT_SCENARIO, "WID_SGI_EDIT_SCENARIO");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_PLAY_NETWORK, "WID_SGI_PLAY_NETWORK");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_TEMPERATE_LANDSCAPE, "WID_SGI_TEMPERATE_LANDSCAPE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_ARCTIC_LANDSCAPE, "WID_SGI_ARCTIC_LANDSCAPE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_TROPIC_LANDSCAPE, "WID_SGI_TROPIC_LANDSCAPE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_TOYLAND_LANDSCAPE, "WID_SGI_TOYLAND_LANDSCAPE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_TRANSLATION_SELECTION, "WID_SGI_TRANSLATION_SELECTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_TRANSLATION, "WID_SGI_TRANSLATION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_OPTIONS, "WID_SGI_OPTIONS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_HIGHSCORE, "WID_SGI_HIGHSCORE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_SETTINGS_OPTIONS, "WID_SGI_SETTINGS_OPTIONS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_GRF_SETTINGS, "WID_SGI_GRF_SETTINGS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_CONTENT_DOWNLOAD, "WID_SGI_CONTENT_DOWNLOAD");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_AI_SETTINGS, "WID_SGI_AI_SETTINGS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SGI_EXIT, "WID_SGI_EXIT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_LGL_CAPTION, "WID_LGL_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_LGL_SATURATION, "WID_LGL_SATURATION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_LGL_SATURATION_FIRST, "WID_LGL_SATURATION_FIRST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_LGL_SATURATION_LAST, "WID_LGL_SATURATION_LAST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_LGL_COMPANIES, "WID_LGL_COMPANIES");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_LGL_COMPANY_FIRST, "WID_LGL_COMPANY_FIRST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_LGL_COMPANY_LAST, "WID_LGL_COMPANY_LAST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_LGL_COMPANIES_ALL, "WID_LGL_COMPANIES_ALL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_LGL_COMPANIES_NONE, "WID_LGL_COMPANIES_NONE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_LGL_CARGOES, "WID_LGL_CARGOES");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_LGL_CARGO_FIRST, "WID_LGL_CARGO_FIRST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_LGL_CARGO_LAST, "WID_LGL_CARGO_LAST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_LGL_CARGOES_ALL, "WID_LGL_CARGOES_ALL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_LGL_CARGOES_NONE, "WID_LGL_CARGOES_NONE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_VIEWPORT, "WID_M_VIEWPORT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_LI_BACKGROUND, "WID_LI_BACKGROUND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_BACKGROUND, "WID_TT_BACKGROUND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_A_SCROLLING_TEXT, "WID_A_SCROLLING_TEXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_A_WEBSITE, "WID_A_WEBSITE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_QS_CAPTION, "WID_QS_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_QS_TEXT, "WID_QS_TEXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_QS_DEFAULT, "WID_QS_DEFAULT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_QS_CANCEL, "WID_QS_CANCEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_QS_OK, "WID_QS_OK");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_Q_CAPTION, "WID_Q_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_Q_TEXT, "WID_Q_TEXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_Q_NO, "WID_Q_NO");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_Q_YES, "WID_Q_YES");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_CAPTION, "WID_TF_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_WRAPTEXT, "WID_TF_WRAPTEXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_BACKGROUND, "WID_TF_BACKGROUND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_VSCROLLBAR, "WID_TF_VSCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_HSCROLLBAR, "WID_TF_HSCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MTS_LIST_LEFT, "WID_MTS_LIST_LEFT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MTS_LEFT_SCROLLBAR, "WID_MTS_LEFT_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MTS_PLAYLIST, "WID_MTS_PLAYLIST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MTS_LIST_RIGHT, "WID_MTS_LIST_RIGHT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MTS_RIGHT_SCROLLBAR, "WID_MTS_RIGHT_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MTS_ALL, "WID_MTS_ALL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MTS_OLD, "WID_MTS_OLD");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MTS_NEW, "WID_MTS_NEW");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MTS_EZY, "WID_MTS_EZY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MTS_CUSTOM1, "WID_MTS_CUSTOM1");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MTS_CUSTOM2, "WID_MTS_CUSTOM2");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MTS_CLEAR, "WID_MTS_CLEAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_PREV, "WID_M_PREV");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_NEXT, "WID_M_NEXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_STOP, "WID_M_STOP");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_PLAY, "WID_M_PLAY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_SLIDERS, "WID_M_SLIDERS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_MUSIC_VOL, "WID_M_MUSIC_VOL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_EFFECT_VOL, "WID_M_EFFECT_VOL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_BACKGROUND, "WID_M_BACKGROUND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_TRACK, "WID_M_TRACK");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_TRACK_NR, "WID_M_TRACK_NR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_TRACK_TITLE, "WID_M_TRACK_TITLE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_TRACK_NAME, "WID_M_TRACK_NAME");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_SHUFFLE, "WID_M_SHUFFLE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_PROGRAMME, "WID_M_PROGRAMME");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_ALL, "WID_M_ALL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_OLD, "WID_M_OLD");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_NEW, "WID_M_NEW");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_EZY, "WID_M_EZY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_CUSTOM1, "WID_M_CUSTOM1");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_M_CUSTOM2, "WID_M_CUSTOM2");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NC_CLOSE, "WID_NC_CLOSE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NC_BACKGROUND, "WID_NC_BACKGROUND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NC_DESTINATION, "WID_NC_DESTINATION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NC_TEXTBOX, "WID_NC_TEXTBOX");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NC_SENDBUTTON, "WID_NC_SENDBUTTON");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCDS_BACKGROUND, "WID_NCDS_BACKGROUND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCDS_CANCELOK, "WID_NCDS_CANCELOK");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCL_BACKGROUND, "WID_NCL_BACKGROUND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCL_FILTER_CAPT, "WID_NCL_FILTER_CAPT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCL_FILTER, "WID_NCL_FILTER");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCL_CHECKBOX, "WID_NCL_CHECKBOX");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCL_TYPE, "WID_NCL_TYPE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCL_NAME, "WID_NCL_NAME");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCL_MATRIX, "WID_NCL_MATRIX");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCL_SCROLLBAR, "WID_NCL_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCL_DETAILS, "WID_NCL_DETAILS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCL_TEXTFILE, "WID_NCL_TEXTFILE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCL_SELECT_ALL, "WID_NCL_SELECT_ALL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCL_SELECT_UPDATE, "WID_NCL_SELECT_UPDATE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCL_UNSELECT, "WID_NCL_UNSELECT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCL_OPEN_URL, "WID_NCL_OPEN_URL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCL_CANCEL, "WID_NCL_CANCEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCL_DOWNLOAD, "WID_NCL_DOWNLOAD");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCL_SEL_ALL_UPDATE, "WID_NCL_SEL_ALL_UPDATE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCL_SEARCH_EXTERNAL, "WID_NCL_SEARCH_EXTERNAL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_MAIN, "WID_NG_MAIN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_CONNECTION, "WID_NG_CONNECTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_CONN_BTN, "WID_NG_CONN_BTN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_CLIENT_LABEL, "WID_NG_CLIENT_LABEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_CLIENT, "WID_NG_CLIENT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_FILTER_LABEL, "WID_NG_FILTER_LABEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_FILTER, "WID_NG_FILTER");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_HEADER, "WID_NG_HEADER");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_NAME, "WID_NG_NAME");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_CLIENTS, "WID_NG_CLIENTS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_MAPSIZE, "WID_NG_MAPSIZE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_DATE, "WID_NG_DATE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_YEARS, "WID_NG_YEARS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_INFO, "WID_NG_INFO");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_MATRIX, "WID_NG_MATRIX");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_SCROLLBAR, "WID_NG_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_LASTJOINED_LABEL, "WID_NG_LASTJOINED_LABEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_LASTJOINED, "WID_NG_LASTJOINED");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_LASTJOINED_SPACER, "WID_NG_LASTJOINED_SPACER");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_DETAILS, "WID_NG_DETAILS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_DETAILS_SPACER, "WID_NG_DETAILS_SPACER");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_JOIN, "WID_NG_JOIN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_REFRESH, "WID_NG_REFRESH");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_NEWGRF, "WID_NG_NEWGRF");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_NEWGRF_SEL, "WID_NG_NEWGRF_SEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_NEWGRF_MISSING, "WID_NG_NEWGRF_MISSING");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_NEWGRF_MISSING_SEL, "WID_NG_NEWGRF_MISSING_SEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_FIND, "WID_NG_FIND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_ADD, "WID_NG_ADD");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_START, "WID_NG_START");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NG_CANCEL, "WID_NG_CANCEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_BACKGROUND, "WID_NSS_BACKGROUND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_GAMENAME_LABEL, "WID_NSS_GAMENAME_LABEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_GAMENAME, "WID_NSS_GAMENAME");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_SETPWD, "WID_NSS_SETPWD");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_CONNTYPE_LABEL, "WID_NSS_CONNTYPE_LABEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_CONNTYPE_BTN, "WID_NSS_CONNTYPE_BTN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_CLIENTS_LABEL, "WID_NSS_CLIENTS_LABEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_CLIENTS_BTND, "WID_NSS_CLIENTS_BTND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_CLIENTS_TXT, "WID_NSS_CLIENTS_TXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_CLIENTS_BTNU, "WID_NSS_CLIENTS_BTNU");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_COMPANIES_LABEL, "WID_NSS_COMPANIES_LABEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_COMPANIES_BTND, "WID_NSS_COMPANIES_BTND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_COMPANIES_TXT, "WID_NSS_COMPANIES_TXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_COMPANIES_BTNU, "WID_NSS_COMPANIES_BTNU");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_SPECTATORS_LABEL, "WID_NSS_SPECTATORS_LABEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_SPECTATORS_BTND, "WID_NSS_SPECTATORS_BTND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_SPECTATORS_TXT, "WID_NSS_SPECTATORS_TXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_SPECTATORS_BTNU, "WID_NSS_SPECTATORS_BTNU");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_LANGUAGE_LABEL, "WID_NSS_LANGUAGE_LABEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_LANGUAGE_BTN, "WID_NSS_LANGUAGE_BTN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_GENERATE_GAME, "WID_NSS_GENERATE_GAME");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_LOAD_GAME, "WID_NSS_LOAD_GAME");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_PLAY_SCENARIO, "WID_NSS_PLAY_SCENARIO");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_PLAY_HEIGHTMAP, "WID_NSS_PLAY_HEIGHTMAP");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NSS_CANCEL, "WID_NSS_CANCEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NL_BACKGROUND, "WID_NL_BACKGROUND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NL_TEXT, "WID_NL_TEXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NL_HEADER, "WID_NL_HEADER");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NL_MATRIX, "WID_NL_MATRIX");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NL_SCROLLBAR, "WID_NL_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NL_DETAILS, "WID_NL_DETAILS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NL_JOIN, "WID_NL_JOIN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NL_NEW, "WID_NL_NEW");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NL_SPECTATE, "WID_NL_SPECTATE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NL_REFRESH, "WID_NL_REFRESH");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NL_CANCEL, "WID_NL_CANCEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CL_PANEL, "WID_CL_PANEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CLP_PANEL, "WID_CLP_PANEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NJS_BACKGROUND, "WID_NJS_BACKGROUND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NJS_CANCELOK, "WID_NJS_CANCELOK");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCP_BACKGROUND, "WID_NCP_BACKGROUND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCP_LABEL, "WID_NCP_LABEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCP_PASSWORD, "WID_NCP_PASSWORD");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCP_SAVE_AS_DEFAULT_PASSWORD, "WID_NCP_SAVE_AS_DEFAULT_PASSWORD");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCP_CANCEL, "WID_NCP_CANCEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NCP_OK, "WID_NCP_OK");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NGRFI_CAPTION, "WID_NGRFI_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NGRFI_PARENT, "WID_NGRFI_PARENT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NGRFI_VEH_PREV, "WID_NGRFI_VEH_PREV");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NGRFI_VEH_NEXT, "WID_NGRFI_VEH_NEXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NGRFI_VEH_CHAIN, "WID_NGRFI_VEH_CHAIN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NGRFI_MAINPANEL, "WID_NGRFI_MAINPANEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NGRFI_SCROLLBAR, "WID_NGRFI_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SA_CAPTION, "WID_SA_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SA_PREVIOUS, "WID_SA_PREVIOUS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SA_GOTO, "WID_SA_GOTO");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SA_NEXT, "WID_SA_NEXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SA_UP, "WID_SA_UP");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SA_LEFT, "WID_SA_LEFT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SA_RIGHT, "WID_SA_RIGHT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SA_DOWN, "WID_SA_DOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SA_SPRITE, "WID_SA_SPRITE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SA_OFFSETS, "WID_SA_OFFSETS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SA_PICKER, "WID_SA_PICKER");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SA_LIST, "WID_SA_LIST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SA_SCROLLBAR, "WID_SA_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NP_SHOW_NUMPAR, "WID_NP_SHOW_NUMPAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NP_NUMPAR_DEC, "WID_NP_NUMPAR_DEC");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NP_NUMPAR_INC, "WID_NP_NUMPAR_INC");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NP_NUMPAR, "WID_NP_NUMPAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NP_NUMPAR_TEXT, "WID_NP_NUMPAR_TEXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NP_BACKGROUND, "WID_NP_BACKGROUND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NP_SCROLLBAR, "WID_NP_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NP_ACCEPT, "WID_NP_ACCEPT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NP_RESET, "WID_NP_RESET");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NP_SHOW_DESCRIPTION, "WID_NP_SHOW_DESCRIPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NP_DESCRIPTION, "WID_NP_DESCRIPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_PRESET_LIST, "WID_NS_PRESET_LIST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_PRESET_SAVE, "WID_NS_PRESET_SAVE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_PRESET_DELETE, "WID_NS_PRESET_DELETE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_ADD, "WID_NS_ADD");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_REMOVE, "WID_NS_REMOVE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_MOVE_UP, "WID_NS_MOVE_UP");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_MOVE_DOWN, "WID_NS_MOVE_DOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_FILTER, "WID_NS_FILTER");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_FILE_LIST, "WID_NS_FILE_LIST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_SCROLLBAR, "WID_NS_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_AVAIL_LIST, "WID_NS_AVAIL_LIST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_SCROLL2BAR, "WID_NS_SCROLL2BAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_NEWGRF_INFO_TITLE, "WID_NS_NEWGRF_INFO_TITLE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_NEWGRF_INFO, "WID_NS_NEWGRF_INFO");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_OPEN_URL, "WID_NS_OPEN_URL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_NEWGRF_TEXTFILE, "WID_NS_NEWGRF_TEXTFILE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_SET_PARAMETERS, "WID_NS_SET_PARAMETERS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_VIEW_PARAMETERS, "WID_NS_VIEW_PARAMETERS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_TOGGLE_PALETTE, "WID_NS_TOGGLE_PALETTE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_APPLY_CHANGES, "WID_NS_APPLY_CHANGES");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_RESCAN_FILES, "WID_NS_RESCAN_FILES");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_RESCAN_FILES2, "WID_NS_RESCAN_FILES2");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_CONTENT_DOWNLOAD, "WID_NS_CONTENT_DOWNLOAD");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_CONTENT_DOWNLOAD2, "WID_NS_CONTENT_DOWNLOAD2");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_SHOW_REMOVE, "WID_NS_SHOW_REMOVE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_NS_SHOW_APPLY, "WID_NS_SHOW_APPLY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SP_PROGRESS_BAR, "WID_SP_PROGRESS_BAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SP_PROGRESS_TEXT, "WID_SP_PROGRESS_TEXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_PANEL, "WID_N_PANEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_TITLE, "WID_N_TITLE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_HEADLINE, "WID_N_HEADLINE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_CLOSEBOX, "WID_N_CLOSEBOX");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_DATE, "WID_N_DATE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_CAPTION, "WID_N_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_INSET, "WID_N_INSET");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_VIEWPORT, "WID_N_VIEWPORT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_COMPANY_MSG, "WID_N_COMPANY_MSG");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_MESSAGE, "WID_N_MESSAGE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_MGR_FACE, "WID_N_MGR_FACE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_MGR_NAME, "WID_N_MGR_NAME");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_VEH_TITLE, "WID_N_VEH_TITLE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_VEH_BKGND, "WID_N_VEH_BKGND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_VEH_NAME, "WID_N_VEH_NAME");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_VEH_SPR, "WID_N_VEH_SPR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_N_VEH_INFO, "WID_N_VEH_INFO");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MH_STICKYBOX, "WID_MH_STICKYBOX");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MH_BACKGROUND, "WID_MH_BACKGROUND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_MH_SCROLLBAR, "WID_MH_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BO_CLASS_LIST, "WID_BO_CLASS_LIST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BO_SCROLLBAR, "WID_BO_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BO_OBJECT_MATRIX, "WID_BO_OBJECT_MATRIX");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BO_OBJECT_SPRITE, "WID_BO_OBJECT_SPRITE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BO_OBJECT_NAME, "WID_BO_OBJECT_NAME");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BO_OBJECT_SIZE, "WID_BO_OBJECT_SIZE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BO_INFO, "WID_BO_INFO");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BO_SELECT_MATRIX, "WID_BO_SELECT_MATRIX");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BO_SELECT_IMAGE, "WID_BO_SELECT_IMAGE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BO_SELECT_SCROLL, "WID_BO_SELECT_SCROLL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_CAPTION, "WID_O_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_TIMETABLE_VIEW, "WID_O_TIMETABLE_VIEW");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_ORDER_LIST, "WID_O_ORDER_LIST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_SCROLLBAR, "WID_O_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_SKIP, "WID_O_SKIP");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_DELETE, "WID_O_DELETE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_STOP_SHARING, "WID_O_STOP_SHARING");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_NON_STOP, "WID_O_NON_STOP");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_GOTO, "WID_O_GOTO");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_FULL_LOAD, "WID_O_FULL_LOAD");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_UNLOAD, "WID_O_UNLOAD");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_REFIT, "WID_O_REFIT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_SERVICE, "WID_O_SERVICE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_EMPTY, "WID_O_EMPTY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_REFIT_DROPDOWN, "WID_O_REFIT_DROPDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_COND_VARIABLE, "WID_O_COND_VARIABLE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_COND_COMPARATOR, "WID_O_COND_COMPARATOR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_COND_VALUE, "WID_O_COND_VALUE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_SEL_TOP_LEFT, "WID_O_SEL_TOP_LEFT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_SEL_TOP_MIDDLE, "WID_O_SEL_TOP_MIDDLE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_SEL_TOP_RIGHT, "WID_O_SEL_TOP_RIGHT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_SEL_TOP_ROW_GROUNDVEHICLE, "WID_O_SEL_TOP_ROW_GROUNDVEHICLE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_SEL_TOP_ROW, "WID_O_SEL_TOP_ROW");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_SEL_BOTTOM_MIDDLE, "WID_O_SEL_BOTTOM_MIDDLE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_O_SHARED_ORDER_LIST, "WID_O_SHARED_ORDER_LIST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_CAPTION, "WID_OSK_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_TEXT, "WID_OSK_TEXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_CANCEL, "WID_OSK_CANCEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_OK, "WID_OSK_OK");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_BACKSPACE, "WID_OSK_BACKSPACE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_SPECIAL, "WID_OSK_SPECIAL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_CAPS, "WID_OSK_CAPS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_SHIFT, "WID_OSK_SHIFT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_SPACE, "WID_OSK_SPACE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_LEFT, "WID_OSK_LEFT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_RIGHT, "WID_OSK_RIGHT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_LETTERS, "WID_OSK_LETTERS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_NUMBERS_FIRST, "WID_OSK_NUMBERS_FIRST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_NUMBERS_LAST, "WID_OSK_NUMBERS_LAST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_QWERTY_FIRST, "WID_OSK_QWERTY_FIRST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_QWERTY_LAST, "WID_OSK_QWERTY_LAST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_ASDFG_FIRST, "WID_OSK_ASDFG_FIRST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_ASDFG_LAST, "WID_OSK_ASDFG_LAST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_ZXCVB_FIRST, "WID_OSK_ZXCVB_FIRST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_OSK_ZXCVB_LAST, "WID_OSK_ZXCVB_LAST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RAT_CAPTION, "WID_RAT_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RAT_BUILD_NS, "WID_RAT_BUILD_NS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RAT_BUILD_X, "WID_RAT_BUILD_X");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RAT_BUILD_EW, "WID_RAT_BUILD_EW");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RAT_BUILD_Y, "WID_RAT_BUILD_Y");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RAT_AUTORAIL, "WID_RAT_AUTORAIL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RAT_DEMOLISH, "WID_RAT_DEMOLISH");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RAT_BUILD_DEPOT, "WID_RAT_BUILD_DEPOT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RAT_BUILD_WAYPOINT, "WID_RAT_BUILD_WAYPOINT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RAT_BUILD_STATION, "WID_RAT_BUILD_STATION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RAT_BUILD_SIGNALS, "WID_RAT_BUILD_SIGNALS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RAT_BUILD_BRIDGE, "WID_RAT_BUILD_BRIDGE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RAT_BUILD_TUNNEL, "WID_RAT_BUILD_TUNNEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RAT_REMOVE, "WID_RAT_REMOVE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_RAT_CONVERT_RAIL, "WID_RAT_CONVERT_RAIL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_DIR_X, "WID_BRAS_PLATFORM_DIR_X");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_DIR_Y, "WID_BRAS_PLATFORM_DIR_Y");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_NUM_1, "WID_BRAS_PLATFORM_NUM_1");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_NUM_2, "WID_BRAS_PLATFORM_NUM_2");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_NUM_3, "WID_BRAS_PLATFORM_NUM_3");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_NUM_4, "WID_BRAS_PLATFORM_NUM_4");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_NUM_5, "WID_BRAS_PLATFORM_NUM_5");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_NUM_6, "WID_BRAS_PLATFORM_NUM_6");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_NUM_7, "WID_BRAS_PLATFORM_NUM_7");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_LEN_1, "WID_BRAS_PLATFORM_LEN_1");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_LEN_2, "WID_BRAS_PLATFORM_LEN_2");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_LEN_3, "WID_BRAS_PLATFORM_LEN_3");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_LEN_4, "WID_BRAS_PLATFORM_LEN_4");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_LEN_5, "WID_BRAS_PLATFORM_LEN_5");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_LEN_6, "WID_BRAS_PLATFORM_LEN_6");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_LEN_7, "WID_BRAS_PLATFORM_LEN_7");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_DRAG_N_DROP, "WID_BRAS_PLATFORM_DRAG_N_DROP");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_HIGHLIGHT_OFF, "WID_BRAS_HIGHLIGHT_OFF");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_HIGHLIGHT_ON, "WID_BRAS_HIGHLIGHT_ON");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_COVERAGE_TEXTS, "WID_BRAS_COVERAGE_TEXTS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_MATRIX, "WID_BRAS_MATRIX");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_IMAGE, "WID_BRAS_IMAGE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_MATRIX_SCROLL, "WID_BRAS_MATRIX_SCROLL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_SHOW_NEWST_DEFSIZE, "WID_BRAS_SHOW_NEWST_DEFSIZE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_SHOW_NEWST_ADDITIONS, "WID_BRAS_SHOW_NEWST_ADDITIONS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_SHOW_NEWST_MATRIX, "WID_BRAS_SHOW_NEWST_MATRIX");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_SHOW_NEWST_RESIZE, "WID_BRAS_SHOW_NEWST_RESIZE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_SHOW_NEWST_TYPE, "WID_BRAS_SHOW_NEWST_TYPE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_NEWST_LIST, "WID_BRAS_NEWST_LIST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_NEWST_SCROLL, "WID_BRAS_NEWST_SCROLL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_NUM_BEGIN, "WID_BRAS_PLATFORM_NUM_BEGIN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAS_PLATFORM_LEN_BEGIN, "WID_BRAS_PLATFORM_LEN_BEGIN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BS_SEMAPHORE_NORM, "WID_BS_SEMAPHORE_NORM");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BS_SEMAPHORE_ENTRY, "WID_BS_SEMAPHORE_ENTRY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BS_SEMAPHORE_EXIT, "WID_BS_SEMAPHORE_EXIT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BS_SEMAPHORE_COMBO, "WID_BS_SEMAPHORE_COMBO");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BS_SEMAPHORE_PBS, "WID_BS_SEMAPHORE_PBS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BS_SEMAPHORE_PBS_OWAY, "WID_BS_SEMAPHORE_PBS_OWAY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BS_ELECTRIC_NORM, "WID_BS_ELECTRIC_NORM");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BS_ELECTRIC_ENTRY, "WID_BS_ELECTRIC_ENTRY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BS_ELECTRIC_EXIT, "WID_BS_ELECTRIC_EXIT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BS_ELECTRIC_COMBO, "WID_BS_ELECTRIC_COMBO");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BS_ELECTRIC_PBS, "WID_BS_ELECTRIC_PBS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BS_ELECTRIC_PBS_OWAY, "WID_BS_ELECTRIC_PBS_OWAY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BS_CONVERT, "WID_BS_CONVERT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BS_DRAG_SIGNALS_DENSITY_LABEL, "WID_BS_DRAG_SIGNALS_DENSITY_LABEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BS_DRAG_SIGNALS_DENSITY_DECREASE, "WID_BS_DRAG_SIGNALS_DENSITY_DECREASE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BS_DRAG_SIGNALS_DENSITY_INCREASE, "WID_BS_DRAG_SIGNALS_DENSITY_INCREASE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAD_DEPOT_NE, "WID_BRAD_DEPOT_NE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAD_DEPOT_SE, "WID_BRAD_DEPOT_SE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAD_DEPOT_SW, "WID_BRAD_DEPOT_SW");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRAD_DEPOT_NW, "WID_BRAD_DEPOT_NW");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRW_WAYPOINT_MATRIX, "WID_BRW_WAYPOINT_MATRIX");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRW_WAYPOINT, "WID_BRW_WAYPOINT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BRW_SCROLL, "WID_BRW_SCROLL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ROT_ROAD_X, "WID_ROT_ROAD_X");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ROT_ROAD_Y, "WID_ROT_ROAD_Y");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ROT_AUTOROAD, "WID_ROT_AUTOROAD");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ROT_DEMOLISH, "WID_ROT_DEMOLISH");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ROT_DEPOT, "WID_ROT_DEPOT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ROT_BUS_STATION, "WID_ROT_BUS_STATION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ROT_TRUCK_STATION, "WID_ROT_TRUCK_STATION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ROT_ONE_WAY, "WID_ROT_ONE_WAY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ROT_BUILD_BRIDGE, "WID_ROT_BUILD_BRIDGE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ROT_BUILD_TUNNEL, "WID_ROT_BUILD_TUNNEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ROT_REMOVE, "WID_ROT_REMOVE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROD_CAPTION, "WID_BROD_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROD_DEPOT_NE, "WID_BROD_DEPOT_NE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROD_DEPOT_SE, "WID_BROD_DEPOT_SE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROD_DEPOT_SW, "WID_BROD_DEPOT_SW");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROD_DEPOT_NW, "WID_BROD_DEPOT_NW");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROS_CAPTION, "WID_BROS_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROS_BACKGROUND, "WID_BROS_BACKGROUND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROS_STATION_NE, "WID_BROS_STATION_NE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROS_STATION_SE, "WID_BROS_STATION_SE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROS_STATION_SW, "WID_BROS_STATION_SW");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROS_STATION_NW, "WID_BROS_STATION_NW");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROS_STATION_X, "WID_BROS_STATION_X");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROS_STATION_Y, "WID_BROS_STATION_Y");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROS_LT_OFF, "WID_BROS_LT_OFF");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROS_LT_ON, "WID_BROS_LT_ON");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BROS_INFO, "WID_BROS_INFO");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_BACKGROUND, "WID_GO_BACKGROUND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_CURRENCY_DROPDOWN, "WID_GO_CURRENCY_DROPDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_DISTANCE_DROPDOWN, "WID_GO_DISTANCE_DROPDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_ROADSIDE_DROPDOWN, "WID_GO_ROADSIDE_DROPDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_TOWNNAME_DROPDOWN, "WID_GO_TOWNNAME_DROPDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_AUTOSAVE_DROPDOWN, "WID_GO_AUTOSAVE_DROPDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_LANG_DROPDOWN, "WID_GO_LANG_DROPDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_RESOLUTION_DROPDOWN, "WID_GO_RESOLUTION_DROPDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_FULLSCREEN_BUTTON, "WID_GO_FULLSCREEN_BUTTON");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_SCREENSHOT_DROPDOWN, "WID_GO_SCREENSHOT_DROPDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_BASE_GRF_DROPDOWN, "WID_GO_BASE_GRF_DROPDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_BASE_GRF_STATUS, "WID_GO_BASE_GRF_STATUS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_BASE_GRF_TEXTFILE, "WID_GO_BASE_GRF_TEXTFILE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_BASE_GRF_DESCRIPTION, "WID_GO_BASE_GRF_DESCRIPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_BASE_SFX_DROPDOWN, "WID_GO_BASE_SFX_DROPDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_BASE_SFX_TEXTFILE, "WID_GO_BASE_SFX_TEXTFILE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_BASE_SFX_DESCRIPTION, "WID_GO_BASE_SFX_DESCRIPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_BASE_MUSIC_DROPDOWN, "WID_GO_BASE_MUSIC_DROPDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_BASE_MUSIC_STATUS, "WID_GO_BASE_MUSIC_STATUS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_BASE_MUSIC_TEXTFILE, "WID_GO_BASE_MUSIC_TEXTFILE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GO_BASE_MUSIC_DESCRIPTION, "WID_GO_BASE_MUSIC_DESCRIPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GS_FILTER, "WID_GS_FILTER");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GS_OPTIONSPANEL, "WID_GS_OPTIONSPANEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GS_SCROLLBAR, "WID_GS_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GS_HELP_TEXT, "WID_GS_HELP_TEXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GS_EXPAND_ALL, "WID_GS_EXPAND_ALL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GS_COLLAPSE_ALL, "WID_GS_COLLAPSE_ALL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GS_RESTRICT_CATEGORY, "WID_GS_RESTRICT_CATEGORY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GS_RESTRICT_TYPE, "WID_GS_RESTRICT_TYPE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GS_RESTRICT_DROPDOWN, "WID_GS_RESTRICT_DROPDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_GS_TYPE_DROPDOWN, "WID_GS_TYPE_DROPDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CC_RATE_DOWN, "WID_CC_RATE_DOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CC_RATE_UP, "WID_CC_RATE_UP");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CC_RATE, "WID_CC_RATE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CC_SEPARATOR_EDIT, "WID_CC_SEPARATOR_EDIT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CC_SEPARATOR, "WID_CC_SEPARATOR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CC_PREFIX_EDIT, "WID_CC_PREFIX_EDIT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CC_PREFIX, "WID_CC_PREFIX");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CC_SUFFIX_EDIT, "WID_CC_SUFFIX_EDIT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CC_SUFFIX, "WID_CC_SUFFIX");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CC_YEAR_DOWN, "WID_CC_YEAR_DOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CC_YEAR_UP, "WID_CC_YEAR_UP");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CC_YEAR, "WID_CC_YEAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_CC_PREVIEW, "WID_CC_PREVIEW");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SIL_CAPTION, "WID_SIL_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SIL_LIST, "WID_SIL_LIST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SIL_SCROLLBAR, "WID_SIL_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SIL_FILTER_TEXT, "WID_SIL_FILTER_TEXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SIL_FILTER_MATCH_CASE_BTN, "WID_SIL_FILTER_MATCH_CASE_BTN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SIL_FILTER_ENTER_BTN, "WID_SIL_FILTER_ENTER_BTN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_QES_CAPTION, "WID_QES_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_QES_TEXT, "WID_QES_TEXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_QES_OK, "WID_QES_OK");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_QES_CANCEL, "WID_QES_CANCEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_QES_DELETE, "WID_QES_DELETE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_QES_PREVIOUS, "WID_QES_PREVIOUS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_QES_NEXT, "WID_QES_NEXT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_CAPTION, "WID_SM_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_MAP_BORDER, "WID_SM_MAP_BORDER");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_MAP, "WID_SM_MAP");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_LEGEND, "WID_SM_LEGEND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_BLANK, "WID_SM_BLANK");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_ZOOM_IN, "WID_SM_ZOOM_IN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_ZOOM_OUT, "WID_SM_ZOOM_OUT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_CONTOUR, "WID_SM_CONTOUR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_VEHICLES, "WID_SM_VEHICLES");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_INDUSTRIES, "WID_SM_INDUSTRIES");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_LINKSTATS, "WID_SM_LINKSTATS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_ROUTES, "WID_SM_ROUTES");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_VEGETATION, "WID_SM_VEGETATION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_OWNERS, "WID_SM_OWNERS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_CENTERMAP, "WID_SM_CENTERMAP");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_TOGGLETOWNNAME, "WID_SM_TOGGLETOWNNAME");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_SELECT_BUTTONS, "WID_SM_SELECT_BUTTONS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_ENABLE_ALL, "WID_SM_ENABLE_ALL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_DISABLE_ALL, "WID_SM_DISABLE_ALL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SM_SHOW_HEIGHT, "WID_SM_SHOW_HEIGHT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SV_CAPTION, "WID_SV_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SV_SORT_ORDER, "WID_SV_SORT_ORDER");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SV_SORT_BY, "WID_SV_SORT_BY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SV_GROUP, "WID_SV_GROUP");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SV_GROUP_BY, "WID_SV_GROUP_BY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SV_WAITING, "WID_SV_WAITING");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SV_SCROLLBAR, "WID_SV_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SV_ACCEPT_RATING_LIST, "WID_SV_ACCEPT_RATING_LIST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SV_LOCATION, "WID_SV_LOCATION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SV_ACCEPTS_RATINGS, "WID_SV_ACCEPTS_RATINGS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SV_RENAME, "WID_SV_RENAME");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SV_CLOSE_AIRPORT, "WID_SV_CLOSE_AIRPORT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SV_TRAINS, "WID_SV_TRAINS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SV_ROADVEHS, "WID_SV_ROADVEHS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SV_SHIPS, "WID_SV_SHIPS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SV_PLANES, "WID_SV_PLANES");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_STL_CAPTION, "WID_STL_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_STL_LIST, "WID_STL_LIST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_STL_SCROLLBAR, "WID_STL_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_STL_TRAIN, "WID_STL_TRAIN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_STL_TRUCK, "WID_STL_TRUCK");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_STL_BUS, "WID_STL_BUS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_STL_AIRPLANE, "WID_STL_AIRPLANE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_STL_SHIP, "WID_STL_SHIP");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_STL_FACILALL, "WID_STL_FACILALL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_STL_NOCARGOWAITING, "WID_STL_NOCARGOWAITING");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_STL_CARGOALL, "WID_STL_CARGOALL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_STL_SORTBY, "WID_STL_SORTBY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_STL_SORTDROPBTN, "WID_STL_SORTDROPBTN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_STL_CARGOSTART, "WID_STL_CARGOSTART");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_JS_CAPTION, "WID_JS_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_JS_PANEL, "WID_JS_PANEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_JS_SCROLLBAR, "WID_JS_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_S_LEFT, "WID_S_LEFT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_S_MIDDLE, "WID_S_MIDDLE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_S_RIGHT, "WID_S_RIGHT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SB_CAPTION, "WID_SB_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SB_SEL_PAGE, "WID_SB_SEL_PAGE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SB_PAGE_PANEL, "WID_SB_PAGE_PANEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SB_SCROLLBAR, "WID_SB_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SB_PREV_PAGE, "WID_SB_PREV_PAGE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SB_NEXT_PAGE, "WID_SB_NEXT_PAGE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SUL_PANEL, "WID_SUL_PANEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_SUL_SCROLLBAR, "WID_SUL_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_SHOW_PLACE_OBJECT, "WID_TT_SHOW_PLACE_OBJECT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_BUTTONS_START, "WID_TT_BUTTONS_START");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_LOWER_LAND, "WID_TT_LOWER_LAND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_RAISE_LAND, "WID_TT_RAISE_LAND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_LEVEL_LAND, "WID_TT_LEVEL_LAND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_DEMOLISH, "WID_TT_DEMOLISH");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_BUY_LAND, "WID_TT_BUY_LAND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_PLANT_TREES, "WID_TT_PLANT_TREES");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_PLACE_SIGN, "WID_TT_PLACE_SIGN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_PLACE_OBJECT, "WID_TT_PLACE_OBJECT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ETT_SHOW_PLACE_DESERT, "WID_ETT_SHOW_PLACE_DESERT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ETT_START, "WID_ETT_START");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ETT_DOTS, "WID_ETT_DOTS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ETT_BUTTONS_START, "WID_ETT_BUTTONS_START");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ETT_DEMOLISH, "WID_ETT_DEMOLISH");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ETT_LOWER_LAND, "WID_ETT_LOWER_LAND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ETT_RAISE_LAND, "WID_ETT_RAISE_LAND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ETT_LEVEL_LAND, "WID_ETT_LEVEL_LAND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ETT_PLACE_ROCKS, "WID_ETT_PLACE_ROCKS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ETT_PLACE_DESERT, "WID_ETT_PLACE_DESERT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ETT_PLACE_OBJECT, "WID_ETT_PLACE_OBJECT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ETT_BUTTONS_END, "WID_ETT_BUTTONS_END");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ETT_INCREASE_SIZE, "WID_ETT_INCREASE_SIZE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ETT_DECREASE_SIZE, "WID_ETT_DECREASE_SIZE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ETT_NEW_SCENARIO, "WID_ETT_NEW_SCENARIO");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_ETT_RESET_LANDSCAPE, "WID_ETT_RESET_LANDSCAPE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VT_CAPTION, "WID_VT_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VT_ORDER_VIEW, "WID_VT_ORDER_VIEW");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VT_TIMETABLE_PANEL, "WID_VT_TIMETABLE_PANEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VT_ARRIVAL_DEPARTURE_PANEL, "WID_VT_ARRIVAL_DEPARTURE_PANEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VT_SCROLLBAR, "WID_VT_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VT_SUMMARY_PANEL, "WID_VT_SUMMARY_PANEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VT_START_DATE, "WID_VT_START_DATE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VT_CHANGE_TIME, "WID_VT_CHANGE_TIME");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VT_CLEAR_TIME, "WID_VT_CLEAR_TIME");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VT_RESET_LATENESS, "WID_VT_RESET_LATENESS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VT_AUTOFILL, "WID_VT_AUTOFILL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VT_EXPECTED, "WID_VT_EXPECTED");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VT_SHARED_ORDER_LIST, "WID_VT_SHARED_ORDER_LIST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VT_ARRIVAL_DEPARTURE_SELECTION, "WID_VT_ARRIVAL_DEPARTURE_SELECTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VT_EXPECTED_SELECTION, "WID_VT_EXPECTED_SELECTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VT_CHANGE_SPEED, "WID_VT_CHANGE_SPEED");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VT_CLEAR_SPEED, "WID_VT_CLEAR_SPEED");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_PAUSE, "WID_TN_PAUSE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_FAST_FORWARD, "WID_TN_FAST_FORWARD");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_SETTINGS, "WID_TN_SETTINGS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_SAVE, "WID_TN_SAVE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_SMALL_MAP, "WID_TN_SMALL_MAP");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_TOWNS, "WID_TN_TOWNS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_SUBSIDIES, "WID_TN_SUBSIDIES");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_STATIONS, "WID_TN_STATIONS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_FINANCES, "WID_TN_FINANCES");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_COMPANIES, "WID_TN_COMPANIES");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_STORY, "WID_TN_STORY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_GOAL, "WID_TN_GOAL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_GRAPHS, "WID_TN_GRAPHS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_LEAGUE, "WID_TN_LEAGUE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_INDUSTRIES, "WID_TN_INDUSTRIES");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_VEHICLE_START, "WID_TN_VEHICLE_START");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_TRAINS, "WID_TN_TRAINS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_ROADVEHS, "WID_TN_ROADVEHS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_SHIPS, "WID_TN_SHIPS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_AIRCRAFTS, "WID_TN_AIRCRAFTS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_ZOOM_IN, "WID_TN_ZOOM_IN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_ZOOM_OUT, "WID_TN_ZOOM_OUT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_RAILS, "WID_TN_RAILS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_ROADS, "WID_TN_ROADS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_WATER, "WID_TN_WATER");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_AIR, "WID_TN_AIR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_LANDSCAPE, "WID_TN_LANDSCAPE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_MUSIC_SOUND, "WID_TN_MUSIC_SOUND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_MESSAGES, "WID_TN_MESSAGES");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_HELP, "WID_TN_HELP");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_SWITCH_BAR, "WID_TN_SWITCH_BAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TN_END, "WID_TN_END");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_PAUSE, "WID_TE_PAUSE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_FAST_FORWARD, "WID_TE_FAST_FORWARD");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_SETTINGS, "WID_TE_SETTINGS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_SAVE, "WID_TE_SAVE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_SPACER, "WID_TE_SPACER");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_DATE, "WID_TE_DATE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_DATE_BACKWARD, "WID_TE_DATE_BACKWARD");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_DATE_FORWARD, "WID_TE_DATE_FORWARD");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_SMALL_MAP, "WID_TE_SMALL_MAP");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_ZOOM_IN, "WID_TE_ZOOM_IN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_ZOOM_OUT, "WID_TE_ZOOM_OUT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_LAND_GENERATE, "WID_TE_LAND_GENERATE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_TOWN_GENERATE, "WID_TE_TOWN_GENERATE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_INDUSTRY, "WID_TE_INDUSTRY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_ROADS, "WID_TE_ROADS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_WATER, "WID_TE_WATER");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_TREES, "WID_TE_TREES");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_SIGNS, "WID_TE_SIGNS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_DATE_PANEL, "WID_TE_DATE_PANEL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_MUSIC_SOUND, "WID_TE_MUSIC_SOUND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_HELP, "WID_TE_HELP");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TE_SWITCH_BAR, "WID_TE_SWITCH_BAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TD_SORT_ORDER, "WID_TD_SORT_ORDER");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TD_SORT_CRITERIA, "WID_TD_SORT_CRITERIA");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TD_LIST, "WID_TD_LIST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TD_SCROLLBAR, "WID_TD_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TD_WORLD_POPULATION, "WID_TD_WORLD_POPULATION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TA_CAPTION, "WID_TA_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TA_RATING_INFO, "WID_TA_RATING_INFO");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TA_COMMAND_LIST, "WID_TA_COMMAND_LIST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TA_SCROLLBAR, "WID_TA_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TA_ACTION_INFO, "WID_TA_ACTION_INFO");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TA_EXECUTE, "WID_TA_EXECUTE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TV_CAPTION, "WID_TV_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TV_VIEWPORT, "WID_TV_VIEWPORT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TV_INFO, "WID_TV_INFO");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TV_CENTER_VIEW, "WID_TV_CENTER_VIEW");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TV_SHOW_AUTHORITY, "WID_TV_SHOW_AUTHORITY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TV_CHANGE_NAME, "WID_TV_CHANGE_NAME");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TV_EXPAND, "WID_TV_EXPAND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TV_DELETE, "WID_TV_DELETE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_NEW_TOWN, "WID_TF_NEW_TOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_RANDOM_TOWN, "WID_TF_RANDOM_TOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_MANY_RANDOM_TOWNS, "WID_TF_MANY_RANDOM_TOWNS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_TOWN_NAME_EDITBOX, "WID_TF_TOWN_NAME_EDITBOX");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_TOWN_NAME_RANDOM, "WID_TF_TOWN_NAME_RANDOM");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_SIZE_SMALL, "WID_TF_SIZE_SMALL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_SIZE_MEDIUM, "WID_TF_SIZE_MEDIUM");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_SIZE_LARGE, "WID_TF_SIZE_LARGE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_SIZE_RANDOM, "WID_TF_SIZE_RANDOM");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_CITY, "WID_TF_CITY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_LAYOUT_ORIGINAL, "WID_TF_LAYOUT_ORIGINAL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_LAYOUT_BETTER, "WID_TF_LAYOUT_BETTER");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_LAYOUT_GRID2, "WID_TF_LAYOUT_GRID2");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_LAYOUT_GRID3, "WID_TF_LAYOUT_GRID3");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TF_LAYOUT_RANDOM, "WID_TF_LAYOUT_RANDOM");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_BEGIN, "WID_TT_BEGIN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_SIGNS, "WID_TT_SIGNS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_TREES, "WID_TT_TREES");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_HOUSES, "WID_TT_HOUSES");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_INDUSTRIES, "WID_TT_INDUSTRIES");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_BUILDINGS, "WID_TT_BUILDINGS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_BRIDGES, "WID_TT_BRIDGES");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_STRUCTURES, "WID_TT_STRUCTURES");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_CATENARY, "WID_TT_CATENARY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_LOADING, "WID_TT_LOADING");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_END, "WID_TT_END");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_TT_BUTTONS, "WID_TT_BUTTONS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BT_TYPE_11, "WID_BT_TYPE_11");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BT_TYPE_12, "WID_BT_TYPE_12");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BT_TYPE_13, "WID_BT_TYPE_13");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BT_TYPE_14, "WID_BT_TYPE_14");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BT_TYPE_21, "WID_BT_TYPE_21");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BT_TYPE_22, "WID_BT_TYPE_22");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BT_TYPE_23, "WID_BT_TYPE_23");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BT_TYPE_24, "WID_BT_TYPE_24");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BT_TYPE_31, "WID_BT_TYPE_31");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BT_TYPE_32, "WID_BT_TYPE_32");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BT_TYPE_33, "WID_BT_TYPE_33");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BT_TYPE_34, "WID_BT_TYPE_34");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BT_TYPE_RANDOM, "WID_BT_TYPE_RANDOM");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_BT_MANY_RANDOM, "WID_BT_MANY_RANDOM");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VV_CAPTION, "WID_VV_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VV_VIEWPORT, "WID_VV_VIEWPORT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VV_START_STOP, "WID_VV_START_STOP");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VV_CENTER_MAIN_VIEW, "WID_VV_CENTER_MAIN_VIEW");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VV_GOTO_DEPOT, "WID_VV_GOTO_DEPOT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VV_REFIT, "WID_VV_REFIT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VV_SHOW_ORDERS, "WID_VV_SHOW_ORDERS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VV_SHOW_DETAILS, "WID_VV_SHOW_DETAILS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VV_CLONE, "WID_VV_CLONE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VV_SELECT_DEPOT_CLONE, "WID_VV_SELECT_DEPOT_CLONE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VV_SELECT_REFIT_TURN, "WID_VV_SELECT_REFIT_TURN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VV_TURN_AROUND, "WID_VV_TURN_AROUND");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VV_FORCE_PROCEED, "WID_VV_FORCE_PROCEED");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VR_CAPTION, "WID_VR_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VR_VEHICLE_PANEL_DISPLAY, "WID_VR_VEHICLE_PANEL_DISPLAY");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VR_SHOW_HSCROLLBAR, "WID_VR_SHOW_HSCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VR_HSCROLLBAR, "WID_VR_HSCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VR_SELECT_HEADER, "WID_VR_SELECT_HEADER");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VR_MATRIX, "WID_VR_MATRIX");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VR_SCROLLBAR, "WID_VR_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VR_INFO, "WID_VR_INFO");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VR_REFIT, "WID_VR_REFIT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VD_CAPTION, "WID_VD_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VD_RENAME_VEHICLE, "WID_VD_RENAME_VEHICLE");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VD_TOP_DETAILS, "WID_VD_TOP_DETAILS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VD_INCREASE_SERVICING_INTERVAL, "WID_VD_INCREASE_SERVICING_INTERVAL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VD_DECREASE_SERVICING_INTERVAL, "WID_VD_DECREASE_SERVICING_INTERVAL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VD_SERVICE_INTERVAL_DROPDOWN, "WID_VD_SERVICE_INTERVAL_DROPDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VD_SERVICING_INTERVAL, "WID_VD_SERVICING_INTERVAL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VD_MIDDLE_DETAILS, "WID_VD_MIDDLE_DETAILS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VD_MATRIX, "WID_VD_MATRIX");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VD_SCROLLBAR, "WID_VD_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VD_DETAILS_CARGO_CARRIED, "WID_VD_DETAILS_CARGO_CARRIED");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VD_DETAILS_TRAIN_VEHICLES, "WID_VD_DETAILS_TRAIN_VEHICLES");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VD_DETAILS_CAPACITY_OF_EACH, "WID_VD_DETAILS_CAPACITY_OF_EACH");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VD_DETAILS_TOTAL_CARGO, "WID_VD_DETAILS_TOTAL_CARGO");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VL_CAPTION, "WID_VL_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VL_SORT_ORDER, "WID_VL_SORT_ORDER");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VL_SORT_BY_PULLDOWN, "WID_VL_SORT_BY_PULLDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VL_LIST, "WID_VL_LIST");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VL_SCROLLBAR, "WID_VL_SCROLLBAR");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VL_HIDE_BUTTONS, "WID_VL_HIDE_BUTTONS");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VL_AVAILABLE_VEHICLES, "WID_VL_AVAILABLE_VEHICLES");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VL_MANAGE_VEHICLES_DROPDOWN, "WID_VL_MANAGE_VEHICLES_DROPDOWN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VL_STOP_ALL, "WID_VL_STOP_ALL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_VL_START_ALL, "WID_VL_START_ALL");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_EV_CAPTION, "WID_EV_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_EV_VIEWPORT, "WID_EV_VIEWPORT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_EV_ZOOM_IN, "WID_EV_ZOOM_IN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_EV_ZOOM_OUT, "WID_EV_ZOOM_OUT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_EV_MAIN_TO_VIEW, "WID_EV_MAIN_TO_VIEW");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_EV_VIEW_TO_MAIN, "WID_EV_VIEW_TO_MAIN");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_W_CAPTION, "WID_W_CAPTION");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_W_VIEWPORT, "WID_W_VIEWPORT");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_W_CENTER_VIEW, "WID_W_CENTER_VIEW");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_W_RENAME, "WID_W_RENAME");
- SQGSWindow.DefSQConst(engine, ScriptWindow::WID_W_SHOW_VEHICLES, "WID_W_SHOW_VEHICLES");
-
- SQGSWindow.DefSQStaticMethod(engine, &ScriptWindow::Close, "Close", 3, ".ii");
- SQGSWindow.DefSQStaticMethod(engine, &ScriptWindow::IsOpen, "IsOpen", 3, ".ii");
- SQGSWindow.DefSQStaticMethod(engine, &ScriptWindow::Highlight, "Highlight", 5, ".iiii");
-
- SQGSWindow.PostRegister(engine);
-}
diff --git a/src/script/api/script_window.hpp.orig b/src/script/api/script_window.hpp.orig
deleted file mode 100644
index f8bb2a3e42..0000000000
--- a/src/script/api/script_window.hpp.orig
+++ /dev/null
@@ -1,2579 +0,0 @@
-/* $Id$ */
-
-/*
- * This file is part of OpenTTD.
- * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
- * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see .
- */
-
-/** @file script_window.hpp Everything to handle window interaction. */
-
-#ifndef SCRIPT_WINDOW_HPP
-#define SCRIPT_WINDOW_HPP
-
-#include "script_object.hpp"
-#include "../../window_type.h"
-#include "../../gfx_type.h"
-
-#include "../../widgets/ai_widget.h"
-#include "../../widgets/airport_widget.h"
-#include "../../widgets/autoreplace_widget.h"
-#include "../../widgets/bootstrap_widget.h"
-#include "../../widgets/bridge_widget.h"
-#include "../../widgets/build_vehicle_widget.h"
-#include "../../widgets/cheat_widget.h"
-#include "../../widgets/company_widget.h"
-#include "../../widgets/console_widget.h"
-#include "../../widgets/date_widget.h"
-#include "../../widgets/depot_widget.h"
-#include "../../widgets/dock_widget.h"
-#include "../../widgets/dropdown_widget.h"
-#include "../../widgets/engine_widget.h"
-#include "../../widgets/error_widget.h"
-#include "../../widgets/fios_widget.h"
-#include "../../widgets/genworld_widget.h"
-#include "../../widgets/goal_widget.h"
-#include "../../widgets/graph_widget.h"
-#include "../../widgets/group_widget.h"
-#include "../../widgets/highscore_widget.h"
-#include "../../widgets/industry_widget.h"
-#include "../../widgets/intro_widget.h"
-#include "../../widgets/main_widget.h"
-#include "../../widgets/misc_widget.h"
-#include "../../widgets/music_widget.h"
-#include "../../widgets/network_chat_widget.h"
-#include "../../widgets/network_content_widget.h"
-#include "../../widgets/network_widget.h"
-#include "../../widgets/newgrf_debug_widget.h"
-#include "../../widgets/newgrf_widget.h"
-#include "../../widgets/news_widget.h"
-#include "../../widgets/object_widget.h"
-#include "../../widgets/order_widget.h"
-#include "../../widgets/osk_widget.h"
-#include "../../widgets/rail_widget.h"
-#include "../../widgets/road_widget.h"
-#include "../../widgets/settings_widget.h"
-#include "../../widgets/sign_widget.h"
-#include "../../widgets/smallmap_widget.h"
-#include "../../widgets/station_widget.h"
-#include "../../widgets/statusbar_widget.h"
-#include "../../widgets/subsidy_widget.h"
-#include "../../widgets/terraform_widget.h"
-#include "../../widgets/timetable_widget.h"
-#include "../../widgets/toolbar_widget.h"
-#include "../../widgets/town_widget.h"
-#include "../../widgets/transparency_widget.h"
-#include "../../widgets/tree_widget.h"
-#include "../../widgets/vehicle_widget.h"
-#include "../../widgets/viewport_widget.h"
-#include "../../widgets/waypoint_widget.h"
-#include "../../widgets/link_graph_legend_widget.h"
-#include "../../widgets/story_widget.h"
-
-/**
- * Class that handles window interaction. A Window in OpenTTD has two imporant
- * values. The WindowClass, and a Window number. The first indicates roughly
- * which window it is. WC_TOWN_VIEW for example, is the view of a town.
- * The Window number is a bit more complex, as it depends mostly on the
- * WindowClass. For example for WC_TOWN_VIEW it is the TownID. In general a
- * good rule of thumb is: either the number is always 0, or the ID of the
- * object in question.
- * In the comment at the widget enum, it is mentioned how the number is used.
- *
- * Note, that the detailed window layout is very version specific.
- * Enum values might be added, changed or removed in future versions without notice
- * in the changelog, and there won't be any means of compatibility.
- *
- * @api game
- */
-class ScriptWindow : public ScriptObject {
-public:
- // @enum WindowNumberEnum ../../window_type.h
- /* automatically generated from ../../window_type.h */
- /** %Window numbers. */
- enum WindowNumberEnum {
- WN_GAME_OPTIONS_AI = ::WN_GAME_OPTIONS_AI, ///< AI settings.
- WN_GAME_OPTIONS_ABOUT = ::WN_GAME_OPTIONS_ABOUT, ///< About window.
- WN_GAME_OPTIONS_NEWGRF_STATE = ::WN_GAME_OPTIONS_NEWGRF_STATE, ///< NewGRF settings.
- WN_GAME_OPTIONS_GAME_OPTIONS = ::WN_GAME_OPTIONS_GAME_OPTIONS, ///< Game options.
- WN_GAME_OPTIONS_GAME_SETTINGS = ::WN_GAME_OPTIONS_GAME_SETTINGS, ///< Game settings.
-
- WN_QUERY_STRING = ::WN_QUERY_STRING, ///< Query string.
- WN_QUERY_STRING_SIGN = ::WN_QUERY_STRING_SIGN, ///< Query string for signs.
-
- WN_CONFIRM_POPUP_QUERY = ::WN_CONFIRM_POPUP_QUERY, ///< Query popup confirm.
- WN_CONFIRM_POPUP_QUERY_BOOTSTRAP = ::WN_CONFIRM_POPUP_QUERY_BOOTSTRAP, ///< Query popup confirm for bootstrap.
-
- WN_NETWORK_WINDOW_GAME = ::WN_NETWORK_WINDOW_GAME, ///< Network game window.
- WN_NETWORK_WINDOW_LOBBY = ::WN_NETWORK_WINDOW_LOBBY, ///< Network lobby window.
- WN_NETWORK_WINDOW_CONTENT_LIST = ::WN_NETWORK_WINDOW_CONTENT_LIST, ///< Network content list.
- WN_NETWORK_WINDOW_START = ::WN_NETWORK_WINDOW_START, ///< Network start server.
-
- WN_NETWORK_STATUS_WINDOW_JOIN = ::WN_NETWORK_STATUS_WINDOW_JOIN, ///< Network join status.
- WN_NETWORK_STATUS_WINDOW_CONTENT_DOWNLOAD = ::WN_NETWORK_STATUS_WINDOW_CONTENT_DOWNLOAD, ///< Network content download status.
- };
-
- // @endenum
-
- // @enum WindowClass ../../window_type.h
- /* automatically generated from ../../window_type.h */
- /** %Window classes. */
- enum WindowClass {
- WC_NONE = ::WC_NONE, ///< No window, redirects to WC_MAIN_WINDOW.
-
- /**
- * Main window; %Window numbers:
- * - 0 = #MainWidgets
- */
- WC_MAIN_WINDOW = ::WC_MAIN_WINDOW,
-
- /**
- * Main toolbar (the long bar at the top); %Window numbers:
- * - 0 = #ToolbarNormalWidgets
- * - 0 = #ToolbarEditorWidgets
- */
- WC_MAIN_TOOLBAR = ::WC_MAIN_TOOLBAR,
-
- /**
- * Statusbar (at the bottom of your screen); %Window numbers:
- * - 0 = #StatusbarWidgets
- */
- WC_STATUS_BAR = ::WC_STATUS_BAR,
-
- /**
- * Build toolbar; %Window numbers:
- * - #TRANSPORT_RAIL = #RailToolbarWidgets
- * - #TRANSPORT_AIR = #AirportToolbarWidgets
- * - #TRANSPORT_WATER = #DockToolbarWidgets
- * - #TRANSPORT_ROAD = #RoadToolbarWidgets
- */
- WC_BUILD_TOOLBAR = ::WC_BUILD_TOOLBAR,
-
- /**
- * Scenario build toolbar; %Window numbers:
- * - #TRANSPORT_WATER = #DockToolbarWidgets
- * - #TRANSPORT_ROAD = #RoadToolbarWidgets
- */
- WC_SCEN_BUILD_TOOLBAR = ::WC_SCEN_BUILD_TOOLBAR,
-
- /**
- * Build trees toolbar; %Window numbers:
- * - 0 = #BuildTreesWidgets
- */
- WC_BUILD_TREES = ::WC_BUILD_TREES,
-
- /**
- * Transparency toolbar; %Window numbers:
- * - 0 = #TransparencyToolbarWidgets
- */
- WC_TRANSPARENCY_TOOLBAR = ::WC_TRANSPARENCY_TOOLBAR,
-
- /**
- * Build signal toolbar; %Window numbers:
- * - #TRANSPORT_RAIL = #BuildSignalWidgets
- */
- WC_BUILD_SIGNAL = ::WC_BUILD_SIGNAL,
-
- /**
- * Small map; %Window numbers:
- * - 0 = #SmallMapWidgets
- */
- WC_SMALLMAP = ::WC_SMALLMAP,
-
- /**
- * Error message; %Window numbers:
- * - 0 = #ErrorMessageWidgets
- */
- WC_ERRMSG = ::WC_ERRMSG,
-
- /**
- * Tooltip window; %Window numbers:
- * - 0 = #ToolTipsWidgets
- */
- WC_TOOLTIPS = ::WC_TOOLTIPS,
-
- /**
- * Query string window; %Window numbers:
- * - #WN_QUERY_STRING = #QueryStringWidgets
- * - #WN_QUERY_STRING_SIGN = #QueryEditSignWidgets
- */
- WC_QUERY_STRING = ::WC_QUERY_STRING,
-
- /**
- * Popup with confirm question; %Window numbers:
- * - #WN_CONFIRM_POPUP_QUERY = #QueryWidgets
- * - #WN_CONFIRM_POPUP_QUERY_BOOTSTRAP = #BootstrapAskForDownloadWidgets
- */
- WC_CONFIRM_POPUP_QUERY = ::WC_CONFIRM_POPUP_QUERY,
-
- /**
- * Popup with a set of buttons, designed to ask the user a question
- * from a GameScript. %Window numbers:
- * - uniqueid = #GoalQuestionWidgets
- */
- WC_GOAL_QUESTION = ::WC_GOAL_QUESTION,
-
-
- /**
- * Saveload window; %Window numbers:
- * - 0 = #SaveLoadWidgets
- */
- WC_SAVELOAD = ::WC_SAVELOAD,
-
- /**
- * Land info window; %Window numbers:
- * - 0 = #LandInfoWidgets
- */
- WC_LAND_INFO = ::WC_LAND_INFO,
-
- /**
- * Drop down menu; %Window numbers:
- * - 0 = #DropdownMenuWidgets
- */
- WC_DROPDOWN_MENU = ::WC_DROPDOWN_MENU,
-
- /**
- * On Screen Keyboard; %Window numbers:
- * - 0 = #OnScreenKeyboardWidgets
- */
- WC_OSK = ::WC_OSK,
-
- /**
- * Set date; %Window numbers:
- * - #VehicleID = #SetDateWidgets
- */
- WC_SET_DATE = ::WC_SET_DATE,
-
-
- /**
- * AI settings; %Window numbers:
- * - 0 = #AISettingsWidgets
- */
- WC_AI_SETTINGS = ::WC_AI_SETTINGS,
-
- /**
- * NewGRF parameters; %Window numbers:
- * - 0 = #NewGRFParametersWidgets
- */
- WC_GRF_PARAMETERS = ::WC_GRF_PARAMETERS,
-
- /**
- * textfile; %Window numbers:
- * - 0 = #TextfileWidgets
- */
- WC_TEXTFILE = ::WC_TEXTFILE,
-
-
- /**
- * Town authority; %Window numbers:
- * - #TownID = #TownAuthorityWidgets
- */
- WC_TOWN_AUTHORITY = ::WC_TOWN_AUTHORITY,
-
- /**
- * Vehicle details; %Window numbers:
- * - #VehicleID = #VehicleDetailsWidgets
- */
- WC_VEHICLE_DETAILS = ::WC_VEHICLE_DETAILS,
-
- /**
- * Vehicle refit; %Window numbers:
- * - #VehicleID = #VehicleRefitWidgets
- */
- WC_VEHICLE_REFIT = ::WC_VEHICLE_REFIT,
-
- /**
- * Vehicle orders; %Window numbers:
- * - #VehicleID = #OrderWidgets
- */
- WC_VEHICLE_ORDERS = ::WC_VEHICLE_ORDERS,
-
- /**
- * Replace vehicle window; %Window numbers:
- * - #VehicleType = #ReplaceVehicleWidgets
- */
- WC_REPLACE_VEHICLE = ::WC_REPLACE_VEHICLE,
-
- /**
- * Vehicle timetable; %Window numbers:
- * - #VehicleID = #VehicleTimetableWidgets
- */
- WC_VEHICLE_TIMETABLE = ::WC_VEHICLE_TIMETABLE,
-
- /**
- * Company colour selection; %Window numbers:
- * - #CompanyID = #SelectCompanyLiveryWidgets
- */
- WC_COMPANY_COLOUR = ::WC_COMPANY_COLOUR,
-
- /**
- * Alter company face window; %Window numbers:
- * - #CompanyID = #SelectCompanyManagerFaceWidgets
- */
- WC_COMPANY_MANAGER_FACE = ::WC_COMPANY_MANAGER_FACE,
-
- /**
- * Select station (when joining stations); %Window numbers:
- * - 0 = #JoinStationWidgets
- */
- WC_SELECT_STATION = ::WC_SELECT_STATION,
-
- /**
- * News window; %Window numbers:
- * - 0 = #NewsWidgets
- */
- WC_NEWS_WINDOW = ::WC_NEWS_WINDOW,
-
- /**
- * Town directory; %Window numbers:
- * - 0 = #TownDirectoryWidgets
- */
- WC_TOWN_DIRECTORY = ::WC_TOWN_DIRECTORY,
-
- /**
- * Subsidies list; %Window numbers:
- * - 0 = #SubsidyListWidgets
- */
- WC_SUBSIDIES_LIST = ::WC_SUBSIDIES_LIST,
-
- /**
- * Industry directory; %Window numbers:
- * - 0 = #IndustryDirectoryWidgets
- */
- WC_INDUSTRY_DIRECTORY = ::WC_INDUSTRY_DIRECTORY,
-
- /**
- * News history list; %Window numbers:
- * - 0 = #MessageHistoryWidgets
- */
- WC_MESSAGE_HISTORY = ::WC_MESSAGE_HISTORY,
-
- /**
- * Sign list; %Window numbers:
- * - 0 = #SignListWidgets
- */
- WC_SIGN_LIST = ::WC_SIGN_LIST,
-
- /**
- * AI list; %Window numbers:
- * - 0 = #AIListWidgets
- */
- WC_AI_LIST = ::WC_AI_LIST,
-
- /**
- * Goals list; %Window numbers:
- * - 0 ; #GoalListWidgets
- */
- WC_GOALS_LIST = ::WC_GOALS_LIST,
-
- /**
- * Story book; %Window numbers:
- * - CompanyID = #StoryBookWidgets
- */
- WC_STORY_BOOK = ::WC_STORY_BOOK,
-
- /**
- * Station list; %Window numbers:
- * - #CompanyID = #StationListWidgets
- */
- WC_STATION_LIST = ::WC_STATION_LIST,
-
- /**
- * Trains list; %Window numbers:
- * - Packed value = #GroupListWidgets / #VehicleListWidgets
- */
- WC_TRAINS_LIST = ::WC_TRAINS_LIST,
-
- /**
- * Road vehicle list; %Window numbers:
- * - Packed value = #GroupListWidgets / #VehicleListWidgets
- */
- WC_ROADVEH_LIST = ::WC_ROADVEH_LIST,
-
- /**
- * Ships list; %Window numbers:
- * - Packed value = #GroupListWidgets / #VehicleListWidgets
- */
- WC_SHIPS_LIST = ::WC_SHIPS_LIST,
-
- /**
- * Aircraft list; %Window numbers:
- * - Packed value = #GroupListWidgets / #VehicleListWidgets
- */
- WC_AIRCRAFT_LIST = ::WC_AIRCRAFT_LIST,
-
-
- /**
- * Town view; %Window numbers:
- * - #TownID = #TownViewWidgets
- */
- WC_TOWN_VIEW = ::WC_TOWN_VIEW,
-
- /**
- * Vehicle view; %Window numbers:
- * - #VehicleID = #VehicleViewWidgets
- */
- WC_VEHICLE_VIEW = ::WC_VEHICLE_VIEW,
-
- /**
- * Station view; %Window numbers:
- * - #StationID = #StationViewWidgets
- */
- WC_STATION_VIEW = ::WC_STATION_VIEW,
-
- /**
- * Depot view; %Window numbers:
- * - #TileIndex = #DepotWidgets
- */
- WC_VEHICLE_DEPOT = ::WC_VEHICLE_DEPOT,
-
- /**
- * Waypoint view; %Window numbers:
- * - #WaypointID = #WaypointWidgets
- */
- WC_WAYPOINT_VIEW = ::WC_WAYPOINT_VIEW,
-
- /**
- * Industry view; %Window numbers:
- * - #IndustryID = #IndustryViewWidgets
- */
- WC_INDUSTRY_VIEW = ::WC_INDUSTRY_VIEW,
-
- /**
- * Company view; %Window numbers:
- * - #CompanyID = #CompanyWidgets
- */
- WC_COMPANY = ::WC_COMPANY,
-
-
- /**
- * Build object; %Window numbers:
- * - 0 = #BuildObjectWidgets
- */
- WC_BUILD_OBJECT = ::WC_BUILD_OBJECT,
-
- /**
- * Build vehicle; %Window numbers:
- * - #VehicleType = #BuildVehicleWidgets
- * - #TileIndex = #BuildVehicleWidgets
- */
- WC_BUILD_VEHICLE = ::WC_BUILD_VEHICLE,
-
- /**
- * Build bridge; %Window numbers:
- * - #TransportType = #BuildBridgeSelectionWidgets
- */
- WC_BUILD_BRIDGE = ::WC_BUILD_BRIDGE,
-
- /**
- * Build station; %Window numbers:
- * - #TRANSPORT_AIR = #AirportPickerWidgets
- * - #TRANSPORT_WATER = #DockToolbarWidgets
- * - #TRANSPORT_RAIL = #BuildRailStationWidgets
- */
- WC_BUILD_STATION = ::WC_BUILD_STATION,
-
- /**
- * Build bus station; %Window numbers:
- * - #TRANSPORT_ROAD = #BuildRoadStationWidgets
- */
- WC_BUS_STATION = ::WC_BUS_STATION,
-
- /**
- * Build truck station; %Window numbers:
- * - #TRANSPORT_ROAD = #BuildRoadStationWidgets
- */
- WC_TRUCK_STATION = ::WC_TRUCK_STATION,
-
- /**
- * Build depot; %Window numbers:
- * - #TRANSPORT_WATER = #BuildDockDepotWidgets
- * - #TRANSPORT_RAIL = #BuildRailDepotWidgets
- * - #TRANSPORT_ROAD = #BuildRoadDepotWidgets
- */
- WC_BUILD_DEPOT = ::WC_BUILD_DEPOT,
-
- /**
- * Build waypoint; %Window numbers:
- * - #TRANSPORT_RAIL = #BuildRailWaypointWidgets
- */
- WC_BUILD_WAYPOINT = ::WC_BUILD_WAYPOINT,
-
- /**
- * Found a town; %Window numbers:
- * - 0 = #TownFoundingWidgets
- */
- WC_FOUND_TOWN = ::WC_FOUND_TOWN,
-
- /**
- * Build industry; %Window numbers:
- * - 0 = #DynamicPlaceIndustriesWidgets
- */
- WC_BUILD_INDUSTRY = ::WC_BUILD_INDUSTRY,
-
-
- /**
- * Select game window; %Window numbers:
- * - 0 = #SelectGameIntroWidgets
- */
- WC_SELECT_GAME = ::WC_SELECT_GAME,
-
- /**
- * Landscape generation (in Scenario Editor); %Window numbers:
- * - 0 = #TerraformToolbarWidgets
- * - 0 = #EditorTerraformToolbarWidgets
- */
- WC_SCEN_LAND_GEN = ::WC_SCEN_LAND_GEN,
-
- /**
- * Generate landscape (newgame); %Window numbers:
- * - GLWM_SCENARIO = #CreateScenarioWidgets
- * - #GenenerateLandscapeWindowMode = #GenerateLandscapeWidgets
- */
- WC_GENERATE_LANDSCAPE = ::WC_GENERATE_LANDSCAPE,
-
- /**
- * Progress report of landscape generation; %Window numbers:
- * - 0 = #GenerationProgressWidgets
- * - 1 = #ScanProgressWidgets
- */
- WC_MODAL_PROGRESS = ::WC_MODAL_PROGRESS,
-
-
- /**
- * Network window; %Window numbers:
- * - #WN_NETWORK_WINDOW_GAME = #NetworkGameWidgets
- * - #WN_NETWORK_WINDOW_LOBBY = #NetworkLobbyWidgets
- * - #WN_NETWORK_WINDOW_CONTENT_LIST = #NetworkContentListWidgets
- * - #WN_NETWORK_WINDOW_START = #NetworkStartServerWidgets
- */
- WC_NETWORK_WINDOW = ::WC_NETWORK_WINDOW,
-
- /**
- * Client list; %Window numbers:
- * - 0 = #ClientListWidgets
- */
- WC_CLIENT_LIST = ::WC_CLIENT_LIST,
-
- /**
- * Popup for the client list; %Window numbers:
- * - #ClientID = #ClientListPopupWidgets
- */
- WC_CLIENT_LIST_POPUP = ::WC_CLIENT_LIST_POPUP,
-
- /**
- * Network status window; %Window numbers:
- * - #WN_NETWORK_STATUS_WINDOW_JOIN = #NetworkJoinStatusWidgets
- * - #WN_NETWORK_STATUS_WINDOW_CONTENT_DOWNLOAD = #NetworkContentDownloadStatusWidgets
- */
- WC_NETWORK_STATUS_WINDOW = ::WC_NETWORK_STATUS_WINDOW,
-
- /**
- * Chatbox; %Window numbers:
- * - #DestType = #NetWorkChatWidgets
- */
- WC_SEND_NETWORK_MSG = ::WC_SEND_NETWORK_MSG,
-
- /**
- * Company password query; %Window numbers:
- * - 0 = #NetworkCompanyPasswordWidgets
- */
- WC_COMPANY_PASSWORD_WINDOW = ::WC_COMPANY_PASSWORD_WINDOW,
-
-
- /**
- * Industry cargoes chain; %Window numbers:
- * - 0 = #IndustryCargoesWidgets
- */
- WC_INDUSTRY_CARGOES = ::WC_INDUSTRY_CARGOES,
-
- /**
- * Legend for graphs; %Window numbers:
- * - 0 = #GraphLegendWidgets
- */
- WC_GRAPH_LEGEND = ::WC_GRAPH_LEGEND,
-
- /**
- * Finances of a company; %Window numbers:
- * - #CompanyID = #CompanyWidgets
- */
- WC_FINANCES = ::WC_FINANCES,
-
- /**
- * Income graph; %Window numbers:
- * - 0 = #CompanyValueWidgets
- */
- WC_INCOME_GRAPH = ::WC_INCOME_GRAPH,
-
- /**
- * Operating profit graph; %Window numbers:
- * - 0 = #CompanyValueWidgets
- */
- WC_OPERATING_PROFIT = ::WC_OPERATING_PROFIT,
-
- /**
- * Delivered cargo graph; %Window numbers:
- * - 0 = #CompanyValueWidgets
- */
- WC_DELIVERED_CARGO = ::WC_DELIVERED_CARGO,
-
- /**
- * Performance history graph; %Window numbers:
- * - 0 = #PerformanceHistoryGraphWidgets
- */
- WC_PERFORMANCE_HISTORY = ::WC_PERFORMANCE_HISTORY,
-
- /**
- * Company value graph; %Window numbers:
- * - 0 = #CompanyValueWidgets
- */
- WC_COMPANY_VALUE = ::WC_COMPANY_VALUE,
-
- /**
- * Company league window; %Window numbers:
- * - 0 = #CompanyLeagueWidgets
- */
- WC_COMPANY_LEAGUE = ::WC_COMPANY_LEAGUE,
-
- /**
- * Payment rates graph; %Window numbers:
- * - 0 = #CargoPaymentRatesWidgets
- */
- WC_PAYMENT_RATES = ::WC_PAYMENT_RATES,
-
- /**
- * Performance detail window; %Window numbers:
- * - 0 = #PerformanceRatingDetailsWidgets
- */
- WC_PERFORMANCE_DETAIL = ::WC_PERFORMANCE_DETAIL,
-
- /**
- * Company infrastructure overview; %Window numbers:
- * - #CompanyID = #CompanyInfrastructureWidgets
- */
- WC_COMPANY_INFRASTRUCTURE = ::WC_COMPANY_INFRASTRUCTURE,
-
-
- /**
- * Buyout company (merger); %Window numbers:
- * - #CompanyID = #BuyCompanyWidgets
- */
- WC_BUY_COMPANY = ::WC_BUY_COMPANY,
-
- /**
- * Engine preview window; %Window numbers:
- * - #EngineID = #EnginePreviewWidgets
- */
- WC_ENGINE_PREVIEW = ::WC_ENGINE_PREVIEW,
-
-
- /**
- * Music window; %Window numbers:
- * - 0 = #MusicWidgets
- */
- WC_MUSIC_WINDOW = ::WC_MUSIC_WINDOW,
-
- /**
- * Music track selection; %Window numbers:
- * - 0 = MusicTrackSelectionWidgets
- */
- WC_MUSIC_TRACK_SELECTION = ::WC_MUSIC_TRACK_SELECTION,
-
- /**
- * Game options window; %Window numbers:
- * - #WN_GAME_OPTIONS_AI = #AIConfigWidgets
- * - #WN_GAME_OPTIONS_ABOUT = #AboutWidgets
- * - #WN_GAME_OPTIONS_NEWGRF_STATE = #NewGRFStateWidgets
- * - #WN_GAME_OPTIONS_GAME_OPTIONS = #GameOptionsWidgets
- * - #WN_GAME_OPTIONS_GAME_SETTINGS = #GameSettingsWidgets
- */
- WC_GAME_OPTIONS = ::WC_GAME_OPTIONS,
-
- /**
- * Custom currency; %Window numbers:
- * - 0 = #CustomCurrencyWidgets
- */
- WC_CUSTOM_CURRENCY = ::WC_CUSTOM_CURRENCY,
-
- /**
- * Cheat window; %Window numbers:
- * - 0 = #CheatWidgets
- */
- WC_CHEATS = ::WC_CHEATS,
-
- /**
- * Extra viewport; %Window numbers:
- * - Ascending value = #ExtraViewportWidgets
- */
- WC_EXTRA_VIEW_PORT = ::WC_EXTRA_VIEW_PORT,
-
-
- /**
- * Console; %Window numbers:
- * - 0 = #ConsoleWidgets
- */
- WC_CONSOLE = ::WC_CONSOLE,
-
- /**
- * Bootstrap; %Window numbers:
- * - 0 = #BootstrapBackgroundWidgets
- */
- WC_BOOTSTRAP = ::WC_BOOTSTRAP,
-
- /**
- * Highscore; %Window numbers:
- * - 0 = #HighscoreWidgets
- */
- WC_HIGHSCORE = ::WC_HIGHSCORE,
-
- /**
- * Endscreen; %Window numbers:
- * - 0 = #HighscoreWidgets
- */
- WC_ENDSCREEN = ::WC_ENDSCREEN,
-
-
- /**
- * AI debug window; %Window numbers:
- * - 0 = #AIDebugWidgets
- */
- WC_AI_DEBUG = ::WC_AI_DEBUG,
-
- /**
- * NewGRF inspect (debug); %Window numbers:
- * - Packed value = #NewGRFInspectWidgets
- */
- WC_NEWGRF_INSPECT = ::WC_NEWGRF_INSPECT,
-
- /**
- * Sprite aligner (debug); %Window numbers:
- * - 0 = #SpriteAlignerWidgets
- */
- WC_SPRITE_ALIGNER = ::WC_SPRITE_ALIGNER,
-
- /**
- * Linkgraph legend; Window numbers:
- * - 0 = #LinkGraphWidgets
- */
- WC_LINKGRAPH_LEGEND = ::WC_LINKGRAPH_LEGEND,
-
- WC_INVALID = ::WC_INVALID, ///< Invalid window.
- };
-
- // @endenum
-
- /**
- * The colours in the game which you can use for text and highlights.
- */
- enum TextColour {
- /* Note: these values represent part of the in-game TextColour enum */
- TC_BLUE = ::TC_BLUE, ///< Blue colour.
- TC_SILVER = ::TC_SILVER, ///< Silver colour.
- TC_GOLD = ::TC_GOLD, ///< Gold colour.
- TC_RED = ::TC_RED, ///< Red colour.
- TC_PURPLE = ::TC_PURPLE, ///< Purple colour.
- TC_LIGHT_BROWN = ::TC_LIGHT_BROWN, ///< Light brown colour.
- TC_ORANGE = ::TC_ORANGE, ///< Orange colour.
- TC_GREEN = ::TC_GREEN, ///< Green colour.
- TC_YELLOW = ::TC_YELLOW, ///< Yellow colour.
- TC_DARK_GREEN = ::TC_DARK_GREEN, ///< Dark green colour.
- TC_CREAM = ::TC_CREAM, ///< Cream colour.
- TC_BROWN = ::TC_BROWN, ///< Brown colour.
- TC_WHITE = ::TC_WHITE, ///< White colour.
- TC_LIGHT_BLUE = ::TC_LIGHT_BLUE, ///< Light blue colour.
- TC_GREY = ::TC_GREY, ///< Grey colour.
- TC_DARK_BLUE = ::TC_DARK_BLUE, ///< Dark blue colour.
- TC_BLACK = ::TC_BLACK, ///< Black colour.
- TC_INVALID = ::TC_INVALID, ///< Invalid colour.
- };
-
- /**
- * Special number values.
- */
- enum NumberType {
- NUMBER_ALL = 0xFFFFFFFF, ///< Value to select all windows of a class.
- };
-
- /**
- * Special widget values.
- */
- enum WidgetType {
- WIDGET_ALL = 0xFF, ///< Value to select all widgets of a window.
- };
-
- /**
- * Close a window.
- * @param window The class of the window to close.
- * @param number The number of the window to close, or NUMBER_ALL to close all of this class.
- * @pre !ScriptGame::IsMultiplayer().
- */
- static void Close(WindowClass window, uint32 number);
-
- /**
- * Check if a window is open.
- * @param window The class of the window to check for.
- * @param number The number of the window to check for, or NUMBER_ALL to check for any in the class.
- * @pre !ScriptGame::IsMultiplayer().
- * @return True if the window is open.
- */
- static bool IsOpen(WindowClass window, uint32 number);
-
- /**
- * Highlight a widget in a window.
- * @param window The class of the window to highlight a widget in.
- * @param number The number of the window to highlight a widget in.
- * @param widget The widget in the window to highlight, or WIDGET_ALL (in combination with TC_INVALID) to disable all widget highlighting on this window.
- * @param colour The colour of the highlight, or TC_INVALID for disabling.
- * @pre !ScriptGame::IsMultiplayer().
- * @pre number != NUMBER_ALL.
- * @pre colour < TC_END || (widget == WIDGET_ALL && colour == TC_INVALID).
- * @pre IsOpen(window, number).
- */
- static void Highlight(WindowClass window, uint32 number, uint8 widget, TextColour colour);
-
- // @enum .*Widgets ../../widgets/*_widget.h
- /* automatically generated from ../../widgets/ai_widget.h */
- /** Widgets of the #AIListWindow class. */
- enum AIListWidgets {
- WID_AIL_CAPTION = ::WID_AIL_CAPTION, ///< Caption of the window.
- WID_AIL_LIST = ::WID_AIL_LIST, ///< The matrix with all available AIs.
- WID_AIL_SCROLLBAR = ::WID_AIL_SCROLLBAR, ///< Scrollbar next to the AI list.
- WID_AIL_INFO_BG = ::WID_AIL_INFO_BG, ///< Panel to draw some AI information on.
- WID_AIL_ACCEPT = ::WID_AIL_ACCEPT, ///< Accept button.
- WID_AIL_CANCEL = ::WID_AIL_CANCEL, ///< Cancel button.
- };
-
- /** Widgets of the #AISettingsWindow class. */
- enum AISettingsWidgets {
- WID_AIS_CAPTION = ::WID_AIS_CAPTION, ///< Caption of the window.
- WID_AIS_BACKGROUND = ::WID_AIS_BACKGROUND, ///< Panel to draw the settings on.
- WID_AIS_SCROLLBAR = ::WID_AIS_SCROLLBAR, ///< Scrollbar to scroll through all settings.
- WID_AIS_ACCEPT = ::WID_AIS_ACCEPT, ///< Accept button.
- WID_AIS_RESET = ::WID_AIS_RESET, ///< Reset button.
- };
-
- /** Widgets of the #AIConfigWindow class. */
- enum AIConfigWidgets {
- WID_AIC_BACKGROUND = ::WID_AIC_BACKGROUND, ///< Window background.
- WID_AIC_DECREASE = ::WID_AIC_DECREASE, ///< Decrease the number of AIs.
- WID_AIC_INCREASE = ::WID_AIC_INCREASE, ///< Increase the number of AIs.
- WID_AIC_NUMBER = ::WID_AIC_NUMBER, ///< Number of AIs.
- WID_AIC_GAMELIST = ::WID_AIC_GAMELIST, ///< List with current selected GameScript.
- WID_AIC_LIST = ::WID_AIC_LIST, ///< List with currently selected AIs.
- WID_AIC_SCROLLBAR = ::WID_AIC_SCROLLBAR, ///< Scrollbar to scroll through the selected AIs.
- WID_AIC_MOVE_UP = ::WID_AIC_MOVE_UP, ///< Move up button.
- WID_AIC_MOVE_DOWN = ::WID_AIC_MOVE_DOWN, ///< Move down button.
- WID_AIC_CHANGE = ::WID_AIC_CHANGE, ///< Select another AI button.
- WID_AIC_CONFIGURE = ::WID_AIC_CONFIGURE, ///< Change AI settings button.
- WID_AIC_CLOSE = ::WID_AIC_CLOSE, ///< Close window button.
- WID_AIC_TEXTFILE = ::WID_AIC_TEXTFILE, ///< Open AI readme, changelog (+1) or license (+2).
- WID_AIC_CONTENT_DOWNLOAD = ::WID_AIC_CONTENT_DOWNLOAD, ///< Download content button.
- };
-
- /** Widgets of the #AIDebugWindow class. */
- enum AIDebugWidgets {
- WID_AID_VIEW = ::WID_AID_VIEW, ///< The row of company buttons.
- WID_AID_NAME_TEXT = ::WID_AID_NAME_TEXT, ///< Name of the current selected.
- WID_AID_SETTINGS = ::WID_AID_SETTINGS, ///< Settings button.
- WID_AID_SCRIPT_GAME = ::WID_AID_SCRIPT_GAME, ///< Game Script button.
- WID_AID_RELOAD_TOGGLE = ::WID_AID_RELOAD_TOGGLE, ///< Reload button.
- WID_AID_LOG_PANEL = ::WID_AID_LOG_PANEL, ///< Panel where the log is in.
- WID_AID_SCROLLBAR = ::WID_AID_SCROLLBAR, ///< Scrollbar of the log panel.
- WID_AID_COMPANY_BUTTON_START = ::WID_AID_COMPANY_BUTTON_START, ///< Buttons in the VIEW.
- WID_AID_COMPANY_BUTTON_END = ::WID_AID_COMPANY_BUTTON_END, ///< Last possible button in the VIEW.
- WID_AID_BREAK_STRING_WIDGETS = ::WID_AID_BREAK_STRING_WIDGETS, ///< The panel to handle the breaking on string.
- WID_AID_BREAK_STR_ON_OFF_BTN = ::WID_AID_BREAK_STR_ON_OFF_BTN, ///< Enable breaking on string.
- WID_AID_BREAK_STR_EDIT_BOX = ::WID_AID_BREAK_STR_EDIT_BOX, ///< Edit box for the string to break on.
- WID_AID_MATCH_CASE_BTN = ::WID_AID_MATCH_CASE_BTN, ///< Checkbox to use match caching or not.
- WID_AID_CONTINUE_BTN = ::WID_AID_CONTINUE_BTN, ///< Continue button.
- };
-
- /* automatically generated from ../../widgets/airport_widget.h */
- /** Widgets of the #BuildAirToolbarWindow class. */
- enum AirportToolbarWidgets {
- WID_AT_AIRPORT = ::WID_AT_AIRPORT, ///< Build airport button.
- WID_AT_DEMOLISH = ::WID_AT_DEMOLISH, ///< Demolish button.
- };
-
- /** Widgets of the #BuildAirportWindow class. */
- enum AirportPickerWidgets {
- WID_AP_CLASS_DROPDOWN = ::WID_AP_CLASS_DROPDOWN, ///< Dropdown of airport classes.
- WID_AP_AIRPORT_LIST = ::WID_AP_AIRPORT_LIST, ///< List of airports.
- WID_AP_SCROLLBAR = ::WID_AP_SCROLLBAR, ///< Scrollbar of the list.
- WID_AP_LAYOUT_NUM = ::WID_AP_LAYOUT_NUM, ///< Current number of the layout.
- WID_AP_LAYOUT_DECREASE = ::WID_AP_LAYOUT_DECREASE, ///< Decrease the layout number.
- WID_AP_LAYOUT_INCREASE = ::WID_AP_LAYOUT_INCREASE, ///< Increase the layout number.
- WID_AP_AIRPORT_SPRITE = ::WID_AP_AIRPORT_SPRITE, ///< A visual display of the airport currently selected.
- WID_AP_EXTRA_TEXT = ::WID_AP_EXTRA_TEXT, ///< Additional text about the airport.
- WID_AP_BOTTOMPANEL = ::WID_AP_BOTTOMPANEL, ///< Panel at the bottom.
- WID_AP_COVERAGE_LABEL = ::WID_AP_COVERAGE_LABEL, ///< Label if you want to see the coverage.
- WID_AP_BTN_DONTHILIGHT = ::WID_AP_BTN_DONTHILIGHT, ///< Don't show the coverage button.
- WID_AP_BTN_DOHILIGHT = ::WID_AP_BTN_DOHILIGHT, ///< Show the coverage button.
- };
-
- /* automatically generated from ../../widgets/autoreplace_widget.h */
- /** Widgets of the #ReplaceVehicleWindow class. */
- enum ReplaceVehicleWidgets {
- WID_RV_CAPTION = ::WID_RV_CAPTION, ///< Caption of the window.
-
- /* Left and right matrix + details. */
- WID_RV_LEFT_MATRIX = ::WID_RV_LEFT_MATRIX, ///< The matrix on the left.
- WID_RV_LEFT_SCROLLBAR = ::WID_RV_LEFT_SCROLLBAR, ///< The scrollbar for the matrix on the left.
- WID_RV_RIGHT_MATRIX = ::WID_RV_RIGHT_MATRIX, ///< The matrix on the right.
- WID_RV_RIGHT_SCROLLBAR = ::WID_RV_RIGHT_SCROLLBAR, ///< The scrollbar for the matrix on the right.
- WID_RV_LEFT_DETAILS = ::WID_RV_LEFT_DETAILS, ///< Details of the entry on the left.
- WID_RV_RIGHT_DETAILS = ::WID_RV_RIGHT_DETAILS, ///< Details of the entry on the right.
-
- /* Button row. */
- WID_RV_START_REPLACE = ::WID_RV_START_REPLACE, ///< Start Replacing button.
- WID_RV_INFO_TAB = ::WID_RV_INFO_TAB, ///< Info tab.
- WID_RV_STOP_REPLACE = ::WID_RV_STOP_REPLACE, ///< Stop Replacing button.
-
- /* Train only widgets. */
- WID_RV_TRAIN_ENGINEWAGON_TOGGLE = ::WID_RV_TRAIN_ENGINEWAGON_TOGGLE, ///< Button to toggle engines and/or wagons.
- WID_RV_TRAIN_FLUFF_LEFT = ::WID_RV_TRAIN_FLUFF_LEFT, ///< The fluff on the left.
- WID_RV_TRAIN_RAILTYPE_DROPDOWN = ::WID_RV_TRAIN_RAILTYPE_DROPDOWN, ///< Dropdown menu about the railtype.
- WID_RV_TRAIN_FLUFF_RIGHT = ::WID_RV_TRAIN_FLUFF_RIGHT, ///< The fluff on the right.
- WID_RV_TRAIN_WAGONREMOVE_TOGGLE = ::WID_RV_TRAIN_WAGONREMOVE_TOGGLE, ///< Button to toggle removing wagons.
- };
-
- /* automatically generated from ../../widgets/bootstrap_widget.h */
- /** Widgets of the #BootstrapBackground class. */
- enum BootstrapBackgroundWidgets {
- WID_BB_BACKGROUND = ::WID_BB_BACKGROUND, ///< Background of the window.
- };
-
- /** Widgets of the #BootstrapContentDownloadStatusWindow class. */
- enum BootstrapAskForDownloadWidgets {
- WID_BAFD_QUESTION = ::WID_BAFD_QUESTION, ///< The question whether to download.
- WID_BAFD_YES = ::WID_BAFD_YES, ///< An affirmative answer to the question.
- WID_BAFD_NO = ::WID_BAFD_NO, ///< An negative answer to the question.
- };
-
- /* automatically generated from ../../widgets/bridge_widget.h */
- /** Widgets of the #BuildBridgeWindow class. */
- enum BuildBridgeSelectionWidgets {
- WID_BBS_CAPTION = ::WID_BBS_CAPTION, ///< Caption of the window.
- WID_BBS_DROPDOWN_ORDER = ::WID_BBS_DROPDOWN_ORDER, ///< Direction of sort dropdown.
- WID_BBS_DROPDOWN_CRITERIA = ::WID_BBS_DROPDOWN_CRITERIA, ///< Criteria of sort dropdown.
- WID_BBS_BRIDGE_LIST = ::WID_BBS_BRIDGE_LIST, ///< List of bridges.
- WID_BBS_SCROLLBAR = ::WID_BBS_SCROLLBAR, ///< Scrollbar of the list.
- };
-
- /* automatically generated from ../../widgets/build_vehicle_widget.h */
- /** Widgets of the #BuildVehicleWindow class. */
- enum BuildVehicleWidgets {
- WID_BV_CAPTION = ::WID_BV_CAPTION, ///< Caption of window.
- WID_BV_SORT_ASSENDING_DESCENDING = ::WID_BV_SORT_ASSENDING_DESCENDING, ///< Sort direction.
- WID_BV_SORT_DROPDOWN = ::WID_BV_SORT_DROPDOWN, ///< Criteria of sorting dropdown.
- WID_BV_CARGO_FILTER_DROPDOWN = ::WID_BV_CARGO_FILTER_DROPDOWN, ///< Cargo filter dropdown.
- WID_BV_LIST = ::WID_BV_LIST, ///< List of vehicles.
- WID_BV_SCROLLBAR = ::WID_BV_SCROLLBAR, ///< Scrollbar of list.
- WID_BV_PANEL = ::WID_BV_PANEL, ///< Button panel.
- WID_BV_BUILD = ::WID_BV_BUILD, ///< Build panel.
- WID_BV_BUILD_SEL = ::WID_BV_BUILD_SEL, ///< Build button.
- WID_BV_RENAME = ::WID_BV_RENAME, ///< Rename button.
- };
-
- /* automatically generated from ../../widgets/cheat_widget.h */
- /** Widgets of the #CheatWindow class.. */
- enum CheatWidgets {
- WID_C_PANEL = ::WID_C_PANEL, ///< Panel where all cheats are shown in.
- };
-
- /* automatically generated from ../../widgets/company_widget.h */
- /** Widgets of the #CompanyWindow class. */
- enum CompanyWidgets {
- WID_C_CAPTION = ::WID_C_CAPTION, ///< Caption of the window.
-
- WID_C_FACE = ::WID_C_FACE, ///< View of the face.
- WID_C_FACE_TITLE = ::WID_C_FACE_TITLE, ///< Title for the face.
-
- WID_C_DESC_INAUGURATION = ::WID_C_DESC_INAUGURATION, ///< Inauguration.
- WID_C_DESC_COLOUR_SCHEME = ::WID_C_DESC_COLOUR_SCHEME, ///< Colour scheme.
- WID_C_DESC_COLOUR_SCHEME_EXAMPLE = ::WID_C_DESC_COLOUR_SCHEME_EXAMPLE, ///< Colour scheme example.
- WID_C_DESC_VEHICLE = ::WID_C_DESC_VEHICLE, ///< Vehicles.
- WID_C_DESC_VEHICLE_COUNTS = ::WID_C_DESC_VEHICLE_COUNTS, ///< Vehicle count.
- WID_C_DESC_COMPANY_VALUE = ::WID_C_DESC_COMPANY_VALUE, ///< Company value.
- WID_C_DESC_INFRASTRUCTURE = ::WID_C_DESC_INFRASTRUCTURE, ///< Infrastructure.
- WID_C_DESC_INFRASTRUCTURE_COUNTS = ::WID_C_DESC_INFRASTRUCTURE_COUNTS, ///< Infrastructure count.
-
- WID_C_SELECT_DESC_OWNERS = ::WID_C_SELECT_DESC_OWNERS, ///< Owners.
- WID_C_DESC_OWNERS = ::WID_C_DESC_OWNERS, ///< Owner in Owners.
-
- WID_C_SELECT_BUTTONS = ::WID_C_SELECT_BUTTONS, ///< Selection widget for the button bar.
- WID_C_NEW_FACE = ::WID_C_NEW_FACE, ///< Button to make new face.
- WID_C_COLOUR_SCHEME = ::WID_C_COLOUR_SCHEME, ///< Button to change colour scheme.
- WID_C_PRESIDENT_NAME = ::WID_C_PRESIDENT_NAME, ///< Button to change president name.
- WID_C_COMPANY_NAME = ::WID_C_COMPANY_NAME, ///< Button to change company name.
- WID_C_BUY_SHARE = ::WID_C_BUY_SHARE, ///< Button to buy a share.
- WID_C_SELL_SHARE = ::WID_C_SELL_SHARE, ///< Button to sell a share.
-
- WID_C_SELECT_VIEW_BUILD_HQ = ::WID_C_SELECT_VIEW_BUILD_HQ, ///< Panel about HQ.
- WID_C_VIEW_HQ = ::WID_C_VIEW_HQ, ///< Button to view the HQ.
- WID_C_BUILD_HQ = ::WID_C_BUILD_HQ, ///< Button to build the HQ.
-
- WID_C_SELECT_RELOCATE = ::WID_C_SELECT_RELOCATE, ///< Panel about 'Relocate HQ'.
- WID_C_RELOCATE_HQ = ::WID_C_RELOCATE_HQ, ///< Button to relocate the HQ.
-
- WID_C_VIEW_INFRASTRUCTURE = ::WID_C_VIEW_INFRASTRUCTURE, ///< Panel about infrastructure.
-
- WID_C_HAS_PASSWORD = ::WID_C_HAS_PASSWORD, ///< Has company password lock.
- WID_C_SELECT_MULTIPLAYER = ::WID_C_SELECT_MULTIPLAYER, ///< Multiplayer selection panel.
- WID_C_COMPANY_PASSWORD = ::WID_C_COMPANY_PASSWORD, ///< Button to set company password.
- WID_C_COMPANY_JOIN = ::WID_C_COMPANY_JOIN, ///< Button to join company.
- };
-
- /** Widgets of the #CompanyFinancesWindow class. */
- enum CompanyFinancesWidgets {
- WID_CF_CAPTION = ::WID_CF_CAPTION, ///< Caption of the window.
- WID_CF_TOGGLE_SIZE = ::WID_CF_TOGGLE_SIZE, ///< Toggle windows size.
- WID_CF_SEL_PANEL = ::WID_CF_SEL_PANEL, ///< Select panel or nothing.
- WID_CF_EXPS_CATEGORY = ::WID_CF_EXPS_CATEGORY, ///< Column for expenses category strings.
- WID_CF_EXPS_PRICE1 = ::WID_CF_EXPS_PRICE1, ///< Column for year Y-2 expenses.
- WID_CF_EXPS_PRICE2 = ::WID_CF_EXPS_PRICE2, ///< Column for year Y-1 expenses.
- WID_CF_EXPS_PRICE3 = ::WID_CF_EXPS_PRICE3, ///< Column for year Y expenses.
- WID_CF_TOTAL_PANEL = ::WID_CF_TOTAL_PANEL, ///< Panel for totals.
- WID_CF_SEL_MAXLOAN = ::WID_CF_SEL_MAXLOAN, ///< Selection of maxloan column.
- WID_CF_BALANCE_VALUE = ::WID_CF_BALANCE_VALUE, ///< Bank balance value.
- WID_CF_LOAN_VALUE = ::WID_CF_LOAN_VALUE, ///< Loan.
- WID_CF_LOAN_LINE = ::WID_CF_LOAN_LINE, ///< Line for summing bank balance and loan.
- WID_CF_TOTAL_VALUE = ::WID_CF_TOTAL_VALUE, ///< Total.
- WID_CF_MAXLOAN_GAP = ::WID_CF_MAXLOAN_GAP, ///< Gap above max loan widget.
- WID_CF_MAXLOAN_VALUE = ::WID_CF_MAXLOAN_VALUE, ///< Max loan widget.
- WID_CF_SEL_BUTTONS = ::WID_CF_SEL_BUTTONS, ///< Selection of buttons.
- WID_CF_INCREASE_LOAN = ::WID_CF_INCREASE_LOAN, ///< Increase loan.
- WID_CF_REPAY_LOAN = ::WID_CF_REPAY_LOAN, ///< Decrease loan..
- WID_CF_INFRASTRUCTURE = ::WID_CF_INFRASTRUCTURE, ///< View company infrastructure.
- };
-
- /** Widgets of the #SelectCompanyLiveryWindow class. */
- enum SelectCompanyLiveryWidgets {
- WID_SCL_CAPTION = ::WID_SCL_CAPTION, ///< Caption of window.
- WID_SCL_CLASS_GENERAL = ::WID_SCL_CLASS_GENERAL, ///< Class general.
- WID_SCL_CLASS_RAIL = ::WID_SCL_CLASS_RAIL, ///< Class rail.
- WID_SCL_CLASS_ROAD = ::WID_SCL_CLASS_ROAD, ///< Class road.
- WID_SCL_CLASS_SHIP = ::WID_SCL_CLASS_SHIP, ///< Class ship.
- WID_SCL_CLASS_AIRCRAFT = ::WID_SCL_CLASS_AIRCRAFT, ///< Class aircraft.
- WID_SCL_SPACER_DROPDOWN = ::WID_SCL_SPACER_DROPDOWN, ///< Spacer for dropdown.
- WID_SCL_PRI_COL_DROPDOWN = ::WID_SCL_PRI_COL_DROPDOWN, ///< Dropdown for primary colour.
- WID_SCL_SEC_COL_DROPDOWN = ::WID_SCL_SEC_COL_DROPDOWN, ///< Dropdown for secondary colour.
- WID_SCL_MATRIX = ::WID_SCL_MATRIX, ///< Matrix.
- };
-
- /**
- * Widgets of the #SelectCompanyManagerFaceWindow class.
- * Do not change the order of the widgets from WID_SCMF_HAS_MOUSTACHE_EARRING to WID_SCMF_GLASSES_R,
- * this order is needed for the WE_CLICK event of DrawFaceStringLabel().
- */
- enum SelectCompanyManagerFaceWidgets {
- WID_SCMF_CAPTION = ::WID_SCMF_CAPTION, ///< Caption of window.
- WID_SCMF_TOGGLE_LARGE_SMALL = ::WID_SCMF_TOGGLE_LARGE_SMALL, ///< Toggle for large or small.
- WID_SCMF_SELECT_FACE = ::WID_SCMF_SELECT_FACE, ///< Select face.
- WID_SCMF_CANCEL = ::WID_SCMF_CANCEL, ///< Cancel.
- WID_SCMF_ACCEPT = ::WID_SCMF_ACCEPT, ///< Accept.
- WID_SCMF_MALE = ::WID_SCMF_MALE, ///< Male button in the simple view.
- WID_SCMF_FEMALE = ::WID_SCMF_FEMALE, ///< Female button in the simple view.
- WID_SCMF_MALE2 = ::WID_SCMF_MALE2, ///< Male button in the advanced view.
- WID_SCMF_FEMALE2 = ::WID_SCMF_FEMALE2, ///< Female button in the advanced view.
- WID_SCMF_SEL_LOADSAVE = ::WID_SCMF_SEL_LOADSAVE, ///< Selection to display the load/save/number buttons in the advanced view.
- WID_SCMF_SEL_MALEFEMALE = ::WID_SCMF_SEL_MALEFEMALE, ///< Selection to display the male/female buttons in the simple view.
- WID_SCMF_SEL_PARTS = ::WID_SCMF_SEL_PARTS, ///< Selection to display the buttons for setting each part of the face in the advanced view.
- WID_SCMF_RANDOM_NEW_FACE = ::WID_SCMF_RANDOM_NEW_FACE, ///< Create random new face.
- WID_SCMF_TOGGLE_LARGE_SMALL_BUTTON = ::WID_SCMF_TOGGLE_LARGE_SMALL_BUTTON, ///< Toggle for large or small.
- WID_SCMF_FACE = ::WID_SCMF_FACE, ///< Current face.
- WID_SCMF_LOAD = ::WID_SCMF_LOAD, ///< Load face.
- WID_SCMF_FACECODE = ::WID_SCMF_FACECODE, ///< Get the face code.
- WID_SCMF_SAVE = ::WID_SCMF_SAVE, ///< Save face.
- WID_SCMF_HAS_MOUSTACHE_EARRING_TEXT = ::WID_SCMF_HAS_MOUSTACHE_EARRING_TEXT, ///< Text about moustache and earring.
- WID_SCMF_TIE_EARRING_TEXT = ::WID_SCMF_TIE_EARRING_TEXT, ///< Text about tie and earring.
- WID_SCMF_LIPS_MOUSTACHE_TEXT = ::WID_SCMF_LIPS_MOUSTACHE_TEXT, ///< Text about lips and moustache.
- WID_SCMF_HAS_GLASSES_TEXT = ::WID_SCMF_HAS_GLASSES_TEXT, ///< Text about glasses.
- WID_SCMF_HAIR_TEXT = ::WID_SCMF_HAIR_TEXT, ///< Text about hair.
- WID_SCMF_EYEBROWS_TEXT = ::WID_SCMF_EYEBROWS_TEXT, ///< Text about eyebrows.
- WID_SCMF_EYECOLOUR_TEXT = ::WID_SCMF_EYECOLOUR_TEXT, ///< Text about eyecolour.
- WID_SCMF_GLASSES_TEXT = ::WID_SCMF_GLASSES_TEXT, ///< Text about glasses.
- WID_SCMF_NOSE_TEXT = ::WID_SCMF_NOSE_TEXT, ///< Text about nose.
- WID_SCMF_CHIN_TEXT = ::WID_SCMF_CHIN_TEXT, ///< Text about chin.
- WID_SCMF_JACKET_TEXT = ::WID_SCMF_JACKET_TEXT, ///< Text about jacket.
- WID_SCMF_COLLAR_TEXT = ::WID_SCMF_COLLAR_TEXT, ///< Text about collar.
- WID_SCMF_ETHNICITY_EUR = ::WID_SCMF_ETHNICITY_EUR, ///< Text about ethnicity european.
- WID_SCMF_ETHNICITY_AFR = ::WID_SCMF_ETHNICITY_AFR, ///< Text about ethnicity african.
- WID_SCMF_HAS_MOUSTACHE_EARRING = ::WID_SCMF_HAS_MOUSTACHE_EARRING, ///< Has moustache or earring.
- WID_SCMF_HAS_GLASSES = ::WID_SCMF_HAS_GLASSES, ///< Has glasses.
- WID_SCMF_EYECOLOUR_L = ::WID_SCMF_EYECOLOUR_L, ///< Eyecolour left.
- WID_SCMF_EYECOLOUR = ::WID_SCMF_EYECOLOUR, ///< Eyecolour.
- WID_SCMF_EYECOLOUR_R = ::WID_SCMF_EYECOLOUR_R, ///< Eyecolour right.
- WID_SCMF_CHIN_L = ::WID_SCMF_CHIN_L, ///< Chin left.
- WID_SCMF_CHIN = ::WID_SCMF_CHIN, ///< Chin.
- WID_SCMF_CHIN_R = ::WID_SCMF_CHIN_R, ///< Chin right.
- WID_SCMF_EYEBROWS_L = ::WID_SCMF_EYEBROWS_L, ///< Eyebrows left.
- WID_SCMF_EYEBROWS = ::WID_SCMF_EYEBROWS, ///< Eyebrows.
- WID_SCMF_EYEBROWS_R = ::WID_SCMF_EYEBROWS_R, ///< Eyebrows right.
- WID_SCMF_LIPS_MOUSTACHE_L = ::WID_SCMF_LIPS_MOUSTACHE_L, ///< Lips / Moustache left.
- WID_SCMF_LIPS_MOUSTACHE = ::WID_SCMF_LIPS_MOUSTACHE, ///< Lips / Moustache.
- WID_SCMF_LIPS_MOUSTACHE_R = ::WID_SCMF_LIPS_MOUSTACHE_R, ///< Lips / Moustache right.
- WID_SCMF_NOSE_L = ::WID_SCMF_NOSE_L, ///< Nose left.
- WID_SCMF_NOSE = ::WID_SCMF_NOSE, ///< Nose.
- WID_SCMF_NOSE_R = ::WID_SCMF_NOSE_R, ///< Nose right.
- WID_SCMF_HAIR_L = ::WID_SCMF_HAIR_L, ///< Hair left.
- WID_SCMF_HAIR = ::WID_SCMF_HAIR, ///< Hair.
- WID_SCMF_HAIR_R = ::WID_SCMF_HAIR_R, ///< Hair right.
- WID_SCMF_JACKET_L = ::WID_SCMF_JACKET_L, ///< Jacket left.
- WID_SCMF_JACKET = ::WID_SCMF_JACKET, ///< Jacket.
- WID_SCMF_JACKET_R = ::WID_SCMF_JACKET_R, ///< Jacket right.
- WID_SCMF_COLLAR_L = ::WID_SCMF_COLLAR_L, ///< Collar left.
- WID_SCMF_COLLAR = ::WID_SCMF_COLLAR, ///< Collar.
- WID_SCMF_COLLAR_R = ::WID_SCMF_COLLAR_R, ///< Collar right.
- WID_SCMF_TIE_EARRING_L = ::WID_SCMF_TIE_EARRING_L, ///< Tie / Earring left.
- WID_SCMF_TIE_EARRING = ::WID_SCMF_TIE_EARRING, ///< Tie / Earring.
- WID_SCMF_TIE_EARRING_R = ::WID_SCMF_TIE_EARRING_R, ///< Tie / Earring right.
- WID_SCMF_GLASSES_L = ::WID_SCMF_GLASSES_L, ///< Glasses left.
- WID_SCMF_GLASSES = ::WID_SCMF_GLASSES, ///< Glasses.
- WID_SCMF_GLASSES_R = ::WID_SCMF_GLASSES_R, ///< Glasses right.
- };
-
- /** Widgets of the #CompanyInfrastructureWindow class. */
- enum CompanyInfrastructureWidgets {
- WID_CI_CAPTION = ::WID_CI_CAPTION, ///< Caption of window.
- WID_CI_RAIL_DESC = ::WID_CI_RAIL_DESC, ///< Description of rail.
- WID_CI_RAIL_COUNT = ::WID_CI_RAIL_COUNT, ///< Count of rail.
- WID_CI_ROAD_DESC = ::WID_CI_ROAD_DESC, ///< Description of road.
- WID_CI_ROAD_COUNT = ::WID_CI_ROAD_COUNT, ///< Count of road.
- WID_CI_WATER_DESC = ::WID_CI_WATER_DESC, ///< Description of water.
- WID_CI_WATER_COUNT = ::WID_CI_WATER_COUNT, ///< Count of water.
- WID_CI_STATION_DESC = ::WID_CI_STATION_DESC, ///< Description of station.
- WID_CI_STATION_COUNT = ::WID_CI_STATION_COUNT, ///< Count of station.
- WID_CI_TOTAL_DESC = ::WID_CI_TOTAL_DESC, ///< Description of total.
- WID_CI_TOTAL = ::WID_CI_TOTAL, ///< Count of total.
- };
-
- /** Widgets of the #BuyCompanyWindow class. */
- enum BuyCompanyWidgets {
- WID_BC_CAPTION = ::WID_BC_CAPTION, ///< Caption of window.
- WID_BC_FACE = ::WID_BC_FACE, ///< Face button.
- WID_BC_QUESTION = ::WID_BC_QUESTION, ///< Question text.
- WID_BC_NO = ::WID_BC_NO, ///< No button.
- WID_BC_YES = ::WID_BC_YES, ///< Yes button.
- };
-
- /* automatically generated from ../../widgets/console_widget.h */
- /** Widgets of the #IConsoleWindow class. */
- enum ConsoleWidgets {
- WID_C_BACKGROUND = ::WID_C_BACKGROUND, ///< Background of the console.
- };
-
- /* automatically generated from ../../widgets/date_widget.h */
- /** Widgets of the #SetDateWindow class. */
- enum SetDateWidgets {
- WID_SD_DAY = ::WID_SD_DAY, ///< Dropdown for the day.
- WID_SD_MONTH = ::WID_SD_MONTH, ///< Dropdown for the month.
- WID_SD_YEAR = ::WID_SD_YEAR, ///< Dropdown for the year.
- WID_SD_SET_DATE = ::WID_SD_SET_DATE, ///< Actually set the date.
- };
-
- /* automatically generated from ../../widgets/depot_widget.h */
- /** Widgets of the #DepotWindow class. */
- enum DepotWidgets {
- WID_D_CAPTION = ::WID_D_CAPTION, ///< Caption of window.
- WID_D_SELL = ::WID_D_SELL, ///< Sell button.
- WID_D_SHOW_SELL_CHAIN = ::WID_D_SHOW_SELL_CHAIN, ///< Show sell chain panel.
- WID_D_SELL_CHAIN = ::WID_D_SELL_CHAIN, ///< Sell chain button.
- WID_D_SELL_ALL = ::WID_D_SELL_ALL, ///< Sell all button.
- WID_D_AUTOREPLACE = ::WID_D_AUTOREPLACE, ///< Autoreplace button.
- WID_D_MATRIX = ::WID_D_MATRIX, ///< Matrix of vehicles.
- WID_D_V_SCROLL = ::WID_D_V_SCROLL, ///< Vertical scrollbar.
- WID_D_SHOW_H_SCROLL = ::WID_D_SHOW_H_SCROLL, ///< Show horizontal scrollbar panel.
- WID_D_H_SCROLL = ::WID_D_H_SCROLL, ///< Horizontal scrollbar.
- WID_D_BUILD = ::WID_D_BUILD, ///< Build button.
- WID_D_CLONE = ::WID_D_CLONE, ///< Clone button.
- WID_D_LOCATION = ::WID_D_LOCATION, ///< Location button.
- WID_D_SHOW_RENAME = ::WID_D_SHOW_RENAME, ///< Show rename panel.
- WID_D_RENAME = ::WID_D_RENAME, ///< Rename button.
- WID_D_VEHICLE_LIST = ::WID_D_VEHICLE_LIST, ///< List of vehicles.
- WID_D_STOP_ALL = ::WID_D_STOP_ALL, ///< Stop all button.
- WID_D_START_ALL = ::WID_D_START_ALL, ///< Start all button.
- };
-
- /* automatically generated from ../../widgets/dock_widget.h */
- /** Widgets of the #BuildDocksDepotWindow class. */
- enum BuildDockDepotWidgets {
- WID_BDD_BACKGROUND = ::WID_BDD_BACKGROUND, ///< Background of the window.
- WID_BDD_X = ::WID_BDD_X, ///< X-direction button.
- WID_BDD_Y = ::WID_BDD_Y, ///< Y-direction button.
- };
-
- /** Widgets of the #BuildDocksToolbarWindow class. */
- enum DockToolbarWidgets {
- WID_DT_CANAL = ::WID_DT_CANAL, ///< Build canal button.
- WID_DT_LOCK = ::WID_DT_LOCK, ///< Build lock button.
- WID_DT_DEMOLISH = ::WID_DT_DEMOLISH, ///< Demolish aka dynamite button.
- WID_DT_DEPOT = ::WID_DT_DEPOT, ///< Build depot button.
- WID_DT_STATION = ::WID_DT_STATION, ///< Build station button.
- WID_DT_BUOY = ::WID_DT_BUOY, ///< Build buoy button.
- WID_DT_RIVER = ::WID_DT_RIVER, ///< Build river button (in scenario editor).
- WID_DT_BUILD_AQUEDUCT = ::WID_DT_BUILD_AQUEDUCT, ///< Build aqueduct button.
-
- WID_DT_INVALID = ::WID_DT_INVALID, ///< Used to initialize a variable.
- };
-
- /* automatically generated from ../../widgets/dropdown_widget.h */
- /** Widgets of the #DropdownWindow class. */
- enum DropdownMenuWidgets {
- WID_DM_ITEMS = ::WID_DM_ITEMS, ///< Panel showing the dropdown items.
- WID_DM_SHOW_SCROLL = ::WID_DM_SHOW_SCROLL, ///< Hide scrollbar if too few items.
- WID_DM_SCROLL = ::WID_DM_SCROLL, ///< Scrollbar.
- };
-
- /* automatically generated from ../../widgets/engine_widget.h */
- /** Widgets of the #EnginePreviewWindow class. */
- enum EnginePreviewWidgets {
- WID_EP_QUESTION = ::WID_EP_QUESTION, ///< The container for the question.
- WID_EP_NO = ::WID_EP_NO, ///< No button.
- WID_EP_YES = ::WID_EP_YES, ///< Yes button.
- };
-
- /* automatically generated from ../../widgets/error_widget.h */
- /** Widgets of the #ErrmsgWindow class. */
- enum ErrorMessageWidgets {
- WID_EM_CAPTION = ::WID_EM_CAPTION, ///< Caption of the window.
- WID_EM_FACE = ::WID_EM_FACE, ///< Error title.
- WID_EM_MESSAGE = ::WID_EM_MESSAGE, ///< Error message.
- };
-
- /* automatically generated from ../../widgets/fios_widget.h */
- /** Widgets of the #SaveLoadWindow class. */
- enum SaveLoadWidgets {
- WID_SL_CAPTION = ::WID_SL_CAPTION, ///< Caption of the window.
- WID_SL_SORT_BYNAME = ::WID_SL_SORT_BYNAME, ///< Sort by name button.
- WID_SL_SORT_BYDATE = ::WID_SL_SORT_BYDATE, ///< Sort by date button.
- WID_SL_BACKGROUND = ::WID_SL_BACKGROUND, ///< Background of window.
- WID_SL_FILE_BACKGROUND = ::WID_SL_FILE_BACKGROUND, ///< Background of file selection.
- WID_SL_HOME_BUTTON = ::WID_SL_HOME_BUTTON, ///< Home button.
- WID_SL_DRIVES_DIRECTORIES_LIST = ::WID_SL_DRIVES_DIRECTORIES_LIST, ///< Drives list.
- WID_SL_SCROLLBAR = ::WID_SL_SCROLLBAR, ///< Scrollbar of the file list.
- WID_SL_CONTENT_DOWNLOAD = ::WID_SL_CONTENT_DOWNLOAD, ///< Content download button, only available for play scenario/heightmap.
- WID_SL_SAVE_OSK_TITLE = ::WID_SL_SAVE_OSK_TITLE, ///< Title textbox, only available for save operations.
- WID_SL_DELETE_SELECTION = ::WID_SL_DELETE_SELECTION, ///< Delete button, only available for save operations.
- WID_SL_SAVE_GAME = ::WID_SL_SAVE_GAME, ///< Save button, only available for save operations.
- WID_SL_CONTENT_DOWNLOAD_SEL = ::WID_SL_CONTENT_DOWNLOAD_SEL, ///< Selection 'stack' to 'hide' the content download.
- WID_SL_DETAILS = ::WID_SL_DETAILS, ///< Panel with game details.
- WID_SL_NEWGRF_INFO = ::WID_SL_NEWGRF_INFO, ///< Button to open NewGgrf configuration.
- WID_SL_LOAD_BUTTON = ::WID_SL_LOAD_BUTTON, ///< Button to load game/scenario.
- WID_SL_MISSING_NEWGRFS = ::WID_SL_MISSING_NEWGRFS, ///< Button to find missing NewGRFs online.
- };
-
- /* automatically generated from ../../widgets/genworld_widget.h */
- /** Widgets of the #GenerateLandscapeWindow class. */
- enum GenerateLandscapeWidgets {
- WID_GL_TEMPERATE = ::WID_GL_TEMPERATE, ///< Button with icon "Temperate".
- WID_GL_ARCTIC = ::WID_GL_ARCTIC, ///< Button with icon "Arctic".
- WID_GL_TROPICAL = ::WID_GL_TROPICAL, ///< Button with icon "Tropical".
- WID_GL_TOYLAND = ::WID_GL_TOYLAND, ///< Button with icon "Toyland".
-
- WID_GL_MAPSIZE_X_PULLDOWN = ::WID_GL_MAPSIZE_X_PULLDOWN, ///< Dropdown 'map X size'.
- WID_GL_MAPSIZE_Y_PULLDOWN = ::WID_GL_MAPSIZE_Y_PULLDOWN, ///< Dropdown 'map Y size'.
-
- WID_GL_TOWN_PULLDOWN = ::WID_GL_TOWN_PULLDOWN, ///< Dropdown 'No. of towns'.
- WID_GL_INDUSTRY_PULLDOWN = ::WID_GL_INDUSTRY_PULLDOWN, ///< Dropdown 'No. of industries'.
-
- WID_GL_RANDOM_EDITBOX = ::WID_GL_RANDOM_EDITBOX, ///< 'Random seed' editbox.
- WID_GL_RANDOM_BUTTON = ::WID_GL_RANDOM_BUTTON, ///< 'Randomise' button.
-
- WID_GL_GENERATE_BUTTON = ::WID_GL_GENERATE_BUTTON, ///< 'Generate' button.
-
- WID_GL_START_DATE_DOWN = ::WID_GL_START_DATE_DOWN, ///< Decrease start year.
- WID_GL_START_DATE_TEXT = ::WID_GL_START_DATE_TEXT, ///< Start year.
- WID_GL_START_DATE_UP = ::WID_GL_START_DATE_UP, ///< Increase start year.
-
- WID_GL_SNOW_LEVEL_DOWN = ::WID_GL_SNOW_LEVEL_DOWN, ///< Decrease snow level.
- WID_GL_SNOW_LEVEL_TEXT = ::WID_GL_SNOW_LEVEL_TEXT, ///< Snow level.
- WID_GL_SNOW_LEVEL_UP = ::WID_GL_SNOW_LEVEL_UP, ///< Increase snow level.
-
- WID_GL_TREE_PULLDOWN = ::WID_GL_TREE_PULLDOWN, ///< Dropdown 'Tree algorithm'.
- WID_GL_LANDSCAPE_PULLDOWN = ::WID_GL_LANDSCAPE_PULLDOWN, ///< Dropdown 'Land generator'.
-
- WID_GL_HEIGHTMAP_NAME_TEXT = ::WID_GL_HEIGHTMAP_NAME_TEXT, ///< Heightmap name.
- WID_GL_HEIGHTMAP_SIZE_TEXT = ::WID_GL_HEIGHTMAP_SIZE_TEXT, ///< Size of heightmap.
- WID_GL_HEIGHTMAP_ROTATION_PULLDOWN = ::WID_GL_HEIGHTMAP_ROTATION_PULLDOWN, ///< Dropdown 'Heightmap rotation'.
-
- WID_GL_TERRAIN_PULLDOWN = ::WID_GL_TERRAIN_PULLDOWN, ///< Dropdown 'Terrain type'.
- WID_GL_WATER_PULLDOWN = ::WID_GL_WATER_PULLDOWN, ///< Dropdown 'Sea level'.
- WID_GL_RIVER_PULLDOWN = ::WID_GL_RIVER_PULLDOWN, ///< Dropdown 'Rivers'.
- WID_GL_SMOOTHNESS_PULLDOWN = ::WID_GL_SMOOTHNESS_PULLDOWN, ///< Dropdown 'Smoothness'.
- WID_GL_VARIETY_PULLDOWN = ::WID_GL_VARIETY_PULLDOWN, ///< Dropdown 'Variety distribution'.
-
- WID_GL_BORDERS_RANDOM = ::WID_GL_BORDERS_RANDOM, ///< 'Random'/'Manual' borders.
- WID_GL_WATER_NW = ::WID_GL_WATER_NW, ///< NW 'Water'/'Freeform'.
- WID_GL_WATER_NE = ::WID_GL_WATER_NE, ///< NE 'Water'/'Freeform'.
- WID_GL_WATER_SE = ::WID_GL_WATER_SE, ///< SE 'Water'/'Freeform'.
- WID_GL_WATER_SW = ::WID_GL_WATER_SW, ///< SW 'Water'/'Freeform'.
- };
-
- /** Widgets of the #CreateScenarioWindow class. */
- enum CreateScenarioWidgets {
- WID_CS_TEMPERATE = ::WID_CS_TEMPERATE, ///< Select temperate landscape style.
- WID_CS_ARCTIC = ::WID_CS_ARCTIC, ///< Select arctic landscape style.
- WID_CS_TROPICAL = ::WID_CS_TROPICAL, ///< Select tropical landscape style.
- WID_CS_TOYLAND = ::WID_CS_TOYLAND, ///< Select toy-land landscape style.
- WID_CS_EMPTY_WORLD = ::WID_CS_EMPTY_WORLD, ///< Generate an empty flat world.
- WID_CS_RANDOM_WORLD = ::WID_CS_RANDOM_WORLD, ///< Generate random land button
- WID_CS_MAPSIZE_X_PULLDOWN = ::WID_CS_MAPSIZE_X_PULLDOWN, ///< Pull-down arrow for x map size.
- WID_CS_MAPSIZE_Y_PULLDOWN = ::WID_CS_MAPSIZE_Y_PULLDOWN, ///< Pull-down arrow for y map size.
- WID_CS_START_DATE_DOWN = ::WID_CS_START_DATE_DOWN, ///< Decrease start year (start earlier).
- WID_CS_START_DATE_TEXT = ::WID_CS_START_DATE_TEXT, ///< Clickable start date value.
- WID_CS_START_DATE_UP = ::WID_CS_START_DATE_UP, ///< Increase start year (start later).
- WID_CS_FLAT_LAND_HEIGHT_DOWN = ::WID_CS_FLAT_LAND_HEIGHT_DOWN, ///< Decrease flat land height.
- WID_CS_FLAT_LAND_HEIGHT_TEXT = ::WID_CS_FLAT_LAND_HEIGHT_TEXT, ///< Clickable flat land height value.
- WID_CS_FLAT_LAND_HEIGHT_UP = ::WID_CS_FLAT_LAND_HEIGHT_UP, ///< Increase flat land height.
- };
-
- /** Widgets of the #GenerateProgressWindow class. */
- enum GenerationProgressWidgets {
- WID_GP_PROGRESS_BAR = ::WID_GP_PROGRESS_BAR, ///< Progress bar.
- WID_GP_PROGRESS_TEXT = ::WID_GP_PROGRESS_TEXT, ///< Text with the progress bar.
- WID_GP_ABORT = ::WID_GP_ABORT, ///< Abort button.
- };
-
- /* automatically generated from ../../widgets/goal_widget.h */
- /** Widgets of the #GoalListWindow class. */
- enum GoalListWidgets {
- WID_GOAL_CAPTION = ::WID_GOAL_CAPTION, ///< Caption of the window.
- WID_GOAL_LIST = ::WID_GOAL_LIST, ///< Goal list.
- WID_GOAL_SCROLLBAR = ::WID_GOAL_SCROLLBAR, ///< Scrollbar of the goal list.
- };
-
- /** Widgets of the #GoalQuestionWindow class. */
- enum GoalQuestionWidgets {
- WID_GQ_CAPTION = ::WID_GQ_CAPTION, ///< Caption of the window.
- WID_GQ_QUESTION = ::WID_GQ_QUESTION, ///< Question text.
- WID_GQ_BUTTONS = ::WID_GQ_BUTTONS, ///< Buttons selection (between 1, 2 or 3).
- WID_GQ_BUTTON_1 = ::WID_GQ_BUTTON_1, ///< First button.
- WID_GQ_BUTTON_2 = ::WID_GQ_BUTTON_2, ///< Second button.
- WID_GQ_BUTTON_3 = ::WID_GQ_BUTTON_3, ///< Third button.
- };
-
- /* automatically generated from ../../widgets/graph_widget.h */
- /** Widgets of the #GraphLegendWindow class. */
- enum GraphLegendWidgets {
- WID_GL_BACKGROUND = ::WID_GL_BACKGROUND, ///< Background of the window.
-
- WID_GL_FIRST_COMPANY = ::WID_GL_FIRST_COMPANY, ///< First company in the legend.
- WID_GL_LAST_COMPANY = ::WID_GL_LAST_COMPANY, ///< Last company in the legend.
- };
-
- /** Widgets of the #OperatingProfitGraphWindow class, #IncomeGraphWindow class, #DeliveredCargoGraphWindow class, and #CompanyValueGraphWindow class. */
- enum CompanyValueWidgets {
- WID_CV_KEY_BUTTON = ::WID_CV_KEY_BUTTON, ///< Key button.
- WID_CV_BACKGROUND = ::WID_CV_BACKGROUND, ///< Background of the window.
- WID_CV_GRAPH = ::WID_CV_GRAPH, ///< Graph itself.
- WID_CV_RESIZE = ::WID_CV_RESIZE, ///< Resize button.
- };
-
- /** Widget of the #PerformanceHistoryGraphWindow class. */
- enum PerformanceHistoryGraphWidgets {
- WID_PHG_KEY = ::WID_PHG_KEY, ///< Key button.
- WID_PHG_DETAILED_PERFORMANCE = ::WID_PHG_DETAILED_PERFORMANCE, ///< Detailed performance.
- WID_PHG_BACKGROUND = ::WID_PHG_BACKGROUND, ///< Background of the window.
- WID_PHG_GRAPH = ::WID_PHG_GRAPH, ///< Graph itself.
- WID_PHG_RESIZE = ::WID_PHG_RESIZE, ///< Resize button.
- };
-
- /** Widget of the #PaymentRatesGraphWindow class. */
- enum CargoPaymentRatesWidgets {
- WID_CPR_BACKGROUND = ::WID_CPR_BACKGROUND, ///< Background of the window.
- WID_CPR_HEADER = ::WID_CPR_HEADER, ///< Header.
- WID_CPR_GRAPH = ::WID_CPR_GRAPH, ///< Graph itself.
- WID_CPR_RESIZE = ::WID_CPR_RESIZE, ///< Resize button.
- WID_CPR_FOOTER = ::WID_CPR_FOOTER, ///< Footer.
- WID_CPR_ENABLE_CARGOES = ::WID_CPR_ENABLE_CARGOES, ///< Enable cargoes button.
- WID_CPR_DISABLE_CARGOES = ::WID_CPR_DISABLE_CARGOES, ///< Disable cargoes button.
- WID_CPR_CARGO_FIRST = ::WID_CPR_CARGO_FIRST, ///< First cargo in the list.
- };
-
- /** Widget of the #CompanyLeagueWindow class. */
- enum CompanyLeagueWidgets {
- WID_CL_BACKGROUND = ::WID_CL_BACKGROUND, ///< Background of the window.
- };
-
- /** Widget of the #PerformanceRatingDetailWindow class. */
- enum PerformanceRatingDetailsWidgets {
- WID_PRD_SCORE_FIRST = ::WID_PRD_SCORE_FIRST, ///< First entry in the score list.
- WID_PRD_SCORE_LAST = ::WID_PRD_SCORE_LAST, ///< Last entry in the score list.
-
- WID_PRD_COMPANY_FIRST = ::WID_PRD_COMPANY_FIRST, ///< First company.
- WID_PRD_COMPANY_LAST = ::WID_PRD_COMPANY_LAST, ///< Last company.
- };
-
- /* automatically generated from ../../widgets/group_widget.h */
- /** Widgets of the #VehicleGroupWindow class. */
- enum GroupListWidgets {
- WID_GL_CAPTION = ::WID_GL_CAPTION, ///< Caption of the window.
- WID_GL_SORT_BY_ORDER = ::WID_GL_SORT_BY_ORDER, ///< Sort order.
- WID_GL_SORT_BY_DROPDOWN = ::WID_GL_SORT_BY_DROPDOWN, ///< Sort by dropdown list.
- WID_GL_LIST_VEHICLE = ::WID_GL_LIST_VEHICLE, ///< List of the vehicles.
- WID_GL_LIST_VEHICLE_SCROLLBAR = ::WID_GL_LIST_VEHICLE_SCROLLBAR, ///< Scrollbar for the list.
- WID_GL_AVAILABLE_VEHICLES = ::WID_GL_AVAILABLE_VEHICLES, ///< Available vehicles.
- WID_GL_MANAGE_VEHICLES_DROPDOWN = ::WID_GL_MANAGE_VEHICLES_DROPDOWN, ///< Manage vehicles dropdown list.
- WID_GL_STOP_ALL = ::WID_GL_STOP_ALL, ///< Stop all button.
- WID_GL_START_ALL = ::WID_GL_START_ALL, ///< Start all button.
-
- WID_GL_ALL_VEHICLES = ::WID_GL_ALL_VEHICLES, ///< All vehicles entry.
- WID_GL_DEFAULT_VEHICLES = ::WID_GL_DEFAULT_VEHICLES, ///< Default vehicles entry.
- WID_GL_LIST_GROUP = ::WID_GL_LIST_GROUP, ///< List of the groups.
- WID_GL_LIST_GROUP_SCROLLBAR = ::WID_GL_LIST_GROUP_SCROLLBAR, ///< Scrollbar for the list.
- WID_GL_CREATE_GROUP = ::WID_GL_CREATE_GROUP, ///< Create group button.
- WID_GL_DELETE_GROUP = ::WID_GL_DELETE_GROUP, ///< Delete group button.
- WID_GL_RENAME_GROUP = ::WID_GL_RENAME_GROUP, ///< Rename group button.
- WID_GL_REPLACE_PROTECTION = ::WID_GL_REPLACE_PROTECTION, ///< Replace protection button.
- };
-
- /* automatically generated from ../../widgets/highscore_widget.h */
- /** Widgets of the #EndGameHighScoreBaseWindow class and #HighScoreWindow class. */
- enum HighscoreWidgets {
- WID_H_BACKGROUND = ::WID_H_BACKGROUND, ///< Background of the window.
- };
-
- /* automatically generated from ../../widgets/industry_widget.h */
- /** Widgets of the #BuildIndustryWindow class. */
- enum DynamicPlaceIndustriesWidgets {
- WID_DPI_MATRIX_WIDGET = ::WID_DPI_MATRIX_WIDGET, ///< Matrix of the industries.
- WID_DPI_SCROLLBAR = ::WID_DPI_SCROLLBAR, ///< Scrollbar of the matrix.
- WID_DPI_INFOPANEL = ::WID_DPI_INFOPANEL, ///< Info panel about the industry.
- WID_DPI_DISPLAY_WIDGET = ::WID_DPI_DISPLAY_WIDGET, ///< Display chain button.
- WID_DPI_FUND_WIDGET = ::WID_DPI_FUND_WIDGET, ///< Fund button.
- };
-
- /** Widgets of the #IndustryViewWindow class. */
- enum IndustryViewWidgets {
- WID_IV_CAPTION = ::WID_IV_CAPTION, ///< Caption of the window.
- WID_IV_VIEWPORT = ::WID_IV_VIEWPORT, ///< Viewport of the industry.
- WID_IV_INFO = ::WID_IV_INFO, ///< Info of the industry.
- WID_IV_GOTO = ::WID_IV_GOTO, ///< Goto button.
- WID_IV_DISPLAY = ::WID_IV_DISPLAY, ///< Display chain button.
- };
-
- /** Widgets of the #IndustryDirectoryWindow class. */
- enum IndustryDirectoryWidgets {
- WID_ID_DROPDOWN_ORDER = ::WID_ID_DROPDOWN_ORDER, ///< Dropdown for the order of the sort.
- WID_ID_DROPDOWN_CRITERIA = ::WID_ID_DROPDOWN_CRITERIA, ///< Dropdown for the criteria of the sort.
- WID_ID_INDUSTRY_LIST = ::WID_ID_INDUSTRY_LIST, ///< Industry list.
- WID_ID_SCROLLBAR = ::WID_ID_SCROLLBAR, ///< Scrollbar of the list.
- };
-
- /** Widgets of the #IndustryCargoesWindow class */
- enum IndustryCargoesWidgets {
- WID_IC_CAPTION = ::WID_IC_CAPTION, ///< Caption of the window.
- WID_IC_NOTIFY = ::WID_IC_NOTIFY, ///< Row of buttons at the bottom.
- WID_IC_PANEL = ::WID_IC_PANEL, ///< Panel that shows the chain.
- WID_IC_SCROLLBAR = ::WID_IC_SCROLLBAR, ///< Scrollbar of the panel.
- WID_IC_CARGO_DROPDOWN = ::WID_IC_CARGO_DROPDOWN, ///< Select cargo dropdown.
- WID_IC_IND_DROPDOWN = ::WID_IC_IND_DROPDOWN, ///< Select industry dropdown.
- };
-
- /* automatically generated from ../../widgets/intro_widget.h */
- /** Widgets of the #SelectGameWindow class. */
- enum SelectGameIntroWidgets {
- WID_SGI_GENERATE_GAME = ::WID_SGI_GENERATE_GAME, ///< Generate game button.
- WID_SGI_LOAD_GAME = ::WID_SGI_LOAD_GAME, ///< Load game button.
- WID_SGI_PLAY_SCENARIO = ::WID_SGI_PLAY_SCENARIO, ///< Play scenario button.
- WID_SGI_PLAY_HEIGHTMAP = ::WID_SGI_PLAY_HEIGHTMAP, ///< Play heightmap button.
- WID_SGI_EDIT_SCENARIO = ::WID_SGI_EDIT_SCENARIO, ///< Edit scenario button.
- WID_SGI_PLAY_NETWORK = ::WID_SGI_PLAY_NETWORK, ///< Play network button.
- WID_SGI_TEMPERATE_LANDSCAPE = ::WID_SGI_TEMPERATE_LANDSCAPE, ///< Select temperate landscape button.
- WID_SGI_ARCTIC_LANDSCAPE = ::WID_SGI_ARCTIC_LANDSCAPE, ///< Select arctic landscape button.
- WID_SGI_TROPIC_LANDSCAPE = ::WID_SGI_TROPIC_LANDSCAPE, ///< Select tropic landscape button.
- WID_SGI_TOYLAND_LANDSCAPE = ::WID_SGI_TOYLAND_LANDSCAPE, ///< Select toyland landscape button.
- WID_SGI_TRANSLATION_SELECTION = ::WID_SGI_TRANSLATION_SELECTION, ///< Translation selection.
- WID_SGI_TRANSLATION = ::WID_SGI_TRANSLATION, ///< Translation.
- WID_SGI_OPTIONS = ::WID_SGI_OPTIONS, ///< Options button.
- WID_SGI_HIGHSCORE = ::WID_SGI_HIGHSCORE, ///< Highscore button.
- WID_SGI_SETTINGS_OPTIONS = ::WID_SGI_SETTINGS_OPTIONS, ///< Settings button.
- WID_SGI_GRF_SETTINGS = ::WID_SGI_GRF_SETTINGS, ///< NewGRF button.
- WID_SGI_CONTENT_DOWNLOAD = ::WID_SGI_CONTENT_DOWNLOAD, ///< Content Download button.
- WID_SGI_AI_SETTINGS = ::WID_SGI_AI_SETTINGS, ///< AI button.
- WID_SGI_EXIT = ::WID_SGI_EXIT, ///< Exit button.
- };
-
- /* automatically generated from ../../widgets/link_graph_legend_widget.h */
- /** Widgets of the WC_LINKGRAPH_LEGEND. */
- enum LinkGraphLegendWidgets {
- WID_LGL_CAPTION = ::WID_LGL_CAPTION, ///< Caption widget.
- WID_LGL_SATURATION = ::WID_LGL_SATURATION, ///< Saturation legend.
- WID_LGL_SATURATION_FIRST = ::WID_LGL_SATURATION_FIRST,
- WID_LGL_SATURATION_LAST = ::WID_LGL_SATURATION_LAST,
- WID_LGL_COMPANIES = ::WID_LGL_COMPANIES, ///< Company selection widget.
- WID_LGL_COMPANY_FIRST = ::WID_LGL_COMPANY_FIRST,
- WID_LGL_COMPANY_LAST = ::WID_LGL_COMPANY_LAST,
- WID_LGL_COMPANIES_ALL = ::WID_LGL_COMPANIES_ALL,
- WID_LGL_COMPANIES_NONE = ::WID_LGL_COMPANIES_NONE,
- WID_LGL_CARGOES = ::WID_LGL_CARGOES, ///< Cargo selection widget.
- WID_LGL_CARGO_FIRST = ::WID_LGL_CARGO_FIRST,
- WID_LGL_CARGO_LAST = ::WID_LGL_CARGO_LAST,
- WID_LGL_CARGOES_ALL = ::WID_LGL_CARGOES_ALL,
- WID_LGL_CARGOES_NONE = ::WID_LGL_CARGOES_NONE,
- };
-
- /* automatically generated from ../../widgets/main_widget.h */
- /** Widgets of the #MainWindow class. */
- enum MainWidgets {
- WID_M_VIEWPORT = ::WID_M_VIEWPORT, ///< Main window viewport.
- };
-
- /* automatically generated from ../../widgets/misc_widget.h */
- /** Widgets of the #LandInfoWindow class. */
- enum LandInfoWidgets {
- WID_LI_BACKGROUND = ::WID_LI_BACKGROUND, ///< Background of the window.
- };
-
- /** Widgets of the #TooltipsWindow class. */
- enum ToolTipsWidgets {
- WID_TT_BACKGROUND = ::WID_TT_BACKGROUND, ///< Background of the window.
- };
-
- /** Widgets of the #AboutWindow class. */
- enum AboutWidgets {
- WID_A_SCROLLING_TEXT = ::WID_A_SCROLLING_TEXT, ///< The actually scrolling text.
- WID_A_WEBSITE = ::WID_A_WEBSITE, ///< URL of OpenTTD website.
- };
-
- /** Widgets of the #QueryStringWindow class. */
- enum QueryStringWidgets {
- WID_QS_CAPTION = ::WID_QS_CAPTION, ///< Caption of the window.
- WID_QS_TEXT = ::WID_QS_TEXT, ///< Text of the query.
- WID_QS_DEFAULT = ::WID_QS_DEFAULT, ///< Default button.
- WID_QS_CANCEL = ::WID_QS_CANCEL, ///< Cancel button.
- WID_QS_OK = ::WID_QS_OK, ///< OK button.
- };
-
- /** Widgets of the #QueryWindow class. */
- enum QueryWidgets {
- WID_Q_CAPTION = ::WID_Q_CAPTION, ///< Caption of the window.
- WID_Q_TEXT = ::WID_Q_TEXT, ///< Text of the query.
- WID_Q_NO = ::WID_Q_NO, ///< Yes button.
- WID_Q_YES = ::WID_Q_YES, ///< No button.
- };
-
- /** Widgets of the #TextfileWindow class. */
- enum TextfileWidgets {
- WID_TF_CAPTION = ::WID_TF_CAPTION, ///< The caption of the window.
- WID_TF_WRAPTEXT = ::WID_TF_WRAPTEXT, ///< Whether or not to wrap the text.
- WID_TF_BACKGROUND = ::WID_TF_BACKGROUND, ///< Panel to draw the textfile on.
- WID_TF_VSCROLLBAR = ::WID_TF_VSCROLLBAR, ///< Vertical scrollbar to scroll through the textfile up-and-down.
- WID_TF_HSCROLLBAR = ::WID_TF_HSCROLLBAR, ///< Horizontal scrollbar to scroll through the textfile left-to-right.
- };
-
- /* automatically generated from ../../widgets/music_widget.h */
- /** Widgets of the #MusicTrackSelectionWindow class. */
- enum MusicTrackSelectionWidgets {
- WID_MTS_LIST_LEFT = ::WID_MTS_LIST_LEFT, ///< Left list.
- WID_MTS_LEFT_SCROLLBAR = ::WID_MTS_LEFT_SCROLLBAR, ///< Scrollbar of left list.
- WID_MTS_PLAYLIST = ::WID_MTS_PLAYLIST, ///< Playlist name.
- WID_MTS_LIST_RIGHT = ::WID_MTS_LIST_RIGHT, ///< Right list.
- WID_MTS_RIGHT_SCROLLBAR = ::WID_MTS_RIGHT_SCROLLBAR, ///< Scrollbar of right list.
- WID_MTS_ALL = ::WID_MTS_ALL, ///< All button.
- WID_MTS_OLD = ::WID_MTS_OLD, ///< Old button.
- WID_MTS_NEW = ::WID_MTS_NEW, ///< New button.
- WID_MTS_EZY = ::WID_MTS_EZY, ///< Ezy button.
- WID_MTS_CUSTOM1 = ::WID_MTS_CUSTOM1, ///< Custom1 button.
- WID_MTS_CUSTOM2 = ::WID_MTS_CUSTOM2, ///< Custom2 button.
- WID_MTS_CLEAR = ::WID_MTS_CLEAR, ///< Clear button.
- };
-
- /** Widgets of the #MusicWindow class. */
- enum MusicWidgets {
- WID_M_PREV = ::WID_M_PREV, ///< Previous button.
- WID_M_NEXT = ::WID_M_NEXT, ///< Next button.
- WID_M_STOP = ::WID_M_STOP, ///< Stop button.
- WID_M_PLAY = ::WID_M_PLAY, ///< Play button.
- WID_M_SLIDERS = ::WID_M_SLIDERS, ///< Sliders.
- WID_M_MUSIC_VOL = ::WID_M_MUSIC_VOL, ///< Music volume.
- WID_M_EFFECT_VOL = ::WID_M_EFFECT_VOL, ///< Effect volume.
- WID_M_BACKGROUND = ::WID_M_BACKGROUND, ///< Background of the window.
- WID_M_TRACK = ::WID_M_TRACK, ///< Track playing.
- WID_M_TRACK_NR = ::WID_M_TRACK_NR, ///< Track number.
- WID_M_TRACK_TITLE = ::WID_M_TRACK_TITLE, ///< Track title.
- WID_M_TRACK_NAME = ::WID_M_TRACK_NAME, ///< Track name.
- WID_M_SHUFFLE = ::WID_M_SHUFFLE, ///< Shuffle button.
- WID_M_PROGRAMME = ::WID_M_PROGRAMME, ///< Program button.
- WID_M_ALL = ::WID_M_ALL, ///< All button.
- WID_M_OLD = ::WID_M_OLD, ///< Old button.
- WID_M_NEW = ::WID_M_NEW, ///< New button.
- WID_M_EZY = ::WID_M_EZY, ///< Ezy button.
- WID_M_CUSTOM1 = ::WID_M_CUSTOM1, ///< Custom1 button.
- WID_M_CUSTOM2 = ::WID_M_CUSTOM2, ///< Custom2 button.
- };
-
- /* automatically generated from ../../widgets/network_chat_widget.h */
- /** Widgets of the #NetworkChatWindow class. */
- enum NetWorkChatWidgets {
- WID_NC_CLOSE = ::WID_NC_CLOSE, ///< Close button.
- WID_NC_BACKGROUND = ::WID_NC_BACKGROUND, ///< Background of the window.
- WID_NC_DESTINATION = ::WID_NC_DESTINATION, ///< Destination.
- WID_NC_TEXTBOX = ::WID_NC_TEXTBOX, ///< Textbox.
- WID_NC_SENDBUTTON = ::WID_NC_SENDBUTTON, ///< Send button.
- };
-
- /* automatically generated from ../../widgets/network_content_widget.h */
- /** Widgets of the #NetworkContentDownloadStatusWindow class. */
- enum NetworkContentDownloadStatusWidgets {
- WID_NCDS_BACKGROUND = ::WID_NCDS_BACKGROUND, ///< Background of the window.
- WID_NCDS_CANCELOK = ::WID_NCDS_CANCELOK, ///< (Optional) Cancel/OK button.
- };
-
- /** Widgets of the #NetworkContentListWindow class. */
- enum NetworkContentListWidgets {
- WID_NCL_BACKGROUND = ::WID_NCL_BACKGROUND, ///< Resize button.
-
- WID_NCL_FILTER_CAPT = ::WID_NCL_FILTER_CAPT, ///< Caption for the filter editbox.
- WID_NCL_FILTER = ::WID_NCL_FILTER, ///< Filter editbox.
-
- WID_NCL_CHECKBOX = ::WID_NCL_CHECKBOX, ///< Button above checkboxes.
- WID_NCL_TYPE = ::WID_NCL_TYPE, ///< 'Type' button.
- WID_NCL_NAME = ::WID_NCL_NAME, ///< 'Name' button.
-
- WID_NCL_MATRIX = ::WID_NCL_MATRIX, ///< Panel with list of content.
- WID_NCL_SCROLLBAR = ::WID_NCL_SCROLLBAR, ///< Scrollbar of matrix.
-
- WID_NCL_DETAILS = ::WID_NCL_DETAILS, ///< Panel with content details.
- WID_NCL_TEXTFILE = ::WID_NCL_TEXTFILE, ///< Open readme, changelog (+1) or license (+2) of a file in the content window.
-
- WID_NCL_SELECT_ALL = ::WID_NCL_SELECT_ALL, ///< 'Select all' button.
- WID_NCL_SELECT_UPDATE = ::WID_NCL_SELECT_UPDATE, ///< 'Select updates' button.
- WID_NCL_UNSELECT = ::WID_NCL_UNSELECT, ///< 'Unselect all' button.
- WID_NCL_OPEN_URL = ::WID_NCL_OPEN_URL, ///< 'Open url' button.
- WID_NCL_CANCEL = ::WID_NCL_CANCEL, ///< 'Cancel' button.
- WID_NCL_DOWNLOAD = ::WID_NCL_DOWNLOAD, ///< 'Download' button.
-
- WID_NCL_SEL_ALL_UPDATE = ::WID_NCL_SEL_ALL_UPDATE, ///< #NWID_SELECTION widget for select all/update buttons..
- WID_NCL_SEARCH_EXTERNAL = ::WID_NCL_SEARCH_EXTERNAL, ///< Search external sites for missing NewGRF.
- };
-
- /* automatically generated from ../../widgets/network_widget.h */
- /** Widgets of the #NetworkGameWindow class. */
- enum NetworkGameWidgets {
- WID_NG_MAIN = ::WID_NG_MAIN, ///< Main panel.
-
- WID_NG_CONNECTION = ::WID_NG_CONNECTION, ///< Label in front of connection droplist.
- WID_NG_CONN_BTN = ::WID_NG_CONN_BTN, ///< 'Connection' droplist button.
- WID_NG_CLIENT_LABEL = ::WID_NG_CLIENT_LABEL, ///< Label in front of client name edit box.
- WID_NG_CLIENT = ::WID_NG_CLIENT, ///< Panel with editbox to set client name.
- WID_NG_FILTER_LABEL = ::WID_NG_FILTER_LABEL, ///< Label in front of the filter/search edit box.
- WID_NG_FILTER = ::WID_NG_FILTER, ///< Panel with the edit box to enter the search text.
-
- WID_NG_HEADER = ::WID_NG_HEADER, ///< Header container of the matrix.
- WID_NG_NAME = ::WID_NG_NAME, ///< 'Name' button.
- WID_NG_CLIENTS = ::WID_NG_CLIENTS, ///< 'Clients' button.
- WID_NG_MAPSIZE = ::WID_NG_MAPSIZE, ///< 'Map size' button.
- WID_NG_DATE = ::WID_NG_DATE, ///< 'Date' button.
- WID_NG_YEARS = ::WID_NG_YEARS, ///< 'Years' button.
- WID_NG_INFO = ::WID_NG_INFO, ///< Third button in the game list panel.
-
- WID_NG_MATRIX = ::WID_NG_MATRIX, ///< Panel with list of games.
- WID_NG_SCROLLBAR = ::WID_NG_SCROLLBAR, ///< Scrollbar of matrix.
-
- WID_NG_LASTJOINED_LABEL = ::WID_NG_LASTJOINED_LABEL, ///< Label "Last joined server:".
- WID_NG_LASTJOINED = ::WID_NG_LASTJOINED, ///< Info about the last joined server.
- WID_NG_LASTJOINED_SPACER = ::WID_NG_LASTJOINED_SPACER, ///< Spacer after last joined server panel.
-
- WID_NG_DETAILS = ::WID_NG_DETAILS, ///< Panel with game details.
- WID_NG_DETAILS_SPACER = ::WID_NG_DETAILS_SPACER, ///< Spacer for game actual details.
- WID_NG_JOIN = ::WID_NG_JOIN, ///< 'Join game' button.
- WID_NG_REFRESH = ::WID_NG_REFRESH, ///< 'Refresh server' button.
- WID_NG_NEWGRF = ::WID_NG_NEWGRF, ///< 'NewGRF Settings' button.
- WID_NG_NEWGRF_SEL = ::WID_NG_NEWGRF_SEL, ///< Selection 'widget' to hide the NewGRF settings.
- WID_NG_NEWGRF_MISSING = ::WID_NG_NEWGRF_MISSING, ///< 'Find missing NewGRF online' button.
- WID_NG_NEWGRF_MISSING_SEL = ::WID_NG_NEWGRF_MISSING_SEL, ///< Selection widget for the above button.
-
- WID_NG_FIND = ::WID_NG_FIND, ///< 'Find server' button.
- WID_NG_ADD = ::WID_NG_ADD, ///< 'Add server' button.
- WID_NG_START = ::WID_NG_START, ///< 'Start server' button.
- WID_NG_CANCEL = ::WID_NG_CANCEL, ///< 'Cancel' button.
- };
-
- /** Widgets of the #NetworkStartServerWindow class. */
- enum NetworkStartServerWidgets {
- WID_NSS_BACKGROUND = ::WID_NSS_BACKGROUND, ///< Background of the window.
- WID_NSS_GAMENAME_LABEL = ::WID_NSS_GAMENAME_LABEL, ///< Label for the game name.
- WID_NSS_GAMENAME = ::WID_NSS_GAMENAME, ///< Background for editbox to set game name.
- WID_NSS_SETPWD = ::WID_NSS_SETPWD, ///< 'Set password' button.
- WID_NSS_CONNTYPE_LABEL = ::WID_NSS_CONNTYPE_LABEL, ///< Label for 'connection type'.
- WID_NSS_CONNTYPE_BTN = ::WID_NSS_CONNTYPE_BTN, ///< 'Connection type' droplist button.
- WID_NSS_CLIENTS_LABEL = ::WID_NSS_CLIENTS_LABEL, ///< Label for 'max clients'.
- WID_NSS_CLIENTS_BTND = ::WID_NSS_CLIENTS_BTND, ///< 'Max clients' downarrow.
- WID_NSS_CLIENTS_TXT = ::WID_NSS_CLIENTS_TXT, ///< 'Max clients' text.
- WID_NSS_CLIENTS_BTNU = ::WID_NSS_CLIENTS_BTNU, ///< 'Max clients' uparrow.
- WID_NSS_COMPANIES_LABEL = ::WID_NSS_COMPANIES_LABEL, ///< Label for 'max companies'.
- WID_NSS_COMPANIES_BTND = ::WID_NSS_COMPANIES_BTND, ///< 'Max companies' downarrow.
- WID_NSS_COMPANIES_TXT = ::WID_NSS_COMPANIES_TXT, ///< 'Max companies' text.
- WID_NSS_COMPANIES_BTNU = ::WID_NSS_COMPANIES_BTNU, ///< 'Max companies' uparrow.
- WID_NSS_SPECTATORS_LABEL = ::WID_NSS_SPECTATORS_LABEL, ///< Label for 'max spectators'.
- WID_NSS_SPECTATORS_BTND = ::WID_NSS_SPECTATORS_BTND, ///< 'Max spectators' downarrow.
- WID_NSS_SPECTATORS_TXT = ::WID_NSS_SPECTATORS_TXT, ///< 'Max spectators' text.
- WID_NSS_SPECTATORS_BTNU = ::WID_NSS_SPECTATORS_BTNU, ///< 'Max spectators' uparrow.
-
- WID_NSS_LANGUAGE_LABEL = ::WID_NSS_LANGUAGE_LABEL, ///< Label for 'language spoken'.
- WID_NSS_LANGUAGE_BTN = ::WID_NSS_LANGUAGE_BTN, ///< 'Language spoken' droplist button.
-
- WID_NSS_GENERATE_GAME = ::WID_NSS_GENERATE_GAME, ///< New game button.
- WID_NSS_LOAD_GAME = ::WID_NSS_LOAD_GAME, ///< Load game button.
- WID_NSS_PLAY_SCENARIO = ::WID_NSS_PLAY_SCENARIO, ///< Play scenario button.
- WID_NSS_PLAY_HEIGHTMAP = ::WID_NSS_PLAY_HEIGHTMAP, ///< Play heightmap button.
-
- WID_NSS_CANCEL = ::WID_NSS_CANCEL, ///< 'Cancel' button.
- };
-
- /** Widgets of the #NetworkLobbyWindow class. */
- enum NetworkLobbyWidgets {
- WID_NL_BACKGROUND = ::WID_NL_BACKGROUND, ///< Background of the window.
- WID_NL_TEXT = ::WID_NL_TEXT, ///< Heading text.
- WID_NL_HEADER = ::WID_NL_HEADER, ///< Header above list of companies.
- WID_NL_MATRIX = ::WID_NL_MATRIX, ///< List of companies.
- WID_NL_SCROLLBAR = ::WID_NL_SCROLLBAR, ///< Scroll bar.
- WID_NL_DETAILS = ::WID_NL_DETAILS, ///< Company details.
- WID_NL_JOIN = ::WID_NL_JOIN, ///< 'Join company' button.
- WID_NL_NEW = ::WID_NL_NEW, ///< 'New company' button.
- WID_NL_SPECTATE = ::WID_NL_SPECTATE, ///< 'Spectate game' button.
- WID_NL_REFRESH = ::WID_NL_REFRESH, ///< 'Refresh server' button.
- WID_NL_CANCEL = ::WID_NL_CANCEL, ///< 'Cancel' button.
- };
-
- /** Widgets of the #NetworkClientListWindow class. */
- enum ClientListWidgets {
- WID_CL_PANEL = ::WID_CL_PANEL, ///< Panel of the window.
- };
-
- /** Widgets of the #NetworkClientListPopupWindow class. */
- enum ClientListPopupWidgets {
- WID_CLP_PANEL = ::WID_CLP_PANEL, ///< Panel of the window.
- };
-
- /** Widgets of the #NetworkJoinStatusWindow class. */
- enum NetworkJoinStatusWidgets {
- WID_NJS_BACKGROUND = ::WID_NJS_BACKGROUND, ///< Background of the window.
- WID_NJS_CANCELOK = ::WID_NJS_CANCELOK, ///< Cancel / OK button.
- };
-
- /** Widgets of the #NetworkCompanyPasswordWindow class. */
- enum NetworkCompanyPasswordWidgets {
- WID_NCP_BACKGROUND = ::WID_NCP_BACKGROUND, ///< Background of the window.
- WID_NCP_LABEL = ::WID_NCP_LABEL, ///< Label in front of the password field.
- WID_NCP_PASSWORD = ::WID_NCP_PASSWORD, ///< Input field for the password.
- WID_NCP_SAVE_AS_DEFAULT_PASSWORD = ::WID_NCP_SAVE_AS_DEFAULT_PASSWORD, ///< Toggle 'button' for saving the current password as default password.
- WID_NCP_CANCEL = ::WID_NCP_CANCEL, ///< Close the window without changing anything.
- WID_NCP_OK = ::WID_NCP_OK, ///< Safe the password etc.
- };
-
- /* automatically generated from ../../widgets/newgrf_debug_widget.h */
- /** Widgets of the #NewGRFInspectWindow class. */
- enum NewGRFInspectWidgets {
- WID_NGRFI_CAPTION = ::WID_NGRFI_CAPTION, ///< The caption bar of course.
- WID_NGRFI_PARENT = ::WID_NGRFI_PARENT, ///< Inspect the parent.
- WID_NGRFI_VEH_PREV = ::WID_NGRFI_VEH_PREV, ///< Go to previous vehicle in chain.
- WID_NGRFI_VEH_NEXT = ::WID_NGRFI_VEH_NEXT, ///< Go to next vehicle in chain.
- WID_NGRFI_VEH_CHAIN = ::WID_NGRFI_VEH_CHAIN, ///< Display for vehicle chain.
- WID_NGRFI_MAINPANEL = ::WID_NGRFI_MAINPANEL, ///< Panel widget containing the actual data.
- WID_NGRFI_SCROLLBAR = ::WID_NGRFI_SCROLLBAR, ///< Scrollbar.
- };
-
- /** Widgets of the #SpriteAlignerWindow class. */
- enum SpriteAlignerWidgets {
- WID_SA_CAPTION = ::WID_SA_CAPTION, ///< Caption of the window.
- WID_SA_PREVIOUS = ::WID_SA_PREVIOUS, ///< Skip to the previous sprite.
- WID_SA_GOTO = ::WID_SA_GOTO, ///< Go to a given sprite.
- WID_SA_NEXT = ::WID_SA_NEXT, ///< Skip to the next sprite.
- WID_SA_UP = ::WID_SA_UP, ///< Move the sprite up.
- WID_SA_LEFT = ::WID_SA_LEFT, ///< Move the sprite to the left.
- WID_SA_RIGHT = ::WID_SA_RIGHT, ///< Move the sprite to the right.
- WID_SA_DOWN = ::WID_SA_DOWN, ///< Move the sprite down.
- WID_SA_SPRITE = ::WID_SA_SPRITE, ///< The actual sprite.
- WID_SA_OFFSETS = ::WID_SA_OFFSETS, ///< The sprite offsets.
- WID_SA_PICKER = ::WID_SA_PICKER, ///< Sprite picker.
- WID_SA_LIST = ::WID_SA_LIST, ///< Queried sprite list.
- WID_SA_SCROLLBAR = ::WID_SA_SCROLLBAR, ///< Scrollbar for sprite list.
- };
-
- /* automatically generated from ../../widgets/newgrf_widget.h */
- /** Widgets of the #NewGRFParametersWindow class. */
- enum NewGRFParametersWidgets {
- WID_NP_SHOW_NUMPAR = ::WID_NP_SHOW_NUMPAR, ///< #NWID_SELECTION to optionally display #WID_NP_NUMPAR.
- WID_NP_NUMPAR_DEC = ::WID_NP_NUMPAR_DEC, ///< Button to decrease number of parameters.
- WID_NP_NUMPAR_INC = ::WID_NP_NUMPAR_INC, ///< Button to increase number of parameters.
- WID_NP_NUMPAR = ::WID_NP_NUMPAR, ///< Optional number of parameters.
- WID_NP_NUMPAR_TEXT = ::WID_NP_NUMPAR_TEXT, ///< Text description.
- WID_NP_BACKGROUND = ::WID_NP_BACKGROUND, ///< Panel to draw the settings on.
- WID_NP_SCROLLBAR = ::WID_NP_SCROLLBAR, ///< Scrollbar to scroll through all settings.
- WID_NP_ACCEPT = ::WID_NP_ACCEPT, ///< Accept button.
- WID_NP_RESET = ::WID_NP_RESET, ///< Reset button.
- WID_NP_SHOW_DESCRIPTION = ::WID_NP_SHOW_DESCRIPTION, ///< #NWID_SELECTION to optionally display parameter descriptions.
- WID_NP_DESCRIPTION = ::WID_NP_DESCRIPTION, ///< Multi-line description of a parameter.
- };
-
- /** Widgets of the #NewGRFWindow class. */
- enum NewGRFStateWidgets {
- WID_NS_PRESET_LIST = ::WID_NS_PRESET_LIST, ///< Active NewGRF preset.
- WID_NS_PRESET_SAVE = ::WID_NS_PRESET_SAVE, ///< Save list of active NewGRFs as presets.
- WID_NS_PRESET_DELETE = ::WID_NS_PRESET_DELETE, ///< Delete active preset.
- WID_NS_ADD = ::WID_NS_ADD, ///< Add NewGRF to active list.
- WID_NS_REMOVE = ::WID_NS_REMOVE, ///< Remove NewGRF from active list.
- WID_NS_MOVE_UP = ::WID_NS_MOVE_UP, ///< Move NewGRF up in active list.
- WID_NS_MOVE_DOWN = ::WID_NS_MOVE_DOWN, ///< Move NewGRF down in active list.
- WID_NS_FILTER = ::WID_NS_FILTER, ///< Filter list of available NewGRFs.
- WID_NS_FILE_LIST = ::WID_NS_FILE_LIST, ///< List window of active NewGRFs.
- WID_NS_SCROLLBAR = ::WID_NS_SCROLLBAR, ///< Scrollbar for active NewGRF list.
- WID_NS_AVAIL_LIST = ::WID_NS_AVAIL_LIST, ///< List window of available NewGRFs.
- WID_NS_SCROLL2BAR = ::WID_NS_SCROLL2BAR, ///< Scrollbar for available NewGRF list.
- WID_NS_NEWGRF_INFO_TITLE = ::WID_NS_NEWGRF_INFO_TITLE, ///< Title for Info on selected NewGRF.
- WID_NS_NEWGRF_INFO = ::WID_NS_NEWGRF_INFO, ///< Panel for Info on selected NewGRF.
- WID_NS_OPEN_URL = ::WID_NS_OPEN_URL, ///< Open URL of NewGRF.
- WID_NS_NEWGRF_TEXTFILE = ::WID_NS_NEWGRF_TEXTFILE, ///< Open NewGRF readme, changelog (+1) or license (+2).
- WID_NS_SET_PARAMETERS = ::WID_NS_SET_PARAMETERS, ///< Open Parameters Window for selected NewGRF for editing parameters.
- WID_NS_VIEW_PARAMETERS = ::WID_NS_VIEW_PARAMETERS, ///< Open Parameters Window for selected NewGRF for viewing parameters.
- WID_NS_TOGGLE_PALETTE = ::WID_NS_TOGGLE_PALETTE, ///< Toggle Palette of selected, active NewGRF.
- WID_NS_APPLY_CHANGES = ::WID_NS_APPLY_CHANGES, ///< Apply changes to NewGRF config.
- WID_NS_RESCAN_FILES = ::WID_NS_RESCAN_FILES, ///< Rescan files (available NewGRFs).
- WID_NS_RESCAN_FILES2 = ::WID_NS_RESCAN_FILES2, ///< Rescan files (active NewGRFs).
- WID_NS_CONTENT_DOWNLOAD = ::WID_NS_CONTENT_DOWNLOAD, ///< Open content download (available NewGRFs).
- WID_NS_CONTENT_DOWNLOAD2 = ::WID_NS_CONTENT_DOWNLOAD2, ///< Open content download (active NewGRFs).
- WID_NS_SHOW_REMOVE = ::WID_NS_SHOW_REMOVE, ///< Select active list buttons (0, 1 = simple layout).
- WID_NS_SHOW_APPLY = ::WID_NS_SHOW_APPLY, ///< Select display of the buttons below the 'details'.
- };
-
- /** Widgets of the #ScanProgressWindow class. */
- enum ScanProgressWidgets {
- WID_SP_PROGRESS_BAR = ::WID_SP_PROGRESS_BAR, ///< Simple progress bar.
- WID_SP_PROGRESS_TEXT = ::WID_SP_PROGRESS_TEXT, ///< Text explaining what is happening.
- };
-
- /* automatically generated from ../../widgets/news_widget.h */
- /** Widgets of the #NewsWindow class. */
- enum NewsWidgets {
- WID_N_PANEL = ::WID_N_PANEL, ///< Panel of the window.
- WID_N_TITLE = ::WID_N_TITLE, ///< Title of the company news.
- WID_N_HEADLINE = ::WID_N_HEADLINE, ///< The news headline.
- WID_N_CLOSEBOX = ::WID_N_CLOSEBOX, ///< Close the window.
- WID_N_DATE = ::WID_N_DATE, ///< Date of the news item.
- WID_N_CAPTION = ::WID_N_CAPTION, ///< Title bar of the window. Only used in small news items.
- WID_N_INSET = ::WID_N_INSET, ///< Inset around the viewport in the window. Only used in small news items.
- WID_N_VIEWPORT = ::WID_N_VIEWPORT, ///< Viewport in the window.
- WID_N_COMPANY_MSG = ::WID_N_COMPANY_MSG, ///< Message in company news items.
- WID_N_MESSAGE = ::WID_N_MESSAGE, ///< Space for displaying the message. Only used in small news items.
- WID_N_MGR_FACE = ::WID_N_MGR_FACE, ///< Face of the manager.
- WID_N_MGR_NAME = ::WID_N_MGR_NAME, ///< Name of the manager.
- WID_N_VEH_TITLE = ::WID_N_VEH_TITLE, ///< Vehicle new title.
- WID_N_VEH_BKGND = ::WID_N_VEH_BKGND, ///< Dark background of new vehicle news.
- WID_N_VEH_NAME = ::WID_N_VEH_NAME, ///< Name of the new vehicle.
- WID_N_VEH_SPR = ::WID_N_VEH_SPR, ///< Graphical display of the new vehicle.
- WID_N_VEH_INFO = ::WID_N_VEH_INFO, ///< Some technical data of the new vehicle.
- };
-
- /** Widgets of the #MessageHistoryWindow class. */
- enum MessageHistoryWidgets {
- WID_MH_STICKYBOX = ::WID_MH_STICKYBOX, ///< Stickybox.
- WID_MH_BACKGROUND = ::WID_MH_BACKGROUND, ///< Background of the window.
- WID_MH_SCROLLBAR = ::WID_MH_SCROLLBAR, ///< Scrollbar for the list.
- };
-
- /* automatically generated from ../../widgets/object_widget.h */
- /** Widgets of the #BuildObjectWindow class. */
- enum BuildObjectWidgets {
- WID_BO_CLASS_LIST = ::WID_BO_CLASS_LIST, ///< The list with classes.
- WID_BO_SCROLLBAR = ::WID_BO_SCROLLBAR, ///< The scrollbar associated with the list.
- WID_BO_OBJECT_MATRIX = ::WID_BO_OBJECT_MATRIX, ///< The matrix with preview sprites.
- WID_BO_OBJECT_SPRITE = ::WID_BO_OBJECT_SPRITE, ///< A preview sprite of the object.
- WID_BO_OBJECT_NAME = ::WID_BO_OBJECT_NAME, ///< The name of the selected object.
- WID_BO_OBJECT_SIZE = ::WID_BO_OBJECT_SIZE, ///< The size of the selected object.
- WID_BO_INFO = ::WID_BO_INFO, ///< Other information about the object (from the NewGRF).
-
- WID_BO_SELECT_MATRIX = ::WID_BO_SELECT_MATRIX, ///< Selection preview matrix of objects of a given class.
- WID_BO_SELECT_IMAGE = ::WID_BO_SELECT_IMAGE, ///< Preview image in the #WID_BO_SELECT_MATRIX.
- WID_BO_SELECT_SCROLL = ::WID_BO_SELECT_SCROLL, ///< Scrollbar next to the #WID_BO_SELECT_MATRIX.
- };
-
- /* automatically generated from ../../widgets/order_widget.h */
- /** Widgets of the #OrdersWindow class. */
- enum OrderWidgets {
- WID_O_CAPTION = ::WID_O_CAPTION, ///< Caption of the window.
- WID_O_TIMETABLE_VIEW = ::WID_O_TIMETABLE_VIEW, ///< Toggle timetable view.
- WID_O_ORDER_LIST = ::WID_O_ORDER_LIST, ///< Order list panel.
- WID_O_SCROLLBAR = ::WID_O_SCROLLBAR, ///< Order list scrollbar.
- WID_O_SKIP = ::WID_O_SKIP, ///< Skip current order.
- WID_O_DELETE = ::WID_O_DELETE, ///< Delete selected order.
- WID_O_STOP_SHARING = ::WID_O_STOP_SHARING, ///< Stop sharing orders.
- WID_O_NON_STOP = ::WID_O_NON_STOP, ///< Goto non-stop to destination.
- WID_O_GOTO = ::WID_O_GOTO, ///< Goto destination.
- WID_O_FULL_LOAD = ::WID_O_FULL_LOAD, ///< Select full load.
- WID_O_UNLOAD = ::WID_O_UNLOAD, ///< Select unload.
- WID_O_REFIT = ::WID_O_REFIT, ///< Select refit.
- WID_O_SERVICE = ::WID_O_SERVICE, ///< Select service (at depot).
- WID_O_EMPTY = ::WID_O_EMPTY, ///< Placeholder for refit dropdown when not owner.
- WID_O_REFIT_DROPDOWN = ::WID_O_REFIT_DROPDOWN, ///< Open refit options.
- WID_O_COND_VARIABLE = ::WID_O_COND_VARIABLE, ///< Choose condition variable.
- WID_O_COND_COMPARATOR = ::WID_O_COND_COMPARATOR, ///< Choose condition type.
- WID_O_COND_VALUE = ::WID_O_COND_VALUE, ///< Choose condition value.
- WID_O_SEL_TOP_LEFT = ::WID_O_SEL_TOP_LEFT, ///< #NWID_SELECTION widget for left part of the top row of the 'your train' order window.
- WID_O_SEL_TOP_MIDDLE = ::WID_O_SEL_TOP_MIDDLE, ///< #NWID_SELECTION widget for middle part of the top row of the 'your train' order window.
- WID_O_SEL_TOP_RIGHT = ::WID_O_SEL_TOP_RIGHT, ///< #NWID_SELECTION widget for right part of the top row of the 'your train' order window.
- WID_O_SEL_TOP_ROW_GROUNDVEHICLE = ::WID_O_SEL_TOP_ROW_GROUNDVEHICLE, ///< #NWID_SELECTION widget for the top row of the 'your train' order window.
- WID_O_SEL_TOP_ROW = ::WID_O_SEL_TOP_ROW, ///< #NWID_SELECTION widget for the top row of the 'your non-trains' order window.
- WID_O_SEL_BOTTOM_MIDDLE = ::WID_O_SEL_BOTTOM_MIDDLE, ///< #NWID_SELECTION widget for the middle part of the bottom row of the 'your train' order window.
- WID_O_SHARED_ORDER_LIST = ::WID_O_SHARED_ORDER_LIST, ///< Open list of shared vehicles.
- };
-
- /* automatically generated from ../../widgets/osk_widget.h */
- /** Widgets of the #OskWindow class. */
- enum OnScreenKeyboardWidgets {
- WID_OSK_CAPTION = ::WID_OSK_CAPTION, ///< Caption of window.
- WID_OSK_TEXT = ::WID_OSK_TEXT, ///< Edit box.
- WID_OSK_CANCEL = ::WID_OSK_CANCEL, ///< Cancel key.
- WID_OSK_OK = ::WID_OSK_OK, ///< Ok key.
- WID_OSK_BACKSPACE = ::WID_OSK_BACKSPACE, ///< Backspace key.
- WID_OSK_SPECIAL = ::WID_OSK_SPECIAL, ///< Special key (at keyboards often used for tab key).
- WID_OSK_CAPS = ::WID_OSK_CAPS, ///< Capslock key.
- WID_OSK_SHIFT = ::WID_OSK_SHIFT, ///< Shift(lock) key.
- WID_OSK_SPACE = ::WID_OSK_SPACE, ///< Space bar.
- WID_OSK_LEFT = ::WID_OSK_LEFT, ///< Cursor left key.
- WID_OSK_RIGHT = ::WID_OSK_RIGHT, ///< Cursor right key.
- WID_OSK_LETTERS = ::WID_OSK_LETTERS, ///< First widget of the 'normal' keys.
-
- WID_OSK_NUMBERS_FIRST = ::WID_OSK_NUMBERS_FIRST, ///< First widget of the numbers row.
- WID_OSK_NUMBERS_LAST = ::WID_OSK_NUMBERS_LAST, ///< Last widget of the numbers row.
-
- WID_OSK_QWERTY_FIRST = ::WID_OSK_QWERTY_FIRST, ///< First widget of the qwerty row.
- WID_OSK_QWERTY_LAST = ::WID_OSK_QWERTY_LAST, ///< Last widget of the qwerty row.
-
- WID_OSK_ASDFG_FIRST = ::WID_OSK_ASDFG_FIRST, ///< First widget of the asdfg row.
- WID_OSK_ASDFG_LAST = ::WID_OSK_ASDFG_LAST, ///< Last widget of the asdfg row.
-
- WID_OSK_ZXCVB_FIRST = ::WID_OSK_ZXCVB_FIRST, ///< First widget of the zxcvb row.
- WID_OSK_ZXCVB_LAST = ::WID_OSK_ZXCVB_LAST, ///< Last widget of the zxcvb row.
- };
-
- /* automatically generated from ../../widgets/rail_widget.h */
- /** Widgets of the #BuildRailToolbarWindow class. */
- enum RailToolbarWidgets {
- /* Name starts with RA instead of R, because of collision with RoadToolbarWidgets */
- WID_RAT_CAPTION = ::WID_RAT_CAPTION, ///< Caption of the window.
- WID_RAT_BUILD_NS = ::WID_RAT_BUILD_NS, ///< Build rail along the game view Y axis.
- WID_RAT_BUILD_X = ::WID_RAT_BUILD_X, ///< Build rail along the game grid X axis.
- WID_RAT_BUILD_EW = ::WID_RAT_BUILD_EW, ///< Build rail along the game view X axis.
- WID_RAT_BUILD_Y = ::WID_RAT_BUILD_Y, ///< Build rail along the game grid Y axis.
- WID_RAT_AUTORAIL = ::WID_RAT_AUTORAIL, ///< Autorail tool.
- WID_RAT_DEMOLISH = ::WID_RAT_DEMOLISH, ///< Destroy something with dynamite!
- WID_RAT_BUILD_DEPOT = ::WID_RAT_BUILD_DEPOT, ///< Build a depot.
- WID_RAT_BUILD_WAYPOINT = ::WID_RAT_BUILD_WAYPOINT, ///< Build a waypoint.
- WID_RAT_BUILD_STATION = ::WID_RAT_BUILD_STATION, ///< Build a station.
- WID_RAT_BUILD_SIGNALS = ::WID_RAT_BUILD_SIGNALS, ///< Build signals.
- WID_RAT_BUILD_BRIDGE = ::WID_RAT_BUILD_BRIDGE, ///< Build a bridge.
- WID_RAT_BUILD_TUNNEL = ::WID_RAT_BUILD_TUNNEL, ///< Build a tunnel.
- WID_RAT_REMOVE = ::WID_RAT_REMOVE, ///< Bulldozer to remove rail.
- WID_RAT_CONVERT_RAIL = ::WID_RAT_CONVERT_RAIL, ///< Convert other rail to this type.
- };
-
- /** Widgets of the #BuildRailStationWindow class. */
- enum BuildRailStationWidgets {
- /* Name starts with BRA instead of BR, because of collision with BuildRoadStationWidgets */
- WID_BRAS_PLATFORM_DIR_X = ::WID_BRAS_PLATFORM_DIR_X, ///< Button to select '/' view.
- WID_BRAS_PLATFORM_DIR_Y = ::WID_BRAS_PLATFORM_DIR_Y, ///< Button to select '\' view.
-
- WID_BRAS_PLATFORM_NUM_1 = ::WID_BRAS_PLATFORM_NUM_1, ///< Button to select stations with a single platform.
- WID_BRAS_PLATFORM_NUM_2 = ::WID_BRAS_PLATFORM_NUM_2, ///< Button to select stations with 2 platforms.
- WID_BRAS_PLATFORM_NUM_3 = ::WID_BRAS_PLATFORM_NUM_3, ///< Button to select stations with 3 platforms.
- WID_BRAS_PLATFORM_NUM_4 = ::WID_BRAS_PLATFORM_NUM_4, ///< Button to select stations with 4 platforms.
- WID_BRAS_PLATFORM_NUM_5 = ::WID_BRAS_PLATFORM_NUM_5, ///< Button to select stations with 5 platforms.
- WID_BRAS_PLATFORM_NUM_6 = ::WID_BRAS_PLATFORM_NUM_6, ///< Button to select stations with 6 platforms.
- WID_BRAS_PLATFORM_NUM_7 = ::WID_BRAS_PLATFORM_NUM_7, ///< Button to select stations with 7 platforms.
-
- WID_BRAS_PLATFORM_LEN_1 = ::WID_BRAS_PLATFORM_LEN_1, ///< Button to select single tile length station platforms.
- WID_BRAS_PLATFORM_LEN_2 = ::WID_BRAS_PLATFORM_LEN_2, ///< Button to select 2 tiles length station platforms.
- WID_BRAS_PLATFORM_LEN_3 = ::WID_BRAS_PLATFORM_LEN_3, ///< Button to select 3 tiles length station platforms.
- WID_BRAS_PLATFORM_LEN_4 = ::WID_BRAS_PLATFORM_LEN_4, ///< Button to select 4 tiles length station platforms.
- WID_BRAS_PLATFORM_LEN_5 = ::WID_BRAS_PLATFORM_LEN_5, ///< Button to select 5 tiles length station platforms.
- WID_BRAS_PLATFORM_LEN_6 = ::WID_BRAS_PLATFORM_LEN_6, ///< Button to select 6 tiles length station platforms.
- WID_BRAS_PLATFORM_LEN_7 = ::WID_BRAS_PLATFORM_LEN_7, ///< Button to select 7 tiles length station platforms.
-
- WID_BRAS_PLATFORM_DRAG_N_DROP = ::WID_BRAS_PLATFORM_DRAG_N_DROP, ///< Button to enable drag and drop type station placement.
-
- WID_BRAS_HIGHLIGHT_OFF = ::WID_BRAS_HIGHLIGHT_OFF, ///< Button for turning coverage highlighting off.
- WID_BRAS_HIGHLIGHT_ON = ::WID_BRAS_HIGHLIGHT_ON, ///< Button for turning coverage highlighting on.
- WID_BRAS_COVERAGE_TEXTS = ::WID_BRAS_COVERAGE_TEXTS, ///< Empty space for the coverage texts.
-
- WID_BRAS_MATRIX = ::WID_BRAS_MATRIX, ///< Matrix widget displaying the available stations.
- WID_BRAS_IMAGE = ::WID_BRAS_IMAGE, ///< Panel used at each cell of the matrix.
- WID_BRAS_MATRIX_SCROLL = ::WID_BRAS_MATRIX_SCROLL, ///< Scrollbar of the matrix widget.
-
- WID_BRAS_SHOW_NEWST_DEFSIZE = ::WID_BRAS_SHOW_NEWST_DEFSIZE, ///< Selection for default-size button for newstation.
- WID_BRAS_SHOW_NEWST_ADDITIONS = ::WID_BRAS_SHOW_NEWST_ADDITIONS, ///< Selection for newstation class selection list.
- WID_BRAS_SHOW_NEWST_MATRIX = ::WID_BRAS_SHOW_NEWST_MATRIX, ///< Selection for newstation image matrix.
- WID_BRAS_SHOW_NEWST_RESIZE = ::WID_BRAS_SHOW_NEWST_RESIZE, ///< Selection for panel and resize at bottom right for newstation.
- WID_BRAS_SHOW_NEWST_TYPE = ::WID_BRAS_SHOW_NEWST_TYPE, ///< Display of selected station type.
- WID_BRAS_NEWST_LIST = ::WID_BRAS_NEWST_LIST, ///< List with available newstation classes.
- WID_BRAS_NEWST_SCROLL = ::WID_BRAS_NEWST_SCROLL, ///< Scrollbar of the #WID_BRAS_NEWST_LIST.
-
- WID_BRAS_PLATFORM_NUM_BEGIN = ::WID_BRAS_PLATFORM_NUM_BEGIN, ///< Helper for determining the chosen platform width.
- WID_BRAS_PLATFORM_LEN_BEGIN = ::WID_BRAS_PLATFORM_LEN_BEGIN, ///< Helper for determining the chosen platform length.
- };
-
- /** Widgets of the #BuildSignalWindow class. */
- enum BuildSignalWidgets {
- WID_BS_SEMAPHORE_NORM = ::WID_BS_SEMAPHORE_NORM, ///< Build a semaphore normal block signal
- WID_BS_SEMAPHORE_ENTRY = ::WID_BS_SEMAPHORE_ENTRY, ///< Build a semaphore entry block signal
- WID_BS_SEMAPHORE_EXIT = ::WID_BS_SEMAPHORE_EXIT, ///< Build a semaphore exit block signal
- WID_BS_SEMAPHORE_COMBO = ::WID_BS_SEMAPHORE_COMBO, ///< Build a semaphore combo block signal
- WID_BS_SEMAPHORE_PBS = ::WID_BS_SEMAPHORE_PBS, ///< Build a semaphore path signal.
- WID_BS_SEMAPHORE_PBS_OWAY = ::WID_BS_SEMAPHORE_PBS_OWAY, ///< Build a semaphore one way path signal.
- WID_BS_ELECTRIC_NORM = ::WID_BS_ELECTRIC_NORM, ///< Build an electric normal block signal
- WID_BS_ELECTRIC_ENTRY = ::WID_BS_ELECTRIC_ENTRY, ///< Build an electric entry block signal
- WID_BS_ELECTRIC_EXIT = ::WID_BS_ELECTRIC_EXIT, ///< Build an electric exit block signal
- WID_BS_ELECTRIC_COMBO = ::WID_BS_ELECTRIC_COMBO, ///< Build an electric combo block signal
- WID_BS_ELECTRIC_PBS = ::WID_BS_ELECTRIC_PBS, ///< Build an electric path signal.
- WID_BS_ELECTRIC_PBS_OWAY = ::WID_BS_ELECTRIC_PBS_OWAY, ///< Build an electric one way path signal.
- WID_BS_CONVERT = ::WID_BS_CONVERT, ///< Convert the signal.
- WID_BS_DRAG_SIGNALS_DENSITY_LABEL = ::WID_BS_DRAG_SIGNALS_DENSITY_LABEL, ///< The current signal density.
- WID_BS_DRAG_SIGNALS_DENSITY_DECREASE = ::WID_BS_DRAG_SIGNALS_DENSITY_DECREASE, ///< Decrease the signal density.
- WID_BS_DRAG_SIGNALS_DENSITY_INCREASE = ::WID_BS_DRAG_SIGNALS_DENSITY_INCREASE, ///< Increase the signal density.
- };
-
- /** Widgets of the #BuildRailDepotWindow class. */
- enum BuildRailDepotWidgets {
- /* Name starts with BRA instead of BR, because of collision with BuildRoadDepotWidgets */
- WID_BRAD_DEPOT_NE = ::WID_BRAD_DEPOT_NE, ///< Build a depot with the entrance in the north east.
- WID_BRAD_DEPOT_SE = ::WID_BRAD_DEPOT_SE, ///< Build a depot with the entrance in the south east.
- WID_BRAD_DEPOT_SW = ::WID_BRAD_DEPOT_SW, ///< Build a depot with the entrance in the south west.
- WID_BRAD_DEPOT_NW = ::WID_BRAD_DEPOT_NW, ///< Build a depot with the entrance in the north west.
- };
-
- /** Widgets of the #BuildRailWaypointWindow class. */
- enum BuildRailWaypointWidgets {
- WID_BRW_WAYPOINT_MATRIX = ::WID_BRW_WAYPOINT_MATRIX, ///< Matrix with waypoints.
- WID_BRW_WAYPOINT = ::WID_BRW_WAYPOINT, ///< A single waypoint.
- WID_BRW_SCROLL = ::WID_BRW_SCROLL, ///< Scrollbar for the matrix.
- };
-
- /* automatically generated from ../../widgets/road_widget.h */
- /** Widgets of the #BuildRoadToolbarWindow class. */
- enum RoadToolbarWidgets {
- /* Name starts with RO instead of R, because of collision with RailToolbarWidgets */
- WID_ROT_ROAD_X = ::WID_ROT_ROAD_X, ///< Build road in x-direction.
- WID_ROT_ROAD_Y = ::WID_ROT_ROAD_Y, ///< Build road in y-direction.
- WID_ROT_AUTOROAD = ::WID_ROT_AUTOROAD, ///< Autorail.
- WID_ROT_DEMOLISH = ::WID_ROT_DEMOLISH, ///< Demolish.
- WID_ROT_DEPOT = ::WID_ROT_DEPOT, ///< Build depot.
- WID_ROT_BUS_STATION = ::WID_ROT_BUS_STATION, ///< Build bus station.
- WID_ROT_TRUCK_STATION = ::WID_ROT_TRUCK_STATION, ///< Build truck station.
- WID_ROT_ONE_WAY = ::WID_ROT_ONE_WAY, ///< Build one-way road.
- WID_ROT_BUILD_BRIDGE = ::WID_ROT_BUILD_BRIDGE, ///< Build bridge.
- WID_ROT_BUILD_TUNNEL = ::WID_ROT_BUILD_TUNNEL, ///< Build tunnel.
- WID_ROT_REMOVE = ::WID_ROT_REMOVE, ///< Remove road.
- };
-
- /** Widgets of the #BuildRoadDepotWindow class. */
- enum BuildRoadDepotWidgets {
- /* Name starts with BRO instead of BR, because of collision with BuildRailDepotWidgets */
- WID_BROD_CAPTION = ::WID_BROD_CAPTION, ///< Caption of the window.
- WID_BROD_DEPOT_NE = ::WID_BROD_DEPOT_NE, ///< Depot with NE entry.
- WID_BROD_DEPOT_SE = ::WID_BROD_DEPOT_SE, ///< Depot with SE entry.
- WID_BROD_DEPOT_SW = ::WID_BROD_DEPOT_SW, ///< Depot with SW entry.
- WID_BROD_DEPOT_NW = ::WID_BROD_DEPOT_NW, ///< Depot with NW entry.
- };
-
- /** Widgets of the #BuildRoadStationWindow class. */
- enum BuildRoadStationWidgets {
- /* Name starts with BRO instead of BR, because of collision with BuildRailStationWidgets */
- WID_BROS_CAPTION = ::WID_BROS_CAPTION, ///< Caption of the window.
- WID_BROS_BACKGROUND = ::WID_BROS_BACKGROUND, ///< Background of the window.
- WID_BROS_STATION_NE = ::WID_BROS_STATION_NE, ///< Terminal station with NE entry.
- WID_BROS_STATION_SE = ::WID_BROS_STATION_SE, ///< Terminal station with SE entry.
- WID_BROS_STATION_SW = ::WID_BROS_STATION_SW, ///< Terminal station with SW entry.
- WID_BROS_STATION_NW = ::WID_BROS_STATION_NW, ///< Terminal station with NW entry.
- WID_BROS_STATION_X = ::WID_BROS_STATION_X, ///< Drive-through station in x-direction.
- WID_BROS_STATION_Y = ::WID_BROS_STATION_Y, ///< Drive-through station in y-direction.
- WID_BROS_LT_OFF = ::WID_BROS_LT_OFF, ///< Turn off area highlight.
- WID_BROS_LT_ON = ::WID_BROS_LT_ON, ///< Turn on area highlight.
- WID_BROS_INFO = ::WID_BROS_INFO, ///< Station acceptance info.
- };
-
- /* automatically generated from ../../widgets/settings_widget.h */
- /** Widgets of the #GameOptionsWindow class. */
- enum GameOptionsWidgets {
- WID_GO_BACKGROUND = ::WID_GO_BACKGROUND, ///< Background of the window.
- WID_GO_CURRENCY_DROPDOWN = ::WID_GO_CURRENCY_DROPDOWN, ///< Currency dropdown.
- WID_GO_DISTANCE_DROPDOWN = ::WID_GO_DISTANCE_DROPDOWN, ///< Measuring unit dropdown.
- WID_GO_ROADSIDE_DROPDOWN = ::WID_GO_ROADSIDE_DROPDOWN, ///< Dropdown to select the road side (to set the right side ;)).
- WID_GO_TOWNNAME_DROPDOWN = ::WID_GO_TOWNNAME_DROPDOWN, ///< Town name dropdown.
- WID_GO_AUTOSAVE_DROPDOWN = ::WID_GO_AUTOSAVE_DROPDOWN, ///< Dropdown to say how often to autosave.
- WID_GO_LANG_DROPDOWN = ::WID_GO_LANG_DROPDOWN, ///< Language dropdown.
- WID_GO_RESOLUTION_DROPDOWN = ::WID_GO_RESOLUTION_DROPDOWN, ///< Dropdown for the resolution.
- WID_GO_FULLSCREEN_BUTTON = ::WID_GO_FULLSCREEN_BUTTON, ///< Toggle fullscreen.
- WID_GO_SCREENSHOT_DROPDOWN = ::WID_GO_SCREENSHOT_DROPDOWN, ///< Select the screenshot type... please use PNG!.
- WID_GO_BASE_GRF_DROPDOWN = ::WID_GO_BASE_GRF_DROPDOWN, ///< Use to select a base GRF.
- WID_GO_BASE_GRF_STATUS = ::WID_GO_BASE_GRF_STATUS, ///< Info about missing files etc.
- WID_GO_BASE_GRF_TEXTFILE = ::WID_GO_BASE_GRF_TEXTFILE, ///< Open base GRF readme, changelog (+1) or license (+2).
- WID_GO_BASE_GRF_DESCRIPTION = ::WID_GO_BASE_GRF_DESCRIPTION, ///< Description of selected base GRF.
- WID_GO_BASE_SFX_DROPDOWN = ::WID_GO_BASE_SFX_DROPDOWN, ///< Use to select a base SFX.
- WID_GO_BASE_SFX_TEXTFILE = ::WID_GO_BASE_SFX_TEXTFILE, ///< Open base SFX readme, changelog (+1) or license (+2).
- WID_GO_BASE_SFX_DESCRIPTION = ::WID_GO_BASE_SFX_DESCRIPTION, ///< Description of selected base SFX.
- WID_GO_BASE_MUSIC_DROPDOWN = ::WID_GO_BASE_MUSIC_DROPDOWN, ///< Use to select a base music set.
- WID_GO_BASE_MUSIC_STATUS = ::WID_GO_BASE_MUSIC_STATUS, ///< Info about corrupted files etc.
- WID_GO_BASE_MUSIC_TEXTFILE = ::WID_GO_BASE_MUSIC_TEXTFILE, ///< Open base music readme, changelog (+1) or license (+2).
- WID_GO_BASE_MUSIC_DESCRIPTION = ::WID_GO_BASE_MUSIC_DESCRIPTION, ///< Description of selected base music set.
- };
-
- /** Widgets of the #GameSettingsWindow class. */
- enum GameSettingsWidgets {
- WID_GS_FILTER = ::WID_GS_FILTER, ///< Text filter.
- WID_GS_OPTIONSPANEL = ::WID_GS_OPTIONSPANEL, ///< Panel widget containing the option lists.
- WID_GS_SCROLLBAR = ::WID_GS_SCROLLBAR, ///< Scrollbar.
- WID_GS_HELP_TEXT = ::WID_GS_HELP_TEXT, ///< Information area to display help text of the selected option.
- WID_GS_EXPAND_ALL = ::WID_GS_EXPAND_ALL, ///< Expand all button.
- WID_GS_COLLAPSE_ALL = ::WID_GS_COLLAPSE_ALL, ///< Collapse all button.
- WID_GS_RESTRICT_CATEGORY = ::WID_GS_RESTRICT_CATEGORY, ///< Label upfront to the category drop-down box to restrict the list of settings to show
- WID_GS_RESTRICT_TYPE = ::WID_GS_RESTRICT_TYPE, ///< Label upfront to the type drop-down box to restrict the list of settings to show
- WID_GS_RESTRICT_DROPDOWN = ::WID_GS_RESTRICT_DROPDOWN, ///< The drop down box to restrict the list of settings
- WID_GS_TYPE_DROPDOWN = ::WID_GS_TYPE_DROPDOWN, ///< The drop down box to choose client/game/company/all settings
- };
-
- /** Widgets of the #CustomCurrencyWindow class. */
- enum CustomCurrencyWidgets {
- WID_CC_RATE_DOWN = ::WID_CC_RATE_DOWN, ///< Down button.
- WID_CC_RATE_UP = ::WID_CC_RATE_UP, ///< Up button.
- WID_CC_RATE = ::WID_CC_RATE, ///< Rate of currency.
- WID_CC_SEPARATOR_EDIT = ::WID_CC_SEPARATOR_EDIT, ///< Separator edit button.
- WID_CC_SEPARATOR = ::WID_CC_SEPARATOR, ///< Current separator.
- WID_CC_PREFIX_EDIT = ::WID_CC_PREFIX_EDIT, ///< Prefix edit button.
- WID_CC_PREFIX = ::WID_CC_PREFIX, ///< Current prefix.
- WID_CC_SUFFIX_EDIT = ::WID_CC_SUFFIX_EDIT, ///< Suffix edit button.
- WID_CC_SUFFIX = ::WID_CC_SUFFIX, ///< Current suffix.
- WID_CC_YEAR_DOWN = ::WID_CC_YEAR_DOWN, ///< Down button.
- WID_CC_YEAR_UP = ::WID_CC_YEAR_UP, ///< Up button.
- WID_CC_YEAR = ::WID_CC_YEAR, ///< Year of introduction.
- WID_CC_PREVIEW = ::WID_CC_PREVIEW, ///< Preview.
- };
-
- /* automatically generated from ../../widgets/sign_widget.h */
- /** Widgets of the #SignListWindow class. */
- enum SignListWidgets {
- /* Name starts with SI instead of S, because of collision with SaveLoadWidgets */
- WID_SIL_CAPTION = ::WID_SIL_CAPTION, ///< Caption of the window.
- WID_SIL_LIST = ::WID_SIL_LIST, ///< List of signs.
- WID_SIL_SCROLLBAR = ::WID_SIL_SCROLLBAR, ///< Scrollbar of list.
- WID_SIL_FILTER_TEXT = ::WID_SIL_FILTER_TEXT, ///< Text box for typing a filter string.
- WID_SIL_FILTER_MATCH_CASE_BTN = ::WID_SIL_FILTER_MATCH_CASE_BTN, ///< Button to toggle if case sensitive filtering should be used.
- WID_SIL_FILTER_ENTER_BTN = ::WID_SIL_FILTER_ENTER_BTN, ///< Scroll to first sign.
- };
-
- /** Widgets of the #SignWindow class. */
- enum QueryEditSignWidgets {
- WID_QES_CAPTION = ::WID_QES_CAPTION, ///< Caption of the window.
- WID_QES_TEXT = ::WID_QES_TEXT, ///< Text of the query.
- WID_QES_OK = ::WID_QES_OK, ///< OK button.
- WID_QES_CANCEL = ::WID_QES_CANCEL, ///< Cancel button.
- WID_QES_DELETE = ::WID_QES_DELETE, ///< Delete button.
- WID_QES_PREVIOUS = ::WID_QES_PREVIOUS, ///< Previous button.
- WID_QES_NEXT = ::WID_QES_NEXT, ///< Next button.
- };
-
- /* automatically generated from ../../widgets/smallmap_widget.h */
- /** Widgets of the #SmallMapWindow class. */
- enum SmallMapWidgets {
- WID_SM_CAPTION = ::WID_SM_CAPTION, ///< Caption of the window.
- WID_SM_MAP_BORDER = ::WID_SM_MAP_BORDER, ///< Border around the smallmap.
- WID_SM_MAP = ::WID_SM_MAP, ///< Panel containing the smallmap.
- WID_SM_LEGEND = ::WID_SM_LEGEND, ///< Bottom panel to display smallmap legends.
- WID_SM_BLANK = ::WID_SM_BLANK, ///< Empty button as placeholder.
- WID_SM_ZOOM_IN = ::WID_SM_ZOOM_IN, ///< Button to zoom in one step.
- WID_SM_ZOOM_OUT = ::WID_SM_ZOOM_OUT, ///< Button to zoom out one step.
- WID_SM_CONTOUR = ::WID_SM_CONTOUR, ///< Button to select the contour view (height map).
- WID_SM_VEHICLES = ::WID_SM_VEHICLES, ///< Button to select the vehicles view.
- WID_SM_INDUSTRIES = ::WID_SM_INDUSTRIES, ///< Button to select the industries view.
- WID_SM_LINKSTATS = ::WID_SM_LINKSTATS, ///< Button to select the link stats view.
- WID_SM_ROUTES = ::WID_SM_ROUTES, ///< Button to select the routes view.
- WID_SM_VEGETATION = ::WID_SM_VEGETATION, ///< Button to select the vegetation view.
- WID_SM_OWNERS = ::WID_SM_OWNERS, ///< Button to select the owners view.
- WID_SM_CENTERMAP = ::WID_SM_CENTERMAP, ///< Button to move smallmap center to main window center.
- WID_SM_TOGGLETOWNNAME = ::WID_SM_TOGGLETOWNNAME, ///< Toggle button to display town names.
- WID_SM_SELECT_BUTTONS = ::WID_SM_SELECT_BUTTONS, ///< Selection widget for the buttons present in some smallmap modes.
- WID_SM_ENABLE_ALL = ::WID_SM_ENABLE_ALL, ///< Button to enable display of all legend entries.
- WID_SM_DISABLE_ALL = ::WID_SM_DISABLE_ALL, ///< Button to disable display of all legend entries.
- WID_SM_SHOW_HEIGHT = ::WID_SM_SHOW_HEIGHT, ///< Show heightmap toggle button.
- };
-
- /* automatically generated from ../../widgets/station_widget.h */
- /** Widgets of the #StationViewWindow class. */
- enum StationViewWidgets {
- WID_SV_CAPTION = ::WID_SV_CAPTION, ///< Caption of the window.
- WID_SV_SORT_ORDER = ::WID_SV_SORT_ORDER, ///< 'Sort order' button
- WID_SV_SORT_BY = ::WID_SV_SORT_BY, ///< 'Sort by' button
- WID_SV_GROUP = ::WID_SV_GROUP, ///< label for "group by"
- WID_SV_GROUP_BY = ::WID_SV_GROUP_BY, ///< 'Group by' button
- WID_SV_WAITING = ::WID_SV_WAITING, ///< List of waiting cargo.
- WID_SV_SCROLLBAR = ::WID_SV_SCROLLBAR, ///< Scrollbar.
- WID_SV_ACCEPT_RATING_LIST = ::WID_SV_ACCEPT_RATING_LIST, ///< List of accepted cargoes / rating of cargoes.
- WID_SV_LOCATION = ::WID_SV_LOCATION, ///< 'Location' button.
- WID_SV_ACCEPTS_RATINGS = ::WID_SV_ACCEPTS_RATINGS, ///< 'Accepts' / 'Ratings' button.
- WID_SV_RENAME = ::WID_SV_RENAME, ///< 'Rename' button.
- WID_SV_CLOSE_AIRPORT = ::WID_SV_CLOSE_AIRPORT, ///< 'Close airport' button.
- WID_SV_TRAINS = ::WID_SV_TRAINS, ///< List of scheduled trains button.
- WID_SV_ROADVEHS = ::WID_SV_ROADVEHS, ///< List of scheduled road vehs button.
- WID_SV_SHIPS = ::WID_SV_SHIPS, ///< List of scheduled ships button.
- WID_SV_PLANES = ::WID_SV_PLANES, ///< List of scheduled planes button.
- };
-
- /** Widgets of the #CompanyStationsWindow class. */
- enum StationListWidgets {
- /* Name starts with ST instead of S, because of collision with SaveLoadWidgets */
- WID_STL_CAPTION = ::WID_STL_CAPTION, ///< Caption of the window.
- WID_STL_LIST = ::WID_STL_LIST, ///< The main panel, list of stations.
- WID_STL_SCROLLBAR = ::WID_STL_SCROLLBAR, ///< Scrollbar next to the main panel.
-
- /* Vehicletypes need to be in order of StationFacility due to bit magic */
- WID_STL_TRAIN = ::WID_STL_TRAIN, ///< 'TRAIN' button - list only facilities where is a railroad station.
- WID_STL_TRUCK = ::WID_STL_TRUCK, ///< 'TRUCK' button - list only facilities where is a truck stop.
- WID_STL_BUS = ::WID_STL_BUS, ///< 'BUS' button - list only facilities where is a bus stop.
- WID_STL_AIRPLANE = ::WID_STL_AIRPLANE, ///< 'AIRPLANE' button - list only facilities where is an airport.
- WID_STL_SHIP = ::WID_STL_SHIP, ///< 'SHIP' button - list only facilities where is a dock.
- WID_STL_FACILALL = ::WID_STL_FACILALL, ///< 'ALL' button - list all facilities.
-
- WID_STL_NOCARGOWAITING = ::WID_STL_NOCARGOWAITING, ///< 'NO' button - list stations where no cargo is waiting.
- WID_STL_CARGOALL = ::WID_STL_CARGOALL, ///< 'ALL' button - list all stations.
-
- WID_STL_SORTBY = ::WID_STL_SORTBY, ///< 'Sort by' button - reverse sort direction.
- WID_STL_SORTDROPBTN = ::WID_STL_SORTDROPBTN, ///< Dropdown button.
-
- WID_STL_CARGOSTART = ::WID_STL_CARGOSTART, ///< Widget numbers used for list of cargo types (not present in _company_stations_widgets).
- };
-
- /** Widgets of the #SelectStationWindow class. */
- enum JoinStationWidgets {
- WID_JS_CAPTION = ::WID_JS_CAPTION, // Caption of the window.
- WID_JS_PANEL = ::WID_JS_PANEL, // Main panel.
- WID_JS_SCROLLBAR = ::WID_JS_SCROLLBAR, // Scrollbar of the panel.
- };
-
- /* automatically generated from ../../widgets/statusbar_widget.h */
- /** Widgets of the #StatusBarWindow class. */
- enum StatusbarWidgets {
- WID_S_LEFT = ::WID_S_LEFT, ///< Left part of the statusbar; date is shown there.
- WID_S_MIDDLE = ::WID_S_MIDDLE, ///< Middle part; current news or company name or *** SAVING *** or *** PAUSED ***.
- WID_S_RIGHT = ::WID_S_RIGHT, ///< Right part; bank balance.
- };
-
- /* automatically generated from ../../widgets/story_widget.h */
- /** Widgets of the #GoalListWindow class. */
- enum StoryBookWidgets {
- WID_SB_CAPTION = ::WID_SB_CAPTION, ///< Caption of the window.
- WID_SB_SEL_PAGE = ::WID_SB_SEL_PAGE, ///< Page selector.
- WID_SB_PAGE_PANEL = ::WID_SB_PAGE_PANEL, ///< Page body.
- WID_SB_SCROLLBAR = ::WID_SB_SCROLLBAR, ///< Scrollbar of the goal list.
- WID_SB_PREV_PAGE = ::WID_SB_PREV_PAGE, ///< Prev button.
- WID_SB_NEXT_PAGE = ::WID_SB_NEXT_PAGE, ///< Next button.
- };
-
- /* automatically generated from ../../widgets/subsidy_widget.h */
- /** Widgets of the #SubsidyListWindow class. */
- enum SubsidyListWidgets {
- /* Name starts with SU instead of S, because of collision with SaveLoadWidgets. */
- WID_SUL_PANEL = ::WID_SUL_PANEL, ///< Main panel of window.
- WID_SUL_SCROLLBAR = ::WID_SUL_SCROLLBAR, ///< Scrollbar of panel.
- };
-
- /* automatically generated from ../../widgets/terraform_widget.h */
- /** Widgets of the #TerraformToolbarWindow class. */
- enum TerraformToolbarWidgets {
- WID_TT_SHOW_PLACE_OBJECT = ::WID_TT_SHOW_PLACE_OBJECT, ///< Should the place object button be shown?
- WID_TT_BUTTONS_START = ::WID_TT_BUTTONS_START, ///< Start of pushable buttons.
- WID_TT_LOWER_LAND = ::WID_TT_LOWER_LAND, ///< Lower land button.
- WID_TT_RAISE_LAND = ::WID_TT_RAISE_LAND, ///< Raise land button.
- WID_TT_LEVEL_LAND = ::WID_TT_LEVEL_LAND, ///< Level land button.
- WID_TT_DEMOLISH = ::WID_TT_DEMOLISH, ///< Demolish aka dynamite button.
- WID_TT_BUY_LAND = ::WID_TT_BUY_LAND, ///< Buy land button.
- WID_TT_PLANT_TREES = ::WID_TT_PLANT_TREES, ///< Plant trees button (note: opens separate window, no place-push-button).
- WID_TT_PLACE_SIGN = ::WID_TT_PLACE_SIGN, ///< Place sign button.
- WID_TT_PLACE_OBJECT = ::WID_TT_PLACE_OBJECT, ///< Place object button.
- };
-
- /** Widgets of the #ScenarioEditorLandscapeGenerationWindow class. */
- enum EditorTerraformToolbarWidgets {
- WID_ETT_SHOW_PLACE_DESERT = ::WID_ETT_SHOW_PLACE_DESERT, ///< Should the place desert button be shown?
- WID_ETT_START = ::WID_ETT_START, ///< Used for iterations.
- WID_ETT_DOTS = ::WID_ETT_DOTS, ///< Invisible widget for rendering the terraform size on.
- WID_ETT_BUTTONS_START = ::WID_ETT_BUTTONS_START, ///< Start of pushable buttons.
- WID_ETT_DEMOLISH = ::WID_ETT_DEMOLISH, ///< Demolish aka dynamite button.
- WID_ETT_LOWER_LAND = ::WID_ETT_LOWER_LAND, ///< Lower land button.
- WID_ETT_RAISE_LAND = ::WID_ETT_RAISE_LAND, ///< Raise land button.
- WID_ETT_LEVEL_LAND = ::WID_ETT_LEVEL_LAND, ///< Level land button.
- WID_ETT_PLACE_ROCKS = ::WID_ETT_PLACE_ROCKS, ///< Place rocks button.
- WID_ETT_PLACE_DESERT = ::WID_ETT_PLACE_DESERT, ///< Place desert button (in tropical climate).
- WID_ETT_PLACE_OBJECT = ::WID_ETT_PLACE_OBJECT, ///< Place transmitter button.
- WID_ETT_BUTTONS_END = ::WID_ETT_BUTTONS_END, ///< End of pushable buttons.
- WID_ETT_INCREASE_SIZE = ::WID_ETT_INCREASE_SIZE, ///< Upwards arrow button to increase terraforming size.
- WID_ETT_DECREASE_SIZE = ::WID_ETT_DECREASE_SIZE, ///< Downwards arrow button to decrease terraforming size.
- WID_ETT_NEW_SCENARIO = ::WID_ETT_NEW_SCENARIO, ///< Button for generating a new scenario.
- WID_ETT_RESET_LANDSCAPE = ::WID_ETT_RESET_LANDSCAPE, ///< Button for removing all company-owned property.
- };
-
- /* automatically generated from ../../widgets/timetable_widget.h */
- /** Widgets of the #TimetableWindow class. */
- enum VehicleTimetableWidgets {
- WID_VT_CAPTION = ::WID_VT_CAPTION, ///< Caption of the window.
- WID_VT_ORDER_VIEW = ::WID_VT_ORDER_VIEW, ///< Order view.
- WID_VT_TIMETABLE_PANEL = ::WID_VT_TIMETABLE_PANEL, ///< Timetable panel.
- WID_VT_ARRIVAL_DEPARTURE_PANEL = ::WID_VT_ARRIVAL_DEPARTURE_PANEL, ///< Panel with the expected/scheduled arrivals.
- WID_VT_SCROLLBAR = ::WID_VT_SCROLLBAR, ///< Scrollbar for the panel.
- WID_VT_SUMMARY_PANEL = ::WID_VT_SUMMARY_PANEL, ///< Summary panel.
- WID_VT_START_DATE = ::WID_VT_START_DATE, ///< Start date button.
- WID_VT_CHANGE_TIME = ::WID_VT_CHANGE_TIME, ///< Change time button.
- WID_VT_CLEAR_TIME = ::WID_VT_CLEAR_TIME, ///< Clear time button.
- WID_VT_RESET_LATENESS = ::WID_VT_RESET_LATENESS, ///< Reset lateness button.
- WID_VT_AUTOFILL = ::WID_VT_AUTOFILL, ///< Autofill button.
- WID_VT_EXPECTED = ::WID_VT_EXPECTED, ///< Toggle between expected and scheduled arrivals.
- WID_VT_SHARED_ORDER_LIST = ::WID_VT_SHARED_ORDER_LIST, ///< Show the shared order list.
- WID_VT_ARRIVAL_DEPARTURE_SELECTION = ::WID_VT_ARRIVAL_DEPARTURE_SELECTION, ///< Disable/hide the arrival departure panel.
- WID_VT_EXPECTED_SELECTION = ::WID_VT_EXPECTED_SELECTION, ///< Disable/hide the expected selection button.
- WID_VT_CHANGE_SPEED = ::WID_VT_CHANGE_SPEED, ///< Change speed limit button.
- WID_VT_CLEAR_SPEED = ::WID_VT_CLEAR_SPEED, ///< Clear speed limit button.
- };
-
- /* automatically generated from ../../widgets/toolbar_widget.h */
- /** Widgets of the #MainToolbarWindow class. */
- enum ToolbarNormalWidgets {
- WID_TN_PAUSE = ::WID_TN_PAUSE, ///< Pause the game.
- WID_TN_FAST_FORWARD = ::WID_TN_FAST_FORWARD, ///< Fast forward the game.
- WID_TN_SETTINGS = ::WID_TN_SETTINGS, ///< Settings menu.
- WID_TN_SAVE = ::WID_TN_SAVE, ///< Save menu.
- WID_TN_SMALL_MAP = ::WID_TN_SMALL_MAP, ///< Small map menu.
- WID_TN_TOWNS = ::WID_TN_TOWNS, ///< Town menu.
- WID_TN_SUBSIDIES = ::WID_TN_SUBSIDIES, ///< Subsidy menu.
- WID_TN_STATIONS = ::WID_TN_STATIONS, ///< Station menu.
- WID_TN_FINANCES = ::WID_TN_FINANCES, ///< Finance menu.
- WID_TN_COMPANIES = ::WID_TN_COMPANIES, ///< Company menu.
- WID_TN_STORY = ::WID_TN_STORY, ///< Story menu.
- WID_TN_GOAL = ::WID_TN_GOAL, ///< Goal menu.
- WID_TN_GRAPHS = ::WID_TN_GRAPHS, ///< Graph menu.
- WID_TN_LEAGUE = ::WID_TN_LEAGUE, ///< Company league menu.
- WID_TN_INDUSTRIES = ::WID_TN_INDUSTRIES, ///< Industry menu.
- WID_TN_VEHICLE_START = ::WID_TN_VEHICLE_START, ///< Helper for the offset of the vehicle menus.
- WID_TN_TRAINS = ::WID_TN_TRAINS, ///< Train menu.
- WID_TN_ROADVEHS = ::WID_TN_ROADVEHS, ///< Road vehicle menu.
- WID_TN_SHIPS = ::WID_TN_SHIPS, ///< Ship menu.
- WID_TN_AIRCRAFTS = ::WID_TN_AIRCRAFTS, ///< Aircraft menu.
- WID_TN_ZOOM_IN = ::WID_TN_ZOOM_IN, ///< Zoom in the main viewport.
- WID_TN_ZOOM_OUT = ::WID_TN_ZOOM_OUT, ///< Zoom out the main viewport.
- WID_TN_RAILS = ::WID_TN_RAILS, ///< Rail building menu.
- WID_TN_ROADS = ::WID_TN_ROADS, ///< Road building menu.
- WID_TN_WATER = ::WID_TN_WATER, ///< Water building toolbar.
- WID_TN_AIR = ::WID_TN_AIR, ///< Airport building toolbar.
- WID_TN_LANDSCAPE = ::WID_TN_LANDSCAPE, ///< Landscaping toolbar.
- WID_TN_MUSIC_SOUND = ::WID_TN_MUSIC_SOUND, ///< Music/sound configuration menu.
- WID_TN_MESSAGES = ::WID_TN_MESSAGES, ///< Messages menu.
- WID_TN_HELP = ::WID_TN_HELP, ///< Help menu.
- WID_TN_SWITCH_BAR = ::WID_TN_SWITCH_BAR, ///< Only available when toolbar has been split to switch between different subsets.
- WID_TN_END = ::WID_TN_END, ///< Helper for knowing the amount of widgets.
- };
-
- /** Widgets of the #ScenarioEditorToolbarWindow class. */
- enum ToolbarEditorWidgets {
- WID_TE_PAUSE = ::WID_TE_PAUSE, ///< Pause the game.
- WID_TE_FAST_FORWARD = ::WID_TE_FAST_FORWARD, ///< Fast forward the game.
- WID_TE_SETTINGS = ::WID_TE_SETTINGS, ///< Settings menu.
- WID_TE_SAVE = ::WID_TE_SAVE, ///< Save menu.
- WID_TE_SPACER = ::WID_TE_SPACER, ///< Spacer with "scenario editor" text.
- WID_TE_DATE = ::WID_TE_DATE, ///< The date of the scenario.
- WID_TE_DATE_BACKWARD = ::WID_TE_DATE_BACKWARD, ///< Reduce the date of the scenario.
- WID_TE_DATE_FORWARD = ::WID_TE_DATE_FORWARD, ///< Increase the date of the scenario.
- WID_TE_SMALL_MAP = ::WID_TE_SMALL_MAP, ///< Small map menu.
- WID_TE_ZOOM_IN = ::WID_TE_ZOOM_IN, ///< Zoom in the main viewport.
- WID_TE_ZOOM_OUT = ::WID_TE_ZOOM_OUT, ///< Zoom out the main viewport.
- WID_TE_LAND_GENERATE = ::WID_TE_LAND_GENERATE, ///< Land generation.
- WID_TE_TOWN_GENERATE = ::WID_TE_TOWN_GENERATE, ///< Town building window.
- WID_TE_INDUSTRY = ::WID_TE_INDUSTRY, ///< Industry building window.
- WID_TE_ROADS = ::WID_TE_ROADS, ///< Road building menu.
- WID_TE_WATER = ::WID_TE_WATER, ///< Water building toolbar.
- WID_TE_TREES = ::WID_TE_TREES, ///< Tree building toolbar.
- WID_TE_SIGNS = ::WID_TE_SIGNS, ///< Sign building.
- WID_TE_DATE_PANEL = ::WID_TE_DATE_PANEL, ///< Container for the date widgets.
- /* The following three need to have the same actual widget number as the normal toolbar due to shared code. */
- WID_TE_MUSIC_SOUND = ::WID_TE_MUSIC_SOUND, ///< Music/sound configuration menu.
- WID_TE_HELP = ::WID_TE_HELP, ///< Help menu.
- WID_TE_SWITCH_BAR = ::WID_TE_SWITCH_BAR, ///< Only available when toolbar has been split to switch between different subsets.
- };
-
- /* automatically generated from ../../widgets/town_widget.h */
- /** Widgets of the #TownDirectoryWindow class. */
- enum TownDirectoryWidgets {
- WID_TD_SORT_ORDER = ::WID_TD_SORT_ORDER, ///< Direction of sort dropdown.
- WID_TD_SORT_CRITERIA = ::WID_TD_SORT_CRITERIA, ///< Criteria of sort dropdown.
- WID_TD_LIST = ::WID_TD_LIST, ///< List of towns.
- WID_TD_SCROLLBAR = ::WID_TD_SCROLLBAR, ///< Scrollbar for the town list.
- WID_TD_WORLD_POPULATION = ::WID_TD_WORLD_POPULATION, ///< The world's population.
- };
-
- /** Widgets of the #TownAuthorityWindow class. */
- enum TownAuthorityWidgets {
- WID_TA_CAPTION = ::WID_TA_CAPTION, ///< Caption of window.
- WID_TA_RATING_INFO = ::WID_TA_RATING_INFO, ///< Overview with ratings for each company.
- WID_TA_COMMAND_LIST = ::WID_TA_COMMAND_LIST, ///< List of commands for the player.
- WID_TA_SCROLLBAR = ::WID_TA_SCROLLBAR, ///< Scrollbar of the list of commands.
- WID_TA_ACTION_INFO = ::WID_TA_ACTION_INFO, ///< Additional information about the action.
- WID_TA_EXECUTE = ::WID_TA_EXECUTE, ///< Do-it button.
- };
-
- /** Widgets of the #TownViewWindow class. */
- enum TownViewWidgets {
- WID_TV_CAPTION = ::WID_TV_CAPTION, ///< Caption of window.
- WID_TV_VIEWPORT = ::WID_TV_VIEWPORT, ///< View of the center of the town.
- WID_TV_INFO = ::WID_TV_INFO, ///< General information about the town.
- WID_TV_CENTER_VIEW = ::WID_TV_CENTER_VIEW, ///< Center the main view on this town.
- WID_TV_SHOW_AUTHORITY = ::WID_TV_SHOW_AUTHORITY, ///< Show the town authority window.
- WID_TV_CHANGE_NAME = ::WID_TV_CHANGE_NAME, ///< Change the name of this town.
- WID_TV_EXPAND = ::WID_TV_EXPAND, ///< Expand this town (scenario editor only).
- WID_TV_DELETE = ::WID_TV_DELETE, ///< Delete this town (scenario editor only).
- };
-
- /** Widgets of the #FoundTownWindow class. */
- enum TownFoundingWidgets {
- WID_TF_NEW_TOWN = ::WID_TF_NEW_TOWN, ///< Create a new town.
- WID_TF_RANDOM_TOWN = ::WID_TF_RANDOM_TOWN, ///< Randomly place a town.
- WID_TF_MANY_RANDOM_TOWNS = ::WID_TF_MANY_RANDOM_TOWNS, ///< Randomly place many towns.
- WID_TF_TOWN_NAME_EDITBOX = ::WID_TF_TOWN_NAME_EDITBOX, ///< Editor for the town name.
- WID_TF_TOWN_NAME_RANDOM = ::WID_TF_TOWN_NAME_RANDOM, ///< Generate a random town name.
- WID_TF_SIZE_SMALL = ::WID_TF_SIZE_SMALL, ///< Selection for a small town.
- WID_TF_SIZE_MEDIUM = ::WID_TF_SIZE_MEDIUM, ///< Selection for a medium town.
- WID_TF_SIZE_LARGE = ::WID_TF_SIZE_LARGE, ///< Selection for a large town.
- WID_TF_SIZE_RANDOM = ::WID_TF_SIZE_RANDOM, ///< Selection for a randomly sized town.
- WID_TF_CITY = ::WID_TF_CITY, ///< Selection for the town's city state.
- WID_TF_LAYOUT_ORIGINAL = ::WID_TF_LAYOUT_ORIGINAL, ///< Selection for the original town layout.
- WID_TF_LAYOUT_BETTER = ::WID_TF_LAYOUT_BETTER, ///< Selection for the better town layout.
- WID_TF_LAYOUT_GRID2 = ::WID_TF_LAYOUT_GRID2, ///< Selection for the 2x2 grid town layout.
- WID_TF_LAYOUT_GRID3 = ::WID_TF_LAYOUT_GRID3, ///< Selection for the 3x3 grid town layout.
- WID_TF_LAYOUT_RANDOM = ::WID_TF_LAYOUT_RANDOM, ///< Selection for a randomly chosen town layout.
- };
-
- /* automatically generated from ../../widgets/transparency_widget.h */
- /** Widgets of the #TransparenciesWindow class. */
- enum TransparencyToolbarWidgets {
- /* Button row. */
- WID_TT_BEGIN = ::WID_TT_BEGIN, ///< First toggle button.
- WID_TT_SIGNS = ::WID_TT_SIGNS, ///< Signs background transparency toggle button.
- WID_TT_TREES = ::WID_TT_TREES, ///< Trees transparency toggle button.
- WID_TT_HOUSES = ::WID_TT_HOUSES, ///< Houses transparency toggle button.
- WID_TT_INDUSTRIES = ::WID_TT_INDUSTRIES, ///< industries transparency toggle button.
- WID_TT_BUILDINGS = ::WID_TT_BUILDINGS, ///< Company buildings and structures transparency toggle button.
- WID_TT_BRIDGES = ::WID_TT_BRIDGES, ///< Bridges transparency toggle button.
- WID_TT_STRUCTURES = ::WID_TT_STRUCTURES, ///< Object structure transparency toggle button.
- WID_TT_CATENARY = ::WID_TT_CATENARY, ///< Catenary transparency toggle button.
- WID_TT_LOADING = ::WID_TT_LOADING, ///< Loading indicators transparency toggle button.
- WID_TT_END = ::WID_TT_END, ///< End of toggle buttons.
-
- /* Panel with buttons for invisibility */
- WID_TT_BUTTONS = ::WID_TT_BUTTONS, ///< Panel with 'invisibility' buttons.
- };
-
- /* automatically generated from ../../widgets/tree_widget.h */
- /** Widgets of the #BuildTreesWindow class. */
- enum BuildTreesWidgets {
- WID_BT_TYPE_11 = ::WID_BT_TYPE_11, ///< Tree 1st column 1st row.
- WID_BT_TYPE_12 = ::WID_BT_TYPE_12, ///< Tree 1st column 2nd row.
- WID_BT_TYPE_13 = ::WID_BT_TYPE_13, ///< Tree 1st column 3rd row.
- WID_BT_TYPE_14 = ::WID_BT_TYPE_14, ///< Tree 1st column 4th row.
- WID_BT_TYPE_21 = ::WID_BT_TYPE_21, ///< Tree 2st column 1st row.
- WID_BT_TYPE_22 = ::WID_BT_TYPE_22, ///< Tree 2st column 2nd row.
- WID_BT_TYPE_23 = ::WID_BT_TYPE_23, ///< Tree 2st column 3rd row.
- WID_BT_TYPE_24 = ::WID_BT_TYPE_24, ///< Tree 2st column 4th row.
- WID_BT_TYPE_31 = ::WID_BT_TYPE_31, ///< Tree 3st column 1st row.
- WID_BT_TYPE_32 = ::WID_BT_TYPE_32, ///< Tree 3st column 2nd row.
- WID_BT_TYPE_33 = ::WID_BT_TYPE_33, ///< Tree 3st column 3rd row.
- WID_BT_TYPE_34 = ::WID_BT_TYPE_34, ///< Tree 3st column 4th row.
- WID_BT_TYPE_RANDOM = ::WID_BT_TYPE_RANDOM, ///< Button to build random type of tree.
- WID_BT_MANY_RANDOM = ::WID_BT_MANY_RANDOM, ///< Button to build many random trees.
- };
-
- /* automatically generated from ../../widgets/vehicle_widget.h */
- /** Widgets of the #VehicleViewWindow class. */
- enum VehicleViewWidgets {
- WID_VV_CAPTION = ::WID_VV_CAPTION, ///< Caption of window.
- WID_VV_VIEWPORT = ::WID_VV_VIEWPORT, ///< Viewport widget.
- WID_VV_START_STOP = ::WID_VV_START_STOP, ///< Start or stop this vehicle, and show information about the current state.
- WID_VV_CENTER_MAIN_VIEW = ::WID_VV_CENTER_MAIN_VIEW, ///< Center the main view on this vehicle.
- WID_VV_GOTO_DEPOT = ::WID_VV_GOTO_DEPOT, ///< Order this vehicle to go to the depot.
- WID_VV_REFIT = ::WID_VV_REFIT, ///< Open the refit window.
- WID_VV_SHOW_ORDERS = ::WID_VV_SHOW_ORDERS, ///< Show the orders of this vehicle.
- WID_VV_SHOW_DETAILS = ::WID_VV_SHOW_DETAILS, ///< Show details of this vehicle.
- WID_VV_CLONE = ::WID_VV_CLONE, ///< Clone this vehicle.
- WID_VV_SELECT_DEPOT_CLONE = ::WID_VV_SELECT_DEPOT_CLONE, ///< Selection widget between 'goto depot', and 'clone vehicle' buttons.
- WID_VV_SELECT_REFIT_TURN = ::WID_VV_SELECT_REFIT_TURN, ///< Selection widget between 'refit' and 'turn around' buttons.
- WID_VV_TURN_AROUND = ::WID_VV_TURN_AROUND, ///< Turn this vehicle around.
- WID_VV_FORCE_PROCEED = ::WID_VV_FORCE_PROCEED, ///< Force this vehicle to pass a signal at danger.
- };
-
- /** Widgets of the #RefitWindow class. */
- enum VehicleRefitWidgets {
- WID_VR_CAPTION = ::WID_VR_CAPTION, ///< Caption of window.
- WID_VR_VEHICLE_PANEL_DISPLAY = ::WID_VR_VEHICLE_PANEL_DISPLAY, ///< Display with a representation of the vehicle to refit.
- WID_VR_SHOW_HSCROLLBAR = ::WID_VR_SHOW_HSCROLLBAR, ///< Selection widget for the horizontal scrollbar.
- WID_VR_HSCROLLBAR = ::WID_VR_HSCROLLBAR, ///< Horizontal scrollbar or the vehicle display.
- WID_VR_SELECT_HEADER = ::WID_VR_SELECT_HEADER, ///< Header with question about the cargo to carry.
- WID_VR_MATRIX = ::WID_VR_MATRIX, ///< Options to refit to.
- WID_VR_SCROLLBAR = ::WID_VR_SCROLLBAR, ///< Scrollbar for the refit options.
- WID_VR_INFO = ::WID_VR_INFO, ///< Information about the currently selected refit option.
- WID_VR_REFIT = ::WID_VR_REFIT, ///< Perform the refit.
- };
-
- /** Widgets of the #VehicleDetailsWindow class. */
- enum VehicleDetailsWidgets {
- WID_VD_CAPTION = ::WID_VD_CAPTION, ///< Caption of window.
- WID_VD_RENAME_VEHICLE = ::WID_VD_RENAME_VEHICLE, ///< Rename this vehicle.
- WID_VD_TOP_DETAILS = ::WID_VD_TOP_DETAILS, ///< Panel with generic details.
- WID_VD_INCREASE_SERVICING_INTERVAL = ::WID_VD_INCREASE_SERVICING_INTERVAL, ///< Increase the servicing interval.
- WID_VD_DECREASE_SERVICING_INTERVAL = ::WID_VD_DECREASE_SERVICING_INTERVAL, ///< Decrease the servicing interval.
- WID_VD_SERVICE_INTERVAL_DROPDOWN = ::WID_VD_SERVICE_INTERVAL_DROPDOWN, ///< Dropdown to select default/days/percent service interval.
- WID_VD_SERVICING_INTERVAL = ::WID_VD_SERVICING_INTERVAL, ///< Information about the servicing interval.
- WID_VD_MIDDLE_DETAILS = ::WID_VD_MIDDLE_DETAILS, ///< Details for non-trains.
- WID_VD_MATRIX = ::WID_VD_MATRIX, ///< List of details for trains.
- WID_VD_SCROLLBAR = ::WID_VD_SCROLLBAR, ///< Scrollbar for train details.
- WID_VD_DETAILS_CARGO_CARRIED = ::WID_VD_DETAILS_CARGO_CARRIED, ///< Show carried cargo per part of the train.
- WID_VD_DETAILS_TRAIN_VEHICLES = ::WID_VD_DETAILS_TRAIN_VEHICLES, ///< Show all parts of the train with their description.
- WID_VD_DETAILS_CAPACITY_OF_EACH = ::WID_VD_DETAILS_CAPACITY_OF_EACH, ///< Show the capacity of all train parts.
- WID_VD_DETAILS_TOTAL_CARGO = ::WID_VD_DETAILS_TOTAL_CARGO, ///< Show the capacity and carried cargo amounts aggregated per cargo of the train.
- };
-
- /** Widgets of the #VehicleListWindow class. */
- enum VehicleListWidgets {
- WID_VL_CAPTION = ::WID_VL_CAPTION, ///< Caption of window.
- WID_VL_SORT_ORDER = ::WID_VL_SORT_ORDER, ///< Sort order.
- WID_VL_SORT_BY_PULLDOWN = ::WID_VL_SORT_BY_PULLDOWN, ///< Sort by dropdown list.
- WID_VL_LIST = ::WID_VL_LIST, ///< List of the vehicles.
- WID_VL_SCROLLBAR = ::WID_VL_SCROLLBAR, ///< Scrollbar for the list.
- WID_VL_HIDE_BUTTONS = ::WID_VL_HIDE_BUTTONS, ///< Selection to hide the buttons.
- WID_VL_AVAILABLE_VEHICLES = ::WID_VL_AVAILABLE_VEHICLES, ///< Available vehicles.
- WID_VL_MANAGE_VEHICLES_DROPDOWN = ::WID_VL_MANAGE_VEHICLES_DROPDOWN, ///< Manage vehicles dropdown list.
- WID_VL_STOP_ALL = ::WID_VL_STOP_ALL, ///< Stop all button.
- WID_VL_START_ALL = ::WID_VL_START_ALL, ///< Start all button.
- };
-
- /* automatically generated from ../../widgets/viewport_widget.h */
- /** Widgets of the #ExtraViewportWindow class. */
- enum ExtraViewportWidgets {
- WID_EV_CAPTION = ::WID_EV_CAPTION, ///< Caption of window.
- WID_EV_VIEWPORT = ::WID_EV_VIEWPORT, ///< The viewport.
- WID_EV_ZOOM_IN = ::WID_EV_ZOOM_IN, ///< Zoom in.
- WID_EV_ZOOM_OUT = ::WID_EV_ZOOM_OUT, ///< Zoom out.
- WID_EV_MAIN_TO_VIEW = ::WID_EV_MAIN_TO_VIEW, ///< Center the view of this viewport on the main view.
- WID_EV_VIEW_TO_MAIN = ::WID_EV_VIEW_TO_MAIN, ///< Center the main view on the view of this viewport.
- };
-
- /* automatically generated from ../../widgets/waypoint_widget.h */
- /** Widgets of the #WaypointWindow class. */
- enum WaypointWidgets {
- WID_W_CAPTION = ::WID_W_CAPTION, ///< Caption of window.
- WID_W_VIEWPORT = ::WID_W_VIEWPORT, ///< The viewport on this waypoint.
- WID_W_CENTER_VIEW = ::WID_W_CENTER_VIEW, ///< Center the main view on this waypoint.
- WID_W_RENAME = ::WID_W_RENAME, ///< Rename this waypoint.
- WID_W_SHOW_VEHICLES = ::WID_W_SHOW_VEHICLES, ///< Show the vehicles visiting this waypoint.
- };
-
- // @endenum
-};
-
-#endif /* SCRIPT_WINDOW_HPP */
diff --git a/src/script/api/template/template_window.hpp.sq.orig b/src/script/api/template/template_window.hpp.sq.orig
deleted file mode 100644
index 9f01e42d5a..0000000000
--- a/src/script/api/template/template_window.hpp.sq.orig
+++ /dev/null
@@ -1,257 +0,0 @@
-/* $Id$ */
-
-/*
- * This file is part of OpenTTD.
- * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
- * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see .
- */
-
-/* THIS FILE IS AUTO-GENERATED; PLEASE DO NOT ALTER MANUALLY */
-
-#include "../script_window.hpp"
-
-namespace SQConvert {
- /* Allow enums to be used as Squirrel parameters */
- template <> inline ScriptWindow::WindowNumberEnum GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::WindowNumberEnum)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::WindowNumberEnum res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::WindowClass GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::WindowClass)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::WindowClass res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::TextColour GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::TextColour)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::TextColour res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::NumberType GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::NumberType)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::NumberType res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::WidgetType GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::WidgetType)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::WidgetType res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::AIListWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::AIListWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::AIListWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::AISettingsWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::AISettingsWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::AISettingsWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::AIConfigWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::AIConfigWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::AIConfigWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::AIDebugWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::AIDebugWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::AIDebugWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::AirportToolbarWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::AirportToolbarWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::AirportToolbarWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::AirportPickerWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::AirportPickerWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::AirportPickerWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::ReplaceVehicleWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::ReplaceVehicleWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::ReplaceVehicleWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::BootstrapBackgroundWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::BootstrapBackgroundWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::BootstrapBackgroundWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::BootstrapAskForDownloadWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::BootstrapAskForDownloadWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::BootstrapAskForDownloadWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::BuildBridgeSelectionWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::BuildBridgeSelectionWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::BuildBridgeSelectionWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::BuildVehicleWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::BuildVehicleWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::BuildVehicleWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::CheatWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::CheatWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::CheatWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::CompanyWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::CompanyWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::CompanyWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::CompanyFinancesWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::CompanyFinancesWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::CompanyFinancesWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::SelectCompanyLiveryWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::SelectCompanyLiveryWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::SelectCompanyLiveryWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::SelectCompanyManagerFaceWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::SelectCompanyManagerFaceWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::SelectCompanyManagerFaceWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::CompanyInfrastructureWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::CompanyInfrastructureWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::CompanyInfrastructureWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::BuyCompanyWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::BuyCompanyWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::BuyCompanyWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::ConsoleWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::ConsoleWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::ConsoleWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::SetDateWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::SetDateWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::SetDateWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::DepotWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::DepotWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::DepotWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::BuildDockDepotWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::BuildDockDepotWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::BuildDockDepotWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::DockToolbarWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::DockToolbarWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::DockToolbarWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::DropdownMenuWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::DropdownMenuWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::DropdownMenuWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::EnginePreviewWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::EnginePreviewWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::EnginePreviewWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::ErrorMessageWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::ErrorMessageWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::ErrorMessageWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::SaveLoadWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::SaveLoadWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::SaveLoadWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::GenerateLandscapeWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::GenerateLandscapeWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::GenerateLandscapeWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::CreateScenarioWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::CreateScenarioWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::CreateScenarioWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::GenerationProgressWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::GenerationProgressWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::GenerationProgressWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::GoalListWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::GoalListWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::GoalListWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::GoalQuestionWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::GoalQuestionWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::GoalQuestionWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::GraphLegendWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::GraphLegendWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::GraphLegendWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::CompanyValueWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::CompanyValueWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::CompanyValueWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::PerformanceHistoryGraphWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::PerformanceHistoryGraphWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::PerformanceHistoryGraphWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::CargoPaymentRatesWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::CargoPaymentRatesWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::CargoPaymentRatesWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::CompanyLeagueWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::CompanyLeagueWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::CompanyLeagueWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::PerformanceRatingDetailsWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::PerformanceRatingDetailsWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::PerformanceRatingDetailsWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::GroupListWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::GroupListWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::GroupListWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::HighscoreWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::HighscoreWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::HighscoreWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::DynamicPlaceIndustriesWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::DynamicPlaceIndustriesWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::DynamicPlaceIndustriesWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::IndustryViewWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::IndustryViewWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::IndustryViewWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::IndustryDirectoryWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::IndustryDirectoryWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::IndustryDirectoryWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::IndustryCargoesWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::IndustryCargoesWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::IndustryCargoesWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::SelectGameIntroWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::SelectGameIntroWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::SelectGameIntroWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::LinkGraphLegendWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::LinkGraphLegendWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::LinkGraphLegendWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::MainWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::MainWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::MainWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::LandInfoWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::LandInfoWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::LandInfoWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::ToolTipsWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::ToolTipsWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::ToolTipsWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::AboutWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::AboutWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::AboutWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::QueryStringWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::QueryStringWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::QueryStringWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::QueryWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::QueryWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::QueryWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::TextfileWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::TextfileWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::TextfileWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::MusicTrackSelectionWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::MusicTrackSelectionWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::MusicTrackSelectionWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::MusicWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::MusicWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::MusicWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::NetWorkChatWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::NetWorkChatWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::NetWorkChatWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::NetworkContentDownloadStatusWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::NetworkContentDownloadStatusWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::NetworkContentDownloadStatusWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::NetworkContentListWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::NetworkContentListWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::NetworkContentListWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::NetworkGameWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::NetworkGameWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::NetworkGameWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::NetworkStartServerWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::NetworkStartServerWidgets)tmp; }
- template <> inline int Return(HSQUIRRELVM vm, ScriptWindow::NetworkStartServerWidgets res) { sq_pushinteger(vm, (int32)res); return 1; }
- template <> inline ScriptWindow::NetworkLobbyWidgets GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptWindow::NetworkLobbyWidgets)tmp; }
- template <> inline int Return