Let's inform the derived classes of the delta rather than the new _vbounds
upper left which is something they're already much more likely to be making use of directly. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2443 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: VirtualMediaPanel.java,v 1.15 2003/04/17 19:21:16 mdb Exp $
|
// $Id: VirtualMediaPanel.java,v 1.16 2003/04/22 18:12:40 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.media;
|
package com.threerings.media;
|
||||||
|
|
||||||
@@ -226,14 +226,19 @@ public class VirtualMediaPanel extends MediaPanel
|
|||||||
_vbounds.x = _nx; _vbounds.y = _ny;
|
_vbounds.x = _nx; _vbounds.y = _ny;
|
||||||
|
|
||||||
// let derived classes react if they so desire
|
// let derived classes react if they so desire
|
||||||
viewLocationDidChange(_vbounds.x, _vbounds.y);
|
viewLocationDidChange(_dx, _dy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called during our tick when we have adjusted the view location.
|
* Called during our tick when we have adjusted the view location. The
|
||||||
|
* {@link _vbounds} will already have been updated to reflect our new
|
||||||
|
* view coordinates.
|
||||||
|
*
|
||||||
|
* @param dx the delta scrolled in the x direction (in pixels).
|
||||||
|
* @param dy the delta scrolled in the y direction (in pixels).
|
||||||
*/
|
*/
|
||||||
protected void viewLocationDidChange (int nx, int ny)
|
protected void viewLocationDidChange (int dx, int dy)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: MisoScenePanel.java,v 1.11 2003/04/21 17:56:55 mdb Exp $
|
// $Id: MisoScenePanel.java,v 1.12 2003/04/22 18:12:40 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.miso.client;
|
package com.threerings.miso.client;
|
||||||
|
|
||||||
@@ -519,11 +519,13 @@ public class MisoScenePanel extends VirtualMediaPanel
|
|||||||
}
|
}
|
||||||
|
|
||||||
// documentation inherited
|
// documentation inherited
|
||||||
protected void viewLocationDidChange (int nx, int ny)
|
protected void viewLocationDidChange (int dx, int dy)
|
||||||
{
|
{
|
||||||
|
super.viewLocationDidChange(dx, dy);
|
||||||
|
|
||||||
// compute the tile coordinates of our upper left screen
|
// compute the tile coordinates of our upper left screen
|
||||||
// coordinate and request a rethink if they've changed
|
// coordinate and request a rethink if they've changed
|
||||||
MisoUtil.screenToTile(_metrics, nx, ny, _tcoords);
|
MisoUtil.screenToTile(_metrics, _vbounds.x, _vbounds.y, _tcoords);
|
||||||
if (!_tcoords.equals(_ulpos)) {
|
if (!_tcoords.equals(_ulpos)) {
|
||||||
_ulpos.setLocation(_tcoords);
|
_ulpos.setLocation(_tcoords);
|
||||||
rethink();
|
rethink();
|
||||||
|
|||||||
Reference in New Issue
Block a user