summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2018-11-27 19:35:19 +0100
committerNao Pross <naopross@thearcway.org>2018-11-27 19:35:19 +0100
commit8825dda3d523968d031d9d44660e2035a7cc579e (patch)
tree4e1305075481c8289d67352fe4b62ef173cee85b /src
parentAdd unscii-16 as default font in Scene (diff)
downloadSubconscious-java-8825dda3d523968d031d9d44660e2035a7cc579e.tar.gz
Subconscious-java-8825dda3d523968d031d9d44660e2035a7cc579e.zip
Add option to not render the grid to MapScene
Diffstat (limited to 'src')
-rw-r--r--src/subconscious/graphics/MapScene.java19
-rw-r--r--src/subconscious/graphics/WorldScene.java2
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