Beginnings of support for render order overrides. I'll get back to working

on this some day.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1969 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2002-11-20 02:21:10 +00:00
parent c4591a92ef
commit b7b3e02260
@@ -1,11 +1,13 @@
//
// $Id: ComponentClass.java,v 1.5 2002/10/15 21:01:39 ray Exp $
// $Id: ComponentClass.java,v 1.6 2002/11/20 02:21:10 mdb Exp $
package com.threerings.cast;
import java.io.Serializable;
import java.util.Comparator;
import com.samskivert.util.ArrayIntSet;
/**
* Denotes a class of components to which {@link CharacterComponent}
* objects belong. Examples include "Hat", "Head", and "Feet". A component
@@ -14,6 +16,21 @@ import java.util.Comparator;
*/
public class ComponentClass implements Serializable
{
/** Used to effect custom render orders for particular actions,
* orientations, etc. */
public static class PriorityOverride
{
/** The overridden render priority value. */
public int renderPriority;
/** The action, if any, for which this override is appropriate. */
public String action;
/** The orientations, if any, for which this override is
* appropriate. */
public ArrayIntSet orients;
}
/** The comparator used to sort component class objects in render
* priority order. */
public static final Comparator RENDER_COMP = new RenderComparator();
@@ -24,6 +41,15 @@ public class ComponentClass implements Serializable
/** The render priority. */
public int renderPriority;
/**
* Returns the render priority appropriate for the specified action
* and orientation.
*/
public int getRenderPriority (String action, int orientation)
{
return -1;
}
/**
* Classes with the same name are the same.
*/