mirror of https://github.com/OpenTTD/OpenTTD
(svn r17867) -Codechange: Prepare BaseVehicleListWindow for nested widgets.
parent
38687193fe
commit
bd05f2eca6
|
@ -807,7 +807,7 @@ static void DrawVehicleImage(const Vehicle *v, int x, int y, VehicleID selection
|
||||||
* @param line_height Height of a single item line.
|
* @param line_height Height of a single item line.
|
||||||
* @param r Rectangle with edge positions of the matrix widget.
|
* @param r Rectangle with edge positions of the matrix widget.
|
||||||
*/
|
*/
|
||||||
void BaseVehicleListWindow::DrawVehicleListItems(VehicleID selected_vehicle, int line_height, const Rect &r)
|
void BaseVehicleListWindow::DrawVehicleListItems(VehicleID selected_vehicle, int line_height, const Rect &r) const
|
||||||
{
|
{
|
||||||
int left = r.left + WD_MATRIX_LEFT;
|
int left = r.left + WD_MATRIX_LEFT;
|
||||||
int right = r.right - WD_MATRIX_RIGHT;
|
int right = r.right - WD_MATRIX_RIGHT;
|
||||||
|
|
|
@ -37,7 +37,12 @@ struct BaseVehicleListWindow: public Window {
|
||||||
this->vehicles.SetSortFuncs(this->vehicle_sorter_funcs);
|
this->vehicles.SetSortFuncs(this->vehicle_sorter_funcs);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DrawVehicleListItems(VehicleID selected_vehicle, int line_height, const Rect &r);
|
BaseVehicleListWindow() : Window()
|
||||||
|
{
|
||||||
|
this->vehicles.SetSortFuncs(this->vehicle_sorter_funcs);
|
||||||
|
}
|
||||||
|
|
||||||
|
void DrawVehicleListItems(VehicleID selected_vehicle, int line_height, const Rect &r) const;
|
||||||
void SortVehicleList();
|
void SortVehicleList();
|
||||||
void BuildVehicleList(Owner owner, uint16 index, uint16 window_type);
|
void BuildVehicleList(Owner owner, uint16 index, uint16 window_type);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue