|
|
|
@ -1886,11 +1886,21 @@ bool ScrollWindowTo(int x, int y, int z, Window *w, bool instant)
|
|
|
|
|
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)
|
|
|
|
|
{
|
|
|
|
|
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)
|
|
|
|
|
{
|
|
|
|
|
TileIndex old;
|
|
|
|
|