1
0
Fork 0
mirror of https://gitlab.com/kauron/jstudy synced 2025-09-30 21:01:10 +02:00

Test: Answer style and better layout

This commit is contained in:
Carlos Galindo 2016-06-12 17:01:17 +02:00
commit 5d5e714b5e
Signed by: kauron
GPG key ID: 83E68706DEE119A3
3 changed files with 13 additions and 5 deletions

View file

@ -30,7 +30,7 @@ public class TestController implements Initializable {
@Override
public void initialize(URL url, ResourceBundle resourceBundle) {
feedback.setVisible(AppConfig.showFeedback);
feedback.setVisible(false);
}
void setList(List<TestItem> list) {
@ -51,7 +51,12 @@ public class TestController implements Initializable {
correctAnswer.setVisible(!right);
correctLabel.setVisible(!right);
if (!right) errors++;
if (!right) {
errors++;
prevAnswer.setStyle("-fx-text-fill: #C40000;");
} else {
prevAnswer.setStyle("-fx-text-fill: #00C400;");
}
// Remove the question from the pool if the question was correctly answered or there is no repetition
if (right || !AppConfig.repeatWrong) {