From eb8e85c503d86fa1c1ec0362b1ba33d36bf0aa77 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Fri, 31 May 2002 07:34:23 +0000 Subject: [PATCH] Test new path-scrolled media panel. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1413 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../com/threerings/miso/client/ScrollingTestApp.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/src/java/com/threerings/miso/client/ScrollingTestApp.java b/tests/src/java/com/threerings/miso/client/ScrollingTestApp.java index aacd2d348..4935d58f9 100644 --- a/tests/src/java/com/threerings/miso/client/ScrollingTestApp.java +++ b/tests/src/java/com/threerings/miso/client/ScrollingTestApp.java @@ -1,5 +1,5 @@ // -// $Id: ScrollingTestApp.java,v 1.12 2002/04/27 04:57:37 mdb Exp $ +// $Id: ScrollingTestApp.java,v 1.13 2002/05/31 07:34:23 mdb Exp $ package com.threerings.miso.scene; @@ -8,6 +8,7 @@ import java.awt.GraphicsConfiguration; import java.awt.GraphicsDevice; import java.awt.GraphicsEnvironment; import java.awt.Image; +import java.awt.Point; import java.io.IOException; import java.util.Iterator; @@ -24,6 +25,7 @@ import com.threerings.media.sprite.MultiFrameImage; import com.threerings.media.sprite.MultiFrameImageImpl; import com.threerings.media.tile.bundle.BundledTileSetRepository; +import com.threerings.media.util.LinePath; import com.threerings.cast.CharacterComponent; import com.threerings.cast.CharacterDescriptor; @@ -96,14 +98,18 @@ public class ScrollingTestApp protected void viewFinishedScrolling () { // keep scrolling for a spell if (++_sidx < DX.length) { - setScrolling(DX[_sidx], DY[_sidx], 3000l); + LinePath path = new LinePath(_foo.x, _foo.y, + _foo.x + DX[_sidx], + _foo.y + DY[_sidx], 3000l); + setPath(path, _foo); } } + protected Point _foo = new Point(); protected int _sidx = -1; protected final int[] DX = { 0, 1000, -1000, 1000, 2000 }; protected final int[] DY = { 1000, 0, 1000, -1000, 1000 }; }; - _panel.setScrolling(0, 1000, 10000l); + _panel.setScrolling(0, 1000, 3000l); _frame.setPanel(_panel); // create our "ship" sprite