diff --git a/app/src/main/java/com/totsp/crossword/ClueListActivity.java b/app/src/main/java/com/totsp/crossword/ClueListActivity.java
index b2a6689e..cb759bc2 100755
--- a/app/src/main/java/com/totsp/crossword/ClueListActivity.java
+++ b/app/src/main/java/com/totsp/crossword/ClueListActivity.java
@@ -89,7 +89,7 @@ public void onCreate(Bundle icicle) {
DisplayMetrics metrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(metrics);
this.renderer = new PlayboardRenderer(ShortyzApplication.getInstance().getBoard(), metrics.densityDpi, metrics.widthPixels,
- !prefs.getBoolean("supressHints", false),
+ !prefs.getBoolean("supressHints", false), prefs.getBoolean("showErrorsIndicator", false),
ContextCompat.getColor(this, R.color.boxColor), ContextCompat.getColor(this, R.color.blankColor),
ContextCompat.getColor(this, R.color.errorColor));
diff --git a/app/src/main/java/com/totsp/crossword/PlayActivity.java b/app/src/main/java/com/totsp/crossword/PlayActivity.java
index 7ffba2de..6d6775b3 100755
--- a/app/src/main/java/com/totsp/crossword/PlayActivity.java
+++ b/app/src/main/java/com/totsp/crossword/PlayActivity.java
@@ -230,7 +230,7 @@ public boolean onKey(View view, int i, KeyEvent keyEvent) {
ShortyzApplication.getInstance().setBoard(new Playboard(puz, movement, prefs.getBoolean("preserveCorrectLettersInShowErrors", false)));
ShortyzApplication.getInstance().setRenderer(new PlayboardRenderer(getBoard(), metrics.densityDpi, metrics.widthPixels,
- !prefs.getBoolean("supressHints", false),
+ !prefs.getBoolean("supressHints", false), prefs.getBoolean("showErrorsIndicator", false),
ContextCompat.getColor(this, R.color.boxColor), ContextCompat.getColor(this, R.color.blankColor),
ContextCompat.getColor(this, R.color.errorColor)));
diff --git a/app/src/main/java/com/totsp/crossword/view/PlayboardRenderer.java b/app/src/main/java/com/totsp/crossword/view/PlayboardRenderer.java
index 09bf650c..3b6676f1 100755
--- a/app/src/main/java/com/totsp/crossword/view/PlayboardRenderer.java
+++ b/app/src/main/java/com/totsp/crossword/view/PlayboardRenderer.java
@@ -24,6 +24,7 @@ public class PlayboardRenderer {
private final Paint blackBox = new Paint();
private final Paint blackCircle = new Paint();
private final Paint blackLine = new Paint();
+ private final Paint blueLine = new Paint();
private final Paint cheated = new Paint();
private final Paint currentLetterBox = new Paint();
private final Paint currentLetterHighlight = new Paint();
@@ -37,12 +38,13 @@ public class PlayboardRenderer {
private float dpi;
private float scale = 1.0F;
private boolean hintHighlight;
+ private boolean indicateShowErrors;
private int widthPixels;
private final int boxColor;
private final int blankColor;
private final int errorColor;
- public PlayboardRenderer(Playboard board, float dpi, int widthPixels, boolean hintHighlight,
+ public PlayboardRenderer(Playboard board, float dpi, int widthPixels, boolean hintHighlight, boolean indicateShowErrors,
int boxColor, int blankColor, int errorColor) {
this.boxColor = boxColor;
this.blankColor = blankColor;
@@ -52,8 +54,11 @@ public PlayboardRenderer(Playboard board, float dpi, int widthPixels, boolean hi
this.widthPixels = widthPixels;
this.board = board;
this.hintHighlight = hintHighlight;
+ this.indicateShowErrors = indicateShowErrors;
blackLine.setColor(blankColor);
blackLine.setStrokeWidth(2.0F);
+ blueLine.setColor(Color.parseColor("#0000ff"));
+ blueLine.setStrokeWidth(4.0F);
numberText.setTextAlign(Align.LEFT);
numberText.setColor(blankColor);
@@ -294,7 +299,10 @@ private void drawBox(Canvas canvas, int x, int y, int row, int col, int boxSize,
Rect r = new Rect(x + 1, y + 1, (x + boxSize) - 1, (y + boxSize) - 1);
+ Paint boxBorderLine;
+
if (box == null) {
+ boxBorderLine = this.blackLine;
canvas.drawRect(r, this.blackBox);
} else {
// Background colors
@@ -312,6 +320,13 @@ private void drawBox(Canvas canvas, int x, int y, int row, int col, int boxSize,
canvas.drawRect(r, this.white);
}
+ // Borderline colors
+ if (this.board.isShowErrors() && this.indicateShowErrors && inCurrentWord) {
+ boxBorderLine = this.blueLine;
+ } else {
+ boxBorderLine = this.blackLine;
+ }
+
if (box.isAcross() || box.isDown()) {
canvas.drawText(Integer.toString(box.getClueNumber()), x + 2, y + numberTextSize + 2, this.numberText);
}
@@ -339,7 +354,7 @@ private void drawBox(Canvas canvas, int x, int y, int row, int col, int boxSize,
}
Paint boxColor = (((highlight.across == col) && (highlight.down == row)) && (currentWord != null))
- ? this.currentLetterBox : this.blackLine;
+ ? this.currentLetterBox : boxBorderLine;
// Draw left
if ((col != (highlight.across + 1)) || (row != highlight.down)) {
diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml
index a03314be..93e6dae3 100755
--- a/app/src/main/res/xml/preferences.xml
+++ b/app/src/main/res/xml/preferences.xml
@@ -229,6 +229,13 @@
android:summary="Prevents the pink boxes indicating 'hints' in the form of reveals or show errors."
android:key="supressHints"
/>
+
+