From 53afb875f0ff827131a1db4b51d0c9416f13525b Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Wed, 20 Oct 2004 02:23:36 +0000 Subject: [PATCH] Position the pieces before adding them to the view. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3150 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../com/threerings/puzzle/drop/client/DropBoardView.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/java/com/threerings/puzzle/drop/client/DropBoardView.java b/src/java/com/threerings/puzzle/drop/client/DropBoardView.java index 6d4620cfe..c8b9d32ec 100644 --- a/src/java/com/threerings/puzzle/drop/client/DropBoardView.java +++ b/src/java/com/threerings/puzzle/drop/client/DropBoardView.java @@ -1,5 +1,5 @@ // -// $Id: DropBoardView.java,v 1.7 2004/09/16 00:08:28 mdb Exp $ +// $Id: DropBoardView.java,v 1.8 2004/10/20 02:23:36 mdb Exp $ // // Narya library - tools for developing networked games // Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved @@ -197,7 +197,13 @@ public abstract class DropBoardView extends PuzzleBoardView } Sprite sprite = createPieceSprite(piece, sx, sy); if (sprite != null) { + // position the piece properly to start + Point start = new Point(); + getPiecePosition(sx, sy, start); + sprite.setLocation(start.x, start.y); + // now add it to the view addSprite(sprite); + // and potentially move it into place movePiece(sprite, sx, sy, tx, ty, duration); } }