1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-25 05:04:07 +01:00

Add: Vehicle window zoom with mouse wheel

This commit is contained in:
Steve Goldman
2024-06-13 11:21:16 -05:00
committed by rubidium42
parent c3a051a213
commit 72276e2d3c
3 changed files with 12 additions and 4 deletions

View File

@@ -3317,6 +3317,13 @@ public:
}
}
void OnMouseWheel(int wheel) override
{
if (_settings_client.gui.scrollwheel_scrolling != SWS_OFF) {
DoZoomInOutWindow(wheel < 0 ? ZOOM_IN : ZOOM_OUT, this, false);
}
}
void OnResize() override
{
if (this->viewport != nullptr) {