From ea646a4d46b5739bd1b6d234d9f96feb127bce60 Mon Sep 17 00:00:00 2001 From: Andrzej Kapolka Date: Tue, 23 Aug 2005 00:06:52 +0000 Subject: [PATCH] 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 --- .../threerings/miso/client/MisoScenePanel.java | 15 ++++++++------- .../stage/tools/editor/EditorScenePanel.java | 4 ++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/java/com/threerings/miso/client/MisoScenePanel.java b/src/java/com/threerings/miso/client/MisoScenePanel.java index 24f60ce5a..30291778c 100644 --- a/src/java/com/threerings/miso/client/MisoScenePanel.java +++ b/src/java/com/threerings/miso/client/MisoScenePanel.java @@ -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 + * true iff the object has no action. */ - protected boolean skipActionlessObjects () + protected boolean skipHitObject (SceneObject scobj) { - return true; + return StringUtil.blank(scobj.info.action); } /** diff --git a/src/java/com/threerings/stage/tools/editor/EditorScenePanel.java b/src/java/com/threerings/stage/tools/editor/EditorScenePanel.java index b62757628..2ed42667d 100644 --- a/src/java/com/threerings/stage/tools/editor/EditorScenePanel.java +++ b/src/java/com/threerings/stage/tools/editor/EditorScenePanel.java @@ -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 } /**