| 219 | } |
| 220 | |
| 221 | void OnPlaceObject([[maybe_unused]] Point pt, TileIndex tile) override |
| 222 | { |
| 223 | switch (this->last_user_action) { |
| 224 | case WID_TT_LOWER_LAND: // Lower land button |
| 225 | VpStartPlaceSizing(tile, VPM_X_AND_Y, DDSP_LOWER_AND_LEVEL_AREA); |
| 226 | break; |
| 227 | |
| 228 | case WID_TT_RAISE_LAND: // Raise land button |
| 229 | VpStartPlaceSizing(tile, VPM_X_AND_Y, DDSP_RAISE_AND_LEVEL_AREA); |
| 230 | break; |
| 231 | |
| 232 | case WID_TT_LEVEL_LAND: // Level land button |
| 233 | VpStartPlaceSizing(tile, VPM_X_AND_Y, DDSP_LEVEL_AREA); |
| 234 | break; |
| 235 | |
| 236 | case WID_TT_DEMOLISH: // Demolish aka dynamite button |
| 237 | PlaceProc_DemolishArea(tile); |
| 238 | break; |
| 239 | |
| 240 | case WID_TT_BUY_LAND: // Buy land button |
| 241 | VpStartPlaceSizing(tile, VPM_X_AND_Y, DDSP_BUILD_OBJECT); |
| 242 | break; |
| 243 | |
| 244 | case WID_TT_PLACE_SIGN: // Place sign button |
| 245 | PlaceProc_Sign(tile); |
| 246 | break; |
| 247 | |
| 248 | default: NOT_REACHED(); |
| 249 | } |
| 250 | } |
| 251 | |
| 252 | void OnPlaceDrag(ViewportPlaceMethod select_method, [[maybe_unused]] ViewportDragDropSelectionProcess select_proc, [[maybe_unused]] Point pt) override |
| 253 | { |
nothing calls this directly
no test coverage detected