2008-05-07 13:10:15 +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-07 13:10:15 +00:00
|
|
|
/** @file tilehighlight_func.h Functions related to tile highlights. */
|
|
|
|
|
|
|
|
#ifndef TILEHIGHLIGHT_FUNC_H
|
|
|
|
#define TILEHIGHLIGHT_FUNC_H
|
|
|
|
|
|
|
|
#include "gfx_type.h"
|
|
|
|
#include "window_type.h"
|
|
|
|
#include "viewport_type.h"
|
|
|
|
#include "tilehighlight_type.h"
|
|
|
|
|
|
|
|
typedef void PlaceProc(TileIndex tile);
|
|
|
|
void PlaceProc_DemolishArea(TileIndex tile);
|
2008-05-18 12:40:38 +00:00
|
|
|
bool GUIPlaceProcDragXY(ViewportDragDropSelectionProcess proc, TileIndex start_tile, TileIndex end_tile);
|
2008-05-07 13:10:15 +00:00
|
|
|
|
2009-04-19 10:31:30 +00:00
|
|
|
bool HandlePlacePushButton(Window *w, int widget, CursorID cursor, HighLightStyle mode, PlaceProc *placeproc);
|
|
|
|
void SetObjectToPlaceWnd(CursorID icon, SpriteID pal, HighLightStyle mode, Window *w);
|
|
|
|
void SetObjectToPlace(CursorID icon, SpriteID pal, HighLightStyle mode, WindowClass window_class, WindowNumber window_num);
|
2008-05-08 13:29:35 +00:00
|
|
|
void ResetObjectToPlace();
|
2008-05-07 13:10:15 +00:00
|
|
|
|
2008-05-08 13:21:55 +00:00
|
|
|
void VpSelectTilesWithMethod(int x, int y, ViewportPlaceMethod method);
|
|
|
|
void VpStartPlaceSizing(TileIndex tile, ViewportPlaceMethod method, ViewportDragDropSelectionProcess process);
|
|
|
|
void VpSetPresizeRange(TileIndex from, TileIndex to);
|
|
|
|
void VpSetPlaceSizingLimit(int limit);
|
|
|
|
|
2009-01-13 17:28:11 +00:00
|
|
|
void UpdateTileSelection();
|
|
|
|
|
2008-05-07 13:10:15 +00:00
|
|
|
extern PlaceProc *_place_proc;
|
|
|
|
extern TileHighlightData _thd;
|
|
|
|
|
|
|
|
#endif /* TILEHIGHLIGHT_FUNC_H */
|