The GUI for depots. More...
#include "stdafx.h"
#include "train.h"
#include "ship.h"
#include "aircraft.h"
#include "gui.h"
#include "textbuf_gui.h"
#include "viewport_func.h"
#include "command_func.h"
#include "depot_base.h"
#include "spritecache.h"
#include "strings_func.h"
#include "vehicle_func.h"
#include "company_func.h"
#include "tilehighlight_func.h"
#include "window_gui.h"
#include "vehiclelist.h"
#include "order_backup.h"
#include "zoom_func.h"
#include "widgets/depot_widget.h"
#include "table/strings.h"
Go to the source code of this file.
Data Structures | |
struct | DepotWindow |
struct | DepotWindow::GetDepotVehiclePtData |
Functions | |
void | DepotSortList (VehicleList *list) |
void | CcCloneVehicle (const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2) |
This is the Callback method after the cloning attempt of a vehicle. | |
static void | TrainDepotMoveVehicle (const Vehicle *wagon, VehicleID sel, const Vehicle *head) |
static void | InitBlocksizeForShipAircraft (VehicleType type) |
void | InitDepotWindowBlockSizes () |
Set the size of the blocks in the window so we can be sure that they are big enough for the vehicle sprites in the current game. | |
static void | DepotSellAllConfirmationCallback (Window *w, bool confirmed) |
const Sprite * | GetAircraftSprite (EngineID engine) |
void | ShowDepotWindow (TileIndex tile, VehicleType type) |
Opens a depot window. | |
void | DeleteDepotHighlightOfVehicle (const Vehicle *v) |
Removes the highlight of a vehicle in a depot window. | |
Variables | |
static const NWidgetPart | _nested_train_depot_widgets [] |
Nested widget definition for train depots. | |
static const WindowDesc | _train_depot_desc (WDP_AUTO, 362, 123, WC_VEHICLE_DEPOT, WC_NONE, WDF_UNCLICK_BUTTONS, _nested_train_depot_widgets, lengthof(_nested_train_depot_widgets)) |
static const WindowDesc | _road_depot_desc (WDP_AUTO, 316, 97, WC_VEHICLE_DEPOT, WC_NONE, WDF_UNCLICK_BUTTONS, _nested_train_depot_widgets, lengthof(_nested_train_depot_widgets)) |
static const WindowDesc | _ship_depot_desc (WDP_AUTO, 306, 99, WC_VEHICLE_DEPOT, WC_NONE, WDF_UNCLICK_BUTTONS, _nested_train_depot_widgets, lengthof(_nested_train_depot_widgets)) |
static const WindowDesc | _aircraft_depot_desc (WDP_AUTO, 332, 99, WC_VEHICLE_DEPOT, WC_NONE, WDF_UNCLICK_BUTTONS, _nested_train_depot_widgets, lengthof(_nested_train_depot_widgets)) |
static Dimension | _base_block_sizes [4] |
Array containing the cell size in pixels of the WID_D_MATRIX widget for each vehicle type. |
The GUI for depots.
Definition in file depot_gui.cpp.
void CcCloneVehicle | ( | const CommandCost & | result, | |
TileIndex | tile, | |||
uint32 | p1, | |||
uint32 | p2 | |||
) |
This is the Callback method after the cloning attempt of a vehicle.
result | the result of the cloning command | |
tile | unused | |
p1 | unused | |
p2 | unused |
Definition at line 117 of file depot_gui.cpp.
References CommandCost::Failed(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_vehicle_pool >::Get(), and ShowVehicleViewWindow().
Referenced by VehicleViewWindow::OnClick(), and DepotWindow::OnVehicleSelect().
void DeleteDepotHighlightOfVehicle | ( | const Vehicle * | v | ) |
Removes the highlight of a vehicle in a depot window.
*v | Vehicle to remove all highlights from |
Definition at line 1006 of file depot_gui.cpp.
References _special_mouse_mode, FindWindowById(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem< Tpool >::index, Vehicle::tile, WC_VEHICLE_DEPOT, and WSM_DRAGDROP.
Referenced by Vehicle::PreDestructor().
void InitDepotWindowBlockSizes | ( | ) |
Set the size of the blocks in the window so we can be sure that they are big enough for the vehicle sprites in the current game.
Definition at line 185 of file depot_gui.cpp.
References GetVehicleHeight(), VEH_AIRCRAFT, VEH_ROAD, VEH_SHIP, and VEH_TRAIN.
Referenced by AfterLoadGRFs().
void ShowDepotWindow | ( | TileIndex | tile, | |
VehicleType | type | |||
) |
Opens a depot window.
tile | The tile where the depot/hangar is located | |
type | The type of vehicles in the depot |
Definition at line 986 of file depot_gui.cpp.
References BringWindowToFrontById(), VEH_AIRCRAFT, VEH_ROAD, VEH_SHIP, VEH_TRAIN, and WC_VEHICLE_DEPOT.
Dimension _base_block_sizes[4] [static] |
Array containing the cell size in pixels of the WID_D_MATRIX widget for each vehicle type.
Definition at line 148 of file depot_gui.cpp.
const NWidgetPart _nested_train_depot_widgets[] [static] |
Nested widget definition for train depots.
Definition at line 42 of file depot_gui.cpp.