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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user