| 291 | } |
| 292 | |
| 293 | void OnPlacePresize([[maybe_unused]] Point pt, TileIndex tile_from) override |
| 294 | { |
| 295 | TileIndex tile_to = tile_from; |
| 296 | |
| 297 | if (this->last_clicked_widget == WID_DT_BUILD_AQUEDUCT) { |
| 298 | GetOtherAqueductEnd(tile_from, &tile_to); |
| 299 | } else { |
| 300 | DiagDirection dir = GetInclinedSlopeDirection(GetTileSlope(tile_from)); |
| 301 | if (IsValidDiagDirection(dir)) { |
| 302 | /* Locks and docks always select the tile "down" the slope. */ |
| 303 | tile_to = TileAddByDiagDir(tile_from, ReverseDiagDir(dir)); |
| 304 | /* Locks also select the tile "up" the slope. */ |
| 305 | if (this->last_clicked_widget == WID_DT_LOCK) tile_from = TileAddByDiagDir(tile_from, dir); |
| 306 | } |
| 307 | } |
| 308 | |
| 309 | VpSetPresizeRange(tile_from, tile_to); |
| 310 | } |
| 311 | |
| 312 | /** |
| 313 | * Handler for global hotkeys of the BuildDocksToolbarWindow. |
nothing calls this directly
no test coverage detected