diff options
author | Nao Pross <naopross@thearcway.org> | 2018-11-27 19:35:19 +0100 |
---|---|---|
committer | Nao Pross <naopross@thearcway.org> | 2018-11-27 19:35:19 +0100 |
commit | 8825dda3d523968d031d9d44660e2035a7cc579e (patch) | |
tree | 4e1305075481c8289d67352fe4b62ef173cee85b | |
parent | Add unscii-16 as default font in Scene (diff) | |
download | Subconscious-java-8825dda3d523968d031d9d44660e2035a7cc579e.tar.gz Subconscious-java-8825dda3d523968d031d9d44660e2035a7cc579e.zip |
Add option to not render the grid to MapScene
-rw-r--r-- | src/subconscious/graphics/MapScene.java | 19 | ||||
-rw-r--r-- | src/subconscious/graphics/WorldScene.java | 2 |
2 files changed, 14 insertions, 7 deletions
diff --git a/src/subconscious/graphics/MapScene.java b/src/subconscious/graphics/MapScene.java index 43a982d..0fd2701 100644 --- a/src/subconscious/graphics/MapScene.java +++ b/src/subconscious/graphics/MapScene.java @@ -39,6 +39,9 @@ public abstract class MapScene extends Scene { protected AffineTransform applyPanTx = new AffineTransform(); protected AffineTransform undoZoomTx; protected AffineTransform undoPanTx; + + // rendering settings + protected boolean renderTileBorder = true; // used for panning protected Point pan = new Point(0, 0); @@ -104,13 +107,15 @@ public abstract class MapScene extends Scene { // } // tile border - g.setPaint(Palette.BLACK); - g.drawRect( - this.tileSize * tile.x, - this.tileSize * tile.y, - this.tileSize, - this.tileSize - ); + if (this.renderTileBorder) { + g.setPaint(Palette.BLACK); + g.drawRect( + this.tileSize * tile.x, + this.tileSize * tile.y, + this.tileSize, + this.tileSize + ); + } } // draw a border around the map diff --git a/src/subconscious/graphics/WorldScene.java b/src/subconscious/graphics/WorldScene.java index 86e398f..56d15fc 100644 --- a/src/subconscious/graphics/WorldScene.java +++ b/src/subconscious/graphics/WorldScene.java @@ -12,6 +12,8 @@ public class WorldScene extends MapScene { public WorldScene(Game game, String label) { super(game, label); + + this.renderTileBorder = false; } @Override |