From 4e1b4a00d869e2849d4464afaedf45a67f5d9f5c Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Mon, 7 Apr 2003 23:32:47 +0000 Subject: [PATCH] Allow turning off the rendering of objects. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2387 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../com/threerings/miso/client/DirtyItemList.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/java/com/threerings/miso/client/DirtyItemList.java b/src/java/com/threerings/miso/client/DirtyItemList.java index 3cb36e34c..8fc30477c 100644 --- a/src/java/com/threerings/miso/client/DirtyItemList.java +++ b/src/java/com/threerings/miso/client/DirtyItemList.java @@ -1,5 +1,5 @@ // -// $Id: DirtyItemList.java,v 1.23 2003/03/30 02:15:13 mdb Exp $ +// $Id: DirtyItemList.java,v 1.24 2003/04/07 23:32:47 mdb Exp $ package com.threerings.miso.client; @@ -13,12 +13,14 @@ import java.awt.Shape; import java.util.ArrayList; import java.util.Comparator; +import com.samskivert.util.RuntimeAdjust; import com.samskivert.util.SortableArrayList; import com.samskivert.util.StringUtil; import com.threerings.media.Log; import com.threerings.media.sprite.Sprite; import com.threerings.media.tile.ObjectTile; +import com.threerings.miso.MisoPrefs; import com.threerings.miso.client.util.IsoUtil; /** @@ -311,7 +313,7 @@ public class DirtyItemList // paint the item if (obj instanceof Sprite) { ((Sprite)obj).paint(gfx); - } else { + } else if (!_hideObjects.getValue()) { ((DisplayObjectInfo)obj).tile.paint(gfx, bounds.x, bounds.y); } @@ -731,4 +733,10 @@ public class DirtyItemList ((DirtyItem)o2).getRearDepth()); } }; + + /** A debug hook that toggles debug rendering of object footprints. */ + protected static RuntimeAdjust.BooleanAdjust _hideObjects = + new RuntimeAdjust.BooleanAdjust( + "Turns off the rendering of objects in the scene.", + "narya.miso.hide_objects", MisoPrefs.config, false); }