From 1d1cf585b50e8403ededc4da3174fc34fa8632e7 Mon Sep 17 00:00:00 2001 From: Collin Smith Date: Sat, 16 Feb 2019 15:21:51 -0800 Subject: [PATCH] Disabled item bounds debug --- core/src/gdx/diablo/Cursor.java | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/core/src/gdx/diablo/Cursor.java b/core/src/gdx/diablo/Cursor.java index 87918c62..29956494 100644 --- a/core/src/gdx/diablo/Cursor.java +++ b/core/src/gdx/diablo/Cursor.java @@ -26,6 +26,9 @@ import gdx.diablo.item.Item; * and because it will rely on existing code for changing item colors, etc. */ public class Cursor { + private static final String TAG = "Cursor"; + private static final boolean DEBUG = true; + private static final boolean DEBUG_ITEM_BOUNDS = DEBUG && !true; private com.badlogic.gdx.graphics.Cursor cursor; private Item item; @@ -105,12 +108,14 @@ public class Cursor { batch.resetColormap(); batch.end(); - ShapeRenderer shapes = Diablo.shapes; - shapes.setProjectionMatrix(Diablo.viewport.getCamera().combined); - shapes.begin(ShapeRenderer.ShapeType.Line); - shapes.setColor(Color.GREEN); - shapes.rect(coords.x, coords.y, box.width, box.height); - shapes.end(); + if (DEBUG_ITEM_BOUNDS) { + ShapeRenderer shapes = Diablo.shapes; + shapes.setProjectionMatrix(Diablo.viewport.getCamera().combined); + shapes.begin(ShapeRenderer.ShapeType.Line); + shapes.setColor(Color.GREEN); + shapes.rect(coords.x, coords.y, box.width, box.height); + shapes.end(); + } } }