mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-12 18:40:29 +00:00
(svn r21018) -Doc: Add Doxygen comments to some function.
This commit is contained in:
parent
af941fc598
commit
8f24ec9471
@ -128,8 +128,13 @@ void ShowNetworkGiveMoneyWindow(CompanyID company)
|
|||||||
#endif /* ENABLE_NETWORK */
|
#endif /* ENABLE_NETWORK */
|
||||||
|
|
||||||
|
|
||||||
/* Zooms a viewport in a window in or out
|
/**
|
||||||
* No button handling or what so ever */
|
* Zooms a viewport in a window in or out.
|
||||||
|
* @param how Zooming direction.
|
||||||
|
* @param w Window owning the viewport.
|
||||||
|
* @return Returns \c true if zooming step could be done, \c false if further zooming is not possible.
|
||||||
|
* @note No button handling or what so ever is done.
|
||||||
|
*/
|
||||||
bool DoZoomInOutWindow(ZoomStateChange how, Window *w)
|
bool DoZoomInOutWindow(ZoomStateChange how, Window *w)
|
||||||
{
|
{
|
||||||
ViewPort *vp;
|
ViewPort *vp;
|
||||||
|
@ -1886,11 +1886,21 @@ bool ScrollWindowTo(int x, int y, int z, Window *w, bool instant)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Scrolls the viewport of the main window to a given location.
|
||||||
|
* @param tile Desired tile to center on.
|
||||||
|
* @param instant Jump to the location instead of slowly moving to it.
|
||||||
|
* @return Destination of the viewport was changed (to activate other actions when the viewport is already at the desired position).
|
||||||
|
*/
|
||||||
bool ScrollMainWindowToTile(TileIndex tile, bool instant)
|
bool ScrollMainWindowToTile(TileIndex tile, bool instant)
|
||||||
{
|
{
|
||||||
return ScrollMainWindowTo(TileX(tile) * TILE_SIZE + TILE_SIZE / 2, TileY(tile) * TILE_SIZE + TILE_SIZE / 2, -1, instant);
|
return ScrollMainWindowTo(TileX(tile) * TILE_SIZE + TILE_SIZE / 2, TileY(tile) * TILE_SIZE + TILE_SIZE / 2, -1, instant);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set a tile to display a red error square.
|
||||||
|
* @param tile Tile that should show the red error square.
|
||||||
|
*/
|
||||||
void SetRedErrorSquare(TileIndex tile)
|
void SetRedErrorSquare(TileIndex tile)
|
||||||
{
|
{
|
||||||
TileIndex old;
|
TileIndex old;
|
||||||
|
@ -51,10 +51,14 @@ struct ViewportSign {
|
|||||||
void MarkDirty() const;
|
void MarkDirty() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Directions of zooming.
|
||||||
|
* @see DoZoomInOutWindow
|
||||||
|
*/
|
||||||
enum ZoomStateChange {
|
enum ZoomStateChange {
|
||||||
ZOOM_IN = 0,
|
ZOOM_IN = 0, ///< Zoom in (get more detailed view).
|
||||||
ZOOM_OUT = 1,
|
ZOOM_OUT = 1, ///< Zoom out (get helicopter view).
|
||||||
ZOOM_NONE = 2, // hack, used to update the button status
|
ZOOM_NONE = 2, ///< Hack, used to update the button status.
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user