Commit Graph

20 Commits

Author SHA1 Message Date
Michael Bayne a88799d4a1 Scroll fiddling! We no longer set a desired x and y velocity directly,
instead we say that we want to scroll by a certain amount in a certain
amount of time. This allows the animated panel (who knows about this
stuff) to figure out when to stop scrolling without overshooting by a
pixel or two.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1244 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-15 17:46:41 +00:00
Michael Bayne 20e39601c8 Changed AnimatedPanel to a JComponent from a Canvas because we no longer
need to extend the latter.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1207 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-06 04:49:43 +00:00
Michael Bayne ad5a5c4e6d Added (and commented out) some handy debug logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1099 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-08 01:37:51 +00:00
Michael Bayne 137e9e9ea8 Revampola! Moved the code that handles viewport offset into the animated
panel; restructured things so everyone deals with "view" coordinates
rather than screen coordinates and the animated panel takes care of doing
the final translation before rendering.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1065 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-21 06:01:29 +00:00
Michael Bayne 2e6c813bd6 Pass the current time stamp to viewWillScroll().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1063 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-21 00:20:22 +00:00
Michael Bayne d869e1168e Let our sprite manager know when we scroll; modified the rendering such
that scrolled views are copied to the display in their entirety instead of
just updating the dirtied regions (because we can't scroll the visible
screen buffer and then paint on top of it because the user will see things
in an intermediate stage).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1046 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 19:56:49 +00:00
Michael Bayne 3e68fd8994 Clear out our back buffer when we're validated (as we probably changed
sizes).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1037 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 07:19:04 +00:00
Michael Bayne 7db44c5ee3 Let the animated panel handle invalidating the regions exposed by
scrolling so that it can do so with the actual dimensions of the panel
(the scene view only knows how big its model wants to be). Changed
scrollView to viewWillScroll to more accurately reflect what's going on.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1036 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 05:03:17 +00:00
Michael Bayne f2f6407c1e Need to account for negative scrolling deltas.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1034 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 04:45:14 +00:00
Michael Bayne a6f63ee873 Need to set the absolute value of the velocity.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1030 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 03:57:30 +00:00
Michael Bayne 3125782a15 Modifications to get scrolling working again. It's a bit smoother, but
we can do better.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1026 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 01:42:28 +00:00
Michael Bayne 63a32a6332 Modified rendering to use a hand managed volatile image as a back buffer
instead of using a buffer strategy. This will shortly be extended to
support more efficient scrolling as well.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1021 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 01:23:56 +00:00
Michael Bayne 06f9ac0c31 Disable scrolling when speed is set to zero mspp.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1019 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-18 06:05:59 +00:00
Michael Bayne fbc39605e7 Enhancements to support scrolling.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1011 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-17 23:40:43 +00:00
Michael Bayne 8db0bce2a7 Removed warning message because this is a normal occurrence.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1003 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-17 07:13:59 +00:00
Michael Bayne a00e7e5214 Automatically create a SpriteManager unless otherwise instructed; added
methods for starting and stopping the animation manager associated with an
animated panel.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@995 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-13 18:48:56 +00:00
Walter Korman 5510400f45 Pass a Graphics2D to AnimatedPanel.render() so that sub-classes needn't
explicitly typecast it on their own, as they are almost invariably wont to
do.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@890 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-23 17:10:41 +00:00
Michael Bayne ec192b88d3 Added back overridden update() because Canvas.update() clears its whole
self when update is called which is seriously undesirable.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@885 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-19 07:09:55 +00:00
Michael Bayne c03126153d Automatically create an animation manager for the animated panel; modified
the code that interacts with AWT repaint mechanisms to play nicely and
communicate AWT's repaint desires to the animation manager to be queued up
with our normal repainting.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@883 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-19 07:04:28 +00:00
Walter Korman aa574a8182 Added support for animations to the animation manager. Moved animation
classes into their own package.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@849 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-11 16:17:34 +00:00