Allow subclasses of MisoScenePanel to skip arbitrary scene objects, as opposed to just object without actions.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3685 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Andrzej Kapolka
2005-08-23 00:06:52 +00:00
parent ef65ee5644
commit ea646a4d46
2 changed files with 10 additions and 9 deletions
@@ -1141,9 +1141,8 @@ public class MisoScenePanel extends VirtualMediaPanel
continue; continue;
} }
// skip actionless objects if we're configured to do so // see if we should skip it
if (skipActionlessObjects() && if (skipHitObject(scobj)) {
StringUtil.blank(scobj.info.action)) {
continue; continue;
} }
@@ -1159,12 +1158,14 @@ public class MisoScenePanel extends VirtualMediaPanel
} }
/** /**
* Indicates whether or not actionless objects are allowed to be the * Determines whether we should skip the specified object when compiling
* hover object. By default, they are not. * the list of objects under a specified point using
* {@link #getHitObjects}. The default implementation returns
* <code>true</code> iff the object has no action.
*/ */
protected boolean skipActionlessObjects () protected boolean skipHitObject (SceneObject scobj)
{ {
return true; return StringUtil.blank(scobj.info.action);
} }
/** /**
@@ -961,9 +961,9 @@ public class EditorScenePanel extends StageScenePanel
} }
// documentation inherited // documentation inherited
protected boolean skipActionlessObjects () protected boolean skipHitObject (SceneObject scobj)
{ {
return false; return false; // skip nothing
} }
/** /**