2008-05-27 12:24:23 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
2009-08-21 20:21:05 +00:00
|
|
|
/*
|
|
|
|
* 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 <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2008-05-27 12:24:23 +00:00
|
|
|
/** @file engine_gui.h Engine GUI functions, used by build_vehicle_gui and autoreplace_gui */
|
|
|
|
|
|
|
|
#ifndef ENGINE_GUI_H
|
|
|
|
#define ENGINE_GUI_H
|
|
|
|
|
2010-01-15 16:41:15 +00:00
|
|
|
#include "engine_type.h"
|
2008-05-28 17:29:27 +00:00
|
|
|
#include "sortlist_type.h"
|
2010-01-15 16:41:15 +00:00
|
|
|
#include "gfx_type.h"
|
2008-05-27 12:24:23 +00:00
|
|
|
|
2009-04-12 17:38:01 +00:00
|
|
|
typedef GUIList<EngineID, CargoID> GUIEngineList;
|
2008-05-27 12:24:23 +00:00
|
|
|
|
2009-09-13 17:47:07 +00:00
|
|
|
typedef int CDECL EngList_SortTypeFunction(const EngineID*, const EngineID*); ///< argument type for EngList_Sort()
|
|
|
|
void EngList_Sort(GUIEngineList *el, EngList_SortTypeFunction compare); ///< sort of the engine list
|
|
|
|
void EngList_SortPartial(GUIEngineList *el, EngList_SortTypeFunction compare, uint begin, uint num_items); ///< sort of specified portion of the engine list
|
2008-05-27 12:24:23 +00:00
|
|
|
|
2009-08-30 17:54:11 +00:00
|
|
|
StringID GetEngineCategoryName(EngineID engine);
|
2009-08-30 18:41:03 +00:00
|
|
|
StringID GetEngineInfoString(EngineID engine);
|
2009-11-16 17:15:42 +00:00
|
|
|
|
2010-01-21 01:38:13 +00:00
|
|
|
void DrawVehicleEngine(int left, int right, int preferred_x, int y, EngineID engine, PaletteID pal);
|
|
|
|
void DrawTrainEngine(int left, int right, int preferred_x, int y, EngineID engine, PaletteID pal);
|
|
|
|
void DrawRoadVehEngine(int left, int right, int preferred_x, int y, EngineID engine, PaletteID pal);
|
|
|
|
void DrawShipEngine(int left, int right, int preferred_x, int y, EngineID engine, PaletteID pal);
|
|
|
|
void DrawAircraftEngine(int left, int right, int preferred_x, int y, EngineID engine, PaletteID pal);
|
2009-08-30 17:38:28 +00:00
|
|
|
|
2008-05-27 12:24:23 +00:00
|
|
|
#endif /* ENGINE_GUI_H */
|