mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-02-17 09:37:50 +01:00
Minor cleanup
This commit is contained in:
parent
219c07e769
commit
7d87d1fbd4
|
@ -54,7 +54,7 @@ public class ColorTheme {
|
||||||
public final static int GENERAL_BACKGROUND = 18;
|
public final static int GENERAL_BACKGROUND = 18;
|
||||||
private final static int numColors = 19;
|
private final static int numColors = 19;
|
||||||
|
|
||||||
private int colorTable[] = new int[numColors];
|
private int[] colorTable = new int[numColors];
|
||||||
|
|
||||||
private static final String[] prefNames = {
|
private static final String[] prefNames = {
|
||||||
"darkSquare", "brightSquare", "selectedSquare", "darkPiece", "brightPiece", "currentMove",
|
"darkSquare", "brightSquare", "selectedSquare", "darkPiece", "brightPiece", "currentMove",
|
||||||
|
@ -73,7 +73,7 @@ public class ColorTheme {
|
||||||
R.string.colortheme_scid_brown,
|
R.string.colortheme_scid_brown,
|
||||||
R.string.colortheme_scid_green
|
R.string.colortheme_scid_green
|
||||||
};
|
};
|
||||||
private final static String themeColors[][] = {
|
private final static String[][] themeColors = {
|
||||||
{ // Original
|
{ // Original
|
||||||
"#FF808080", "#FFBEBE5A", "#FFFF0000", "#FF000000", "#FFFFFFFF", "#FF888888",
|
"#FF808080", "#FFBEBE5A", "#FFFF0000", "#FF000000", "#FFFFFFFF", "#FF888888",
|
||||||
"#A01F1FFF", "#A0FF1F1F", "#501F1FFF", "#50FF1F1F", "#371F1FFF", "#3CFF1F1F", "#1E1F1FFF", "#28FF1F1F",
|
"#A01F1FFF", "#A0FF1F1F", "#501F1FFF", "#50FF1F1F", "#371F1FFF", "#3CFF1F1F", "#1E1F1FFF", "#28FF1F1F",
|
||||||
|
|
|
@ -294,7 +294,7 @@ public abstract class ChessBoard extends View {
|
||||||
/**
|
/**
|
||||||
* Set the board to a given state.
|
* Set the board to a given state.
|
||||||
*/
|
*/
|
||||||
final public void setPosition(Position pos) {
|
public final void setPosition(Position pos) {
|
||||||
boolean doInvalidate = false;
|
boolean doInvalidate = false;
|
||||||
if (anim.paused) {
|
if (anim.paused) {
|
||||||
anim.paused = false;
|
anim.paused = false;
|
||||||
|
@ -326,7 +326,7 @@ public abstract class ChessBoard extends View {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Set drag state. Return true if any changes were made. */
|
/** Set drag state. Return true if any changes were made. */
|
||||||
private final boolean setDragStateInternal(int sq, int xCrd, int yCrd) {
|
private boolean setDragStateInternal(int sq, int xCrd, int yCrd) {
|
||||||
boolean modified = false;
|
boolean modified = false;
|
||||||
if (!isValidDragSquare(sq)) {
|
if (!isValidDragSquare(sq)) {
|
||||||
if (dragSquare != -1) {
|
if (dragSquare != -1) {
|
||||||
|
@ -347,7 +347,7 @@ public abstract class ChessBoard extends View {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Set/clear the board flipped status. */
|
/** Set/clear the board flipped status. */
|
||||||
final public void setFlipped(boolean flipped) {
|
public final void setFlipped(boolean flipped) {
|
||||||
if (this.flipped != flipped) {
|
if (this.flipped != flipped) {
|
||||||
this.flipped = flipped;
|
this.flipped = flipped;
|
||||||
invalidate();
|
invalidate();
|
||||||
|
@ -355,7 +355,7 @@ public abstract class ChessBoard extends View {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Set/clear the drawSquareLabels status. */
|
/** Set/clear the drawSquareLabels status. */
|
||||||
final public void setDrawSquareLabels(boolean drawSquareLabels) {
|
public final void setDrawSquareLabels(boolean drawSquareLabels) {
|
||||||
if (this.drawSquareLabels != drawSquareLabels) {
|
if (this.drawSquareLabels != drawSquareLabels) {
|
||||||
this.drawSquareLabels = drawSquareLabels;
|
this.drawSquareLabels = drawSquareLabels;
|
||||||
invalidate();
|
invalidate();
|
||||||
|
@ -363,7 +363,7 @@ public abstract class ChessBoard extends View {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Set/clear the board blindMode status. */
|
/** Set/clear the board blindMode status. */
|
||||||
final public void setBlindMode(boolean blindMode) {
|
public final void setBlindMode(boolean blindMode) {
|
||||||
if (this.blindMode != blindMode) {
|
if (this.blindMode != blindMode) {
|
||||||
this.blindMode = blindMode;
|
this.blindMode = blindMode;
|
||||||
invalidate();
|
invalidate();
|
||||||
|
@ -374,7 +374,7 @@ public abstract class ChessBoard extends View {
|
||||||
* Set/clear the selected square.
|
* Set/clear the selected square.
|
||||||
* @param square The square to select, or -1 to clear selection.
|
* @param square The square to select, or -1 to clear selection.
|
||||||
*/
|
*/
|
||||||
final public void setSelection(int square) {
|
public final void setSelection(int square) {
|
||||||
if (square != selectedSquare) {
|
if (square != selectedSquare) {
|
||||||
selectedSquare = square;
|
selectedSquare = square;
|
||||||
invalidate();
|
invalidate();
|
||||||
|
@ -680,17 +680,17 @@ public abstract class ChessBoard extends View {
|
||||||
switch (sd.tbData.type) {
|
switch (sd.tbData.type) {
|
||||||
case DTM:
|
case DTM:
|
||||||
if (wdl > 0)
|
if (wdl > 0)
|
||||||
s = "+" + String.valueOf(num);
|
s = "+" + num;
|
||||||
else if (wdl < 0)
|
else if (wdl < 0)
|
||||||
s = "-" + String.valueOf(num);
|
s = "-" + num;
|
||||||
else
|
else
|
||||||
s = "0";
|
s = "0";
|
||||||
break;
|
break;
|
||||||
case DTZ:
|
case DTZ:
|
||||||
if (wdl > 0)
|
if (wdl > 0)
|
||||||
s = "W" + String.valueOf(num);
|
s = "W" + num;
|
||||||
else if (wdl < 0)
|
else if (wdl < 0)
|
||||||
s = "L" + String.valueOf(num);
|
s = "L" + num;
|
||||||
else
|
else
|
||||||
s = "0";
|
s = "0";
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user