Files
@ r10584:111d4eaa7aa5
Branch filter:
Location: cpp/openttd-patchpack/source/src/vehicle_gui_base.h - annotation
r10584:111d4eaa7aa5
1.3 KiB
text/x-c
(svn r14847) -Codechange: generalise the circular search to search around a rectangle (PhilSophus)
r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10143:a762ad08a77e r10122:8be97f532491 r10207:a1fc2f2a33db r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 r10122:8be97f532491 | /* $Id$ */
/** @file vehicle_gui_base.h Functions/classes shared between the different vehicle list GUIs. */
#ifndef VEHICLE_GUI_BASE_H
#define VEHICLE_GUI_BASE_H
#include "sortlist_type.h"
/** Start of functions regarding vehicle list windows */
enum {
PLY_WND_PRC__OFFSET_TOP_WIDGET = 26,
PLY_WND_PRC__SIZE_OF_ROW_TINY = 13,
PLY_WND_PRC__SIZE_OF_ROW_SMALL = 26,
PLY_WND_PRC__SIZE_OF_ROW_BIG = 39,
};
typedef GUIList<const Vehicle*> GUIVehicleList;
struct BaseVehicleListWindow: public Window {
GUIVehicleList vehicles; ///< The list of vehicles
Listing *sorting; ///< Pointer to the vehicle type related sorting.
VehicleType vehicle_type; ///< The vehicle type that is sorted
static const StringID vehicle_sorter_names[];
static GUIVehicleList::SortFunction *const vehicle_sorter_funcs[];
BaseVehicleListWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number)
{
this->vehicles.SetSortFuncs(this->vehicle_sorter_funcs);
}
void DrawVehicleListItems(int x, VehicleID selected_vehicle);
void SortVehicleList();
void BuildVehicleList(Owner owner, uint16 index, uint16 window_type);
};
struct Sorting {
Listing aircraft;
Listing roadveh;
Listing ship;
Listing train;
};
extern Sorting _sorting;
#endif /* VEHICLE_GUI_BASE_H */
|