From 2e6c813bd6a8b315c32e8e5d18d7a53d7219e82f Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Thu, 21 Feb 2002 00:20:22 +0000 Subject: [PATCH] Pass the current time stamp to viewWillScroll(). git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1063 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../threerings/media/animation/AnimatedPanel.java | 13 ++++++++++--- .../com/threerings/miso/client/SceneViewPanel.java | 4 ++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/java/com/threerings/media/animation/AnimatedPanel.java b/src/java/com/threerings/media/animation/AnimatedPanel.java index 106318205..a00b36341 100644 --- a/src/java/com/threerings/media/animation/AnimatedPanel.java +++ b/src/java/com/threerings/media/animation/AnimatedPanel.java @@ -1,5 +1,5 @@ // -// $Id: AnimatedPanel.java,v 1.15 2002/02/19 19:56:49 mdb Exp $ +// $Id: AnimatedPanel.java,v 1.16 2002/02/21 00:20:22 mdb Exp $ package com.threerings.media.animation; @@ -213,7 +213,7 @@ public class AnimatedPanel extends Canvas implements AnimatedView // let our derived classes do whatever they need to do to // prepare to be scrolled - viewWillScroll(dx, dy); + viewWillScroll(dx, dy, now); } } @@ -299,8 +299,15 @@ public class AnimatedPanel extends Canvas implements AnimatedView * contents of the offscreen buffer, but the derived class will need * to do whatever is necessary to prepare to repaint the exposed * regions as well as update it's own internal state accordingly. + * + * @param dx the distance (in pixels) that the view will scroll in the + * x direction. + * @param dy the distance (in pixels) that the view will scroll in the + * y direction. + * @param now the current time, provided because we have it and + * scrolling views are likely to want to use it in calculating stuff. */ - protected void viewWillScroll (int dx, int dy) + protected void viewWillScroll (int dx, int dy, long now) { // nothing to do here } diff --git a/src/java/com/threerings/miso/client/SceneViewPanel.java b/src/java/com/threerings/miso/client/SceneViewPanel.java index be0eec04d..9dc9574ab 100644 --- a/src/java/com/threerings/miso/client/SceneViewPanel.java +++ b/src/java/com/threerings/miso/client/SceneViewPanel.java @@ -1,5 +1,5 @@ // -// $Id: SceneViewPanel.java,v 1.34 2002/02/19 19:58:19 mdb Exp $ +// $Id: SceneViewPanel.java,v 1.35 2002/02/21 00:20:22 mdb Exp $ package com.threerings.miso.scene; @@ -130,7 +130,7 @@ public class SceneViewPanel extends AnimatedPanel /** * If we're scrolling, we need to pass the word on to our scene view. */ - protected void viewWillScroll (int dx, int dy) + protected void viewWillScroll (int dx, int dy, long now) { _view.viewWillScroll(dx, dy); }