@@ -125,24 +125,29 @@ public:
nvp->UpdateViewportCoordinates(this);
}
void OnScroll(Point delta) override
{
this->viewport->scrollpos_x += ScaleByZoom(delta.x, this->viewport->zoom);
this->viewport->scrollpos_y += ScaleByZoom(delta.y, this->viewport->zoom);
this->viewport->dest_scrollpos_x = this->viewport->scrollpos_x;
this->viewport->dest_scrollpos_y = this->viewport->scrollpos_y;
bool OnRightClick(Point pt, int widget) override
return widget == WID_EV_VIEWPORT;
void OnMouseWheel(int wheel) override
if (_settings_client.gui.scrollwheel_scrolling != 2) {
ZoomInOrOutToCursorWindow(wheel < 0, this);
/**
* Some data on this window has become invalid.
* @param data Information about the changed data.
* @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
*/
Status change: