| 437 | } |
| 438 | |
| 439 | void OnMouseWheel(int wheel, WidgetID widget) override |
| 440 | { |
| 441 | if (widget != WID_M_VIEWPORT) return; |
| 442 | if (_settings_client.gui.scrollwheel_scrolling != SWS_OFF) { |
| 443 | bool in = wheel < 0; |
| 444 | |
| 445 | /* When following, only change zoom - otherwise zoom to the cursor. */ |
| 446 | if (this->viewport->follow_vehicle != VehicleID::Invalid()) { |
| 447 | DoZoomInOutWindow(in ? ZOOM_IN : ZOOM_OUT, this); |
| 448 | } else { |
| 449 | ZoomInOrOutToCursorWindow(in, this); |
| 450 | } |
| 451 | } |
| 452 | } |
| 453 | |
| 454 | void OnResize() override |
| 455 | { |
nothing calls this directly
no test coverage detected