OpenTTD

tilehighlight_func.h
Go to the documentation of this file.
1 /* $Id: tilehighlight_func.h 21627 2010-12-24 15:08:19Z alberth $ */
2
3 /*
4 * This file is part of OpenTTD.
5 * 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.
6 * 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.
7 * 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/>.
8 */
9
12 #ifndef TILEHIGHLIGHT_FUNC_H
13 #define TILEHIGHLIGHT_FUNC_H
14
15 #include "gfx_type.h"
16 #include "tilehighlight_type.h"
17
18 void PlaceProc_DemolishArea(TileIndex tile);
19 bool GUIPlaceProcDragXY(ViewportDragDropSelectionProcess proc, TileIndex start_tile, TileIndex end_tile);
20
21 bool HandlePlacePushButton(Window *w, int widget, CursorID cursor, HighLightStyle mode);
22 void SetObjectToPlaceWnd(CursorID icon, PaletteID pal, HighLightStyle mode, Window *w);
23 void SetObjectToPlace(CursorID icon, PaletteID pal, HighLightStyle mode, WindowClass window_class, WindowNumber window_num);
24 void ResetObjectToPlace();
25
26 void VpSelectTilesWithMethod(int x, int y, ViewportPlaceMethod method);
27 void VpStartPlaceSizing(TileIndex tile, ViewportPlaceMethod method, ViewportDragDropSelectionProcess process);
28 void VpSetPresizeRange(TileIndex from, TileIndex to);
29 void VpSetPlaceSizingLimit(int limit);
30
31 void UpdateTileSelection();
32
33 extern TileHighlightData _thd;
34
35 #endif /* TILEHIGHLIGHT_FUNC_H */
ViewportDragDropSelectionProcess
ViewportDragDropSelectionProcess
Drag and drop selection process, or, what to do with an area of land when you&#39;ve selected it...
Definition: viewport_type.h:97
PaletteID
uint32 PaletteID
The number of the palette.
Definition: gfx_type.h:20
GUIPlaceProcDragXY
bool GUIPlaceProcDragXY(ViewportDragDropSelectionProcess proc, TileIndex start_tile, TileIndex end_tile)
A central place to handle all X_AND_Y dragged GUI functions.
Definition: terraform_gui.cpp:108
HandlePlacePushButton
bool HandlePlacePushButton(Window *w, int widget, CursorID cursor, HighLightStyle mode)
This code is shared for the majority of the pushbuttons.
Definition: main_gui.cpp:103
UpdateTileSelection
void UpdateTileSelection()
Updates tile highlighting for all cases.
Definition: viewport.cpp:2355
VpSetPresizeRange
void VpSetPresizeRange(TileIndex from, TileIndex to)
Highlights all tiles between a set of two tiles.
Definition: viewport.cpp:2514
WindowClass
WindowClass
Window classes.
Definition: window_type.h:39
Window
Data structure for an opened window.
Definition: window_gui.h:271
ViewportPlaceMethod
ViewportPlaceMethod
Viewport place method (type of highlighted area and placed objects)
Definition: viewport_type.h:78
VpStartPlaceSizing
void VpStartPlaceSizing(TileIndex tile, ViewportPlaceMethod method, ViewportDragDropSelectionProcess process)
highlighting tiles while only going over them with the mouse
Definition: viewport.cpp:2471
VpSelectTilesWithMethod
void VpSelectTilesWithMethod(int x, int y, ViewportPlaceMethod method)
Selects tiles while dragging.
Definition: viewport.cpp:2940
SetObjectToPlaceWnd
void SetObjectToPlaceWnd(CursorID icon, PaletteID pal, HighLightStyle mode, Window *w)
Change the cursor and mouse click/drag handling to a mode for performing special operations like tile...
Definition: viewport.cpp:3151
tilehighlight_type.h
Types related to highlighting tiles.
TileIndex
uint32 TileIndex
The index/ID of a Tile.
Definition: tile_type.h:80
CursorID
uint32 CursorID
The number of the cursor (sprite)
Definition: gfx_type.h:21
SetObjectToPlace
void SetObjectToPlace(CursorID icon, PaletteID pal, HighLightStyle mode, WindowClass window_class, WindowNumber window_num)
Change the cursor and mouse click/drag handling to a mode for performing special operations like tile...
Definition: viewport.cpp:3166
HighLightStyle
HighLightStyle
Highlighting draw styles.
Definition: tilehighlight_type.h:21
TileHighlightData
Metadata about the current highlighting.
Definition: tilehighlight_type.h:48
WindowNumber
int32 WindowNumber
Number to differentiate different windows of the same class.
Definition: window_type.h:695
ResetObjectToPlace
void ResetObjectToPlace()
Reset the cursor and mouse mode handling back to default (normal cursor, only clicking in windows)...
Definition: viewport.cpp:3211
PlaceProc_DemolishArea
void PlaceProc_DemolishArea(TileIndex tile)
Start a drag for demolishing an area.
Definition: terraform_gui.cpp:147
gfx_type.h
Types related to the graphics and/or input devices.