Commit c60c4cbc authored by Aneta Steimarova's avatar Aneta Steimarova

#847 Deal with constants in other classes

parent 06db4035
...@@ -54,6 +54,7 @@ public class SequenceGenerator extends Group { ...@@ -54,6 +54,7 @@ public class SequenceGenerator extends Group {
private static final Color FONT_COLOR = Color.WHITE; private static final Color FONT_COLOR = Color.WHITE;
private static final Color PLAY_COLOR = new Color(0x29abe1ff); //baby blue private static final Color PLAY_COLOR = new Color(0x29abe1ff); //baby blue
private static final Color NORMAL_COLOR = Color.BLACK; private static final Color NORMAL_COLOR = Color.BLACK;
private static final float SILENCE_DELAY = 2f;
private Image earImage, backgroundImage; private Image earImage, backgroundImage;
private TablexiaLabel text; private TablexiaLabel text;
...@@ -137,7 +138,7 @@ public class SequenceGenerator extends Group { ...@@ -137,7 +138,7 @@ public class SequenceGenerator extends Group {
private static int addSound(SequenceAction sa, SafeSounds safeSequenceSound, int charNum, List<Actor> listOfChars, List<Action> playMusicActionList, SafeSequence safeSequence) { private static int addSound(SequenceAction sa, SafeSounds safeSequenceSound, int charNum, List<Actor> listOfChars, List<Action> playMusicActionList, SafeSequence safeSequence) {
if(safeSequenceSound.equals(SafeSounds.SILENCE)) { if(safeSequenceSound.equals(SafeSounds.SILENCE)) {
sa.addAction(Actions.delay(2f)); sa.addAction(Actions.delay(SILENCE_DELAY));
soundSequence+= " - "; soundSequence+= " - ";
}else { }else {
soundSequence+= safeSequenceSound.toString() + " "; soundSequence+= safeSequenceSound.toString() + " ";
......
...@@ -53,11 +53,11 @@ public class VisualizationDialog { ...@@ -53,11 +53,11 @@ public class VisualizationDialog {
private static final float VIZUALIZATION_PAPER_HEIGHT = 0.4f; private static final float VIZUALIZATION_PAPER_HEIGHT = 0.4f;
private static final int VIZUALIZATION_PAPER_LEFT_BORDER = 5; private static final int VIZUALIZATION_PAPER_LEFT_BORDER = 5;
private static float CHARACTER_SPACE = 40; private static final float CHARACTER_SPACE = 40;
private static float ONE_IMAGE_WITH_SPACE = 40; private static final float ONE_IMAGE_WITH_SPACE = 40;
private static float ONE_IMAGE_WIDTH_AND_HEIGHT = 30; private static final float ONE_IMAGE_WIDTH_AND_HEIGHT = 30;
private static float IMAGE_SPACE = 10; private static final float IMAGE_SPACE = 10;
private static Color CHARACTER_COLOR = Color.BLACK; private static final Color CHARACTER_COLOR = Color.BLACK;
SafeGame safeGame; SafeGame safeGame;
......
...@@ -28,6 +28,8 @@ import cz.nic.tablexia.util.ui.button.ImageTablexiaButton; ...@@ -28,6 +28,8 @@ import cz.nic.tablexia.util.ui.button.ImageTablexiaButton;
*/ */
public class DoneButtonClickListener extends AbstractButtonClickListener { public class DoneButtonClickListener extends AbstractButtonClickListener {
private static final int NEXT_ROUND_DELAY = 2;
public DoneButtonClickListener(SafeGame safeGame) { public DoneButtonClickListener(SafeGame safeGame) {
super(safeGame); super(safeGame);
} }
...@@ -39,7 +41,7 @@ public class DoneButtonClickListener extends AbstractButtonClickListener { ...@@ -39,7 +41,7 @@ public class DoneButtonClickListener extends AbstractButtonClickListener {
public void run() { public void run() {
safeGame.evaluate(); safeGame.evaluate();
} }
}), Actions.delay(2), Actions.run(new Runnable() { }), Actions.delay(NEXT_ROUND_DELAY), Actions.run(new Runnable() {
@Override @Override
public void run() { public void run() {
firstClickedButton.set(null); firstClickedButton.set(null);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment