Changeset - r17091:91a5bff32f6c
[Not reviewed]
master
0 1 0
rubidium - 13 years ago 2011-01-18 21:09:13
rubidium@openttd.org
(svn r21838) -Change: allow LMB scrolling with the mouse outside of the extra viewport instead of canceling scrolling when going slightly over the edge
1 file changed with 2 insertions and 5 deletions:
0 comments (0 inline, 0 general)
src/viewport_gui.cpp
Show inline comments
 
@@ -137,11 +137,8 @@ public:
 

	
 
	virtual void OnScroll(Point delta)
 
	{
 
		const ViewPort *vp = IsPtInWindowViewport(this, _cursor.pos.x, _cursor.pos.y);
 
		if (vp == NULL) return;
 

	
 
		this->viewport->scrollpos_x += ScaleByZoom(delta.x, vp->zoom);
 
		this->viewport->scrollpos_y += ScaleByZoom(delta.y, vp->zoom);
 
		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;
 
	}
0 comments (0 inline, 0 general)