We need to translate mouse wheel events as well.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3304 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -21,10 +21,11 @@
|
|||||||
|
|
||||||
package com.threerings.media;
|
package com.threerings.media;
|
||||||
|
|
||||||
import java.awt.Graphics;
|
|
||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
|
import java.awt.Graphics;
|
||||||
import java.awt.Rectangle;
|
import java.awt.Rectangle;
|
||||||
import java.awt.event.MouseEvent;
|
import java.awt.event.MouseEvent;
|
||||||
|
import java.awt.event.MouseWheelEvent;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import javax.swing.SwingUtilities;
|
import javax.swing.SwingUtilities;
|
||||||
@@ -163,6 +164,17 @@ public class VirtualMediaPanel extends MediaPanel
|
|||||||
super.processMouseMotionEvent(event);
|
super.processMouseMotionEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* We overload this to translate mouse events into the proper
|
||||||
|
* coordinates before they are dispatched to any of the mouse
|
||||||
|
* listeners.
|
||||||
|
*/
|
||||||
|
protected void processMouseWheelEvent (MouseWheelEvent event)
|
||||||
|
{
|
||||||
|
event.translatePoint(_vbounds.x, _vbounds.y);
|
||||||
|
super.processMouseWheelEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
// documentation inherited
|
// documentation inherited
|
||||||
protected void dirtyScreenRect (Rectangle rect)
|
protected void dirtyScreenRect (Rectangle rect)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user