Permit changing media render order as long as we're not in a tick. Removes the need to remove and re-add sprites, which was cancelling their paths.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3551 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Andrzej Kapolka
2005-05-13 22:22:56 +00:00
parent 3722bc3697
commit a40de2ec51
3 changed files with 22 additions and 9 deletions
@@ -163,6 +163,20 @@ public abstract class AbstractMediaManager
}
}
/**
* Called by a {@link AbstractMedia} when its render order has changed.
*/
public void renderOrderDidChange (AbstractMedia media)
{
if (_tickStamp > 0) {
Log.warning("Egads! Render order changed during a tick.");
Thread.dumpStack();
}
_media.remove(media);
_media.insertSorted(media, RENDER_ORDER);
}
/**
* Calls {@link AbstractMedia#tick} on all media to give them a chance
* to move about, change their look, generate dirty regions, and so