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:
@@ -1141,9 +1141,8 @@ public class MisoScenePanel extends VirtualMediaPanel
|
||||
continue;
|
||||
}
|
||||
|
||||
// skip actionless objects if we're configured to do so
|
||||
if (skipActionlessObjects() &&
|
||||
StringUtil.blank(scobj.info.action)) {
|
||||
// see if we should skip it
|
||||
if (skipHitObject(scobj)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1159,12 +1158,14 @@ public class MisoScenePanel extends VirtualMediaPanel
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether or not actionless objects are allowed to be the
|
||||
* hover object. By default, they are not.
|
||||
* Determines whether we should skip the specified object when compiling
|
||||
* 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
|
||||
protected boolean skipActionlessObjects ()
|
||||
protected boolean skipHitObject (SceneObject scobj)
|
||||
{
|
||||
return false;
|
||||
return false; // skip nothing
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user