@@ -2025,29 +2025,30 @@ void UpdateTileSelection()
_thd.dirty = 0xff;
/* draw the new selection? */
if (_thd.new_drawstyle) SetSelectionTilesDirty();
}
/**
* Displays the measurement tooltips when selecting multiple tiles
* @param str String to be displayed
* @param paramcount number of params to deal with
* @param params (optional) up to 5 pieces of additional information that may be added to a tooltip
* @param close_cond Condition for closing this tooltip.
*/
static inline void ShowMeasurementTooltips(StringID str, uint paramcount, const uint64 params[])
static inline void ShowMeasurementTooltips(StringID str, uint paramcount, const uint64 params[], TooltipCloseCondition close_cond = TCC_LEFT_CLICK)
{
if (!_settings_client.gui.measure_tooltip) return;
GuiShowTooltips(str, paramcount, params, TCC_LEFT_CLICK);
GuiShowTooltips(str, paramcount, params, close_cond);
/** highlighting tiles while only going over them with the mouse */
void VpStartPlaceSizing(TileIndex tile, ViewportPlaceMethod method, ViewportDragDropSelectionProcess process)
_thd.select_method = method;
_thd.select_proc = process;
_thd.selend.x = TileX(tile) * TILE_SIZE;
_thd.selstart.x = TileX(tile) * TILE_SIZE;
_thd.selend.y = TileY(tile) * TILE_SIZE;
_thd.selstart.y = TileY(tile) * TILE_SIZE;
@@ -2086,25 +2087,25 @@ void VpSetPlaceSizingLimit(int limit)
void VpSetPresizeRange(TileIndex from, TileIndex to)
uint64 distance = DistanceManhattan(from, to) + 1;
_thd.selend.x = TileX(to) * TILE_SIZE;
_thd.selend.y = TileY(to) * TILE_SIZE;
_thd.selstart.x = TileX(from) * TILE_SIZE;
_thd.selstart.y = TileY(from) * TILE_SIZE;
_thd.next_drawstyle = HT_RECT;
/* show measurement only if there is any length to speak of */
if (distance > 1) ShowMeasurementTooltips(STR_MEASURE_LENGTH, 1, &distance);
if (distance > 1) ShowMeasurementTooltips(STR_MEASURE_LENGTH, 1, &distance, TCC_HOVER);
static void VpStartPreSizing()
_thd.selend.x = -1;
_special_mouse_mode = WSM_PRESIZE;
* returns information about the 2x1 piece to be build.
* The lower bits (0-3) are the track type.
Status change: