Skip to content

Commit

Permalink
Version 1.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcel committed Feb 8, 2017
1 parent 48de7fd commit 7f8a9d1
Show file tree
Hide file tree
Showing 56 changed files with 636 additions and 172 deletions.
13 changes: 13 additions & 0 deletions .idea/artifacts/math_1_5_1.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/libraries/commons_io_2_5.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/libraries/fontawesomefx_commons_8_14.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/libraries/fontawesomefx_materialicons_2_2_0_3.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/libraries/gson_2_5.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/libraries/jfoenix.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

543 changes: 435 additions & 108 deletions .idea/workspace.xml

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .settings/org.eclipse.core.resources.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
eclipse.preferences.version=1
encoding//src/handlers/SettingsHandler.java=UTF-8
encoding//src/resources/lang/Locales.java=UTF-8
Binary file modified out/production/Kopfrechen-Trainer/initializers/InitMain$1.class
Binary file not shown.
Binary file modified out/production/Kopfrechen-Trainer/initializers/InitMain$2.class
Binary file not shown.
Binary file modified out/production/Kopfrechen-Trainer/initializers/InitMain$3.class
Binary file not shown.
Binary file modified out/production/Kopfrechen-Trainer/initializers/InitMain.class
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 18 additions & 9 deletions out/production/Kopfrechen-Trainer/resources/javafx/main.fxml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.scene.media.*?>
<?import javafx.scene.*?>
<?import javafx.geometry.*?>
<?import javafx.scene.image.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import java.lang.*?>
<?import javafx.scene.canvas.*?>
<?import javafx.geometry.Insets?>
<?import javafx.geometry.Rectangle2D?>
<?import javafx.scene.Group?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.StackPane?>

<StackPane fx:id="container" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="500.0" prefWidth="750.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
<StackPane fx:id="container" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="500.0" prefWidth="750.0" xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1">
<children>
<Group translateX="75.0" translateY="75.0" StackPane.alignment="TOP_CENTER">
<children>
Expand All @@ -25,5 +24,15 @@
<Label fx:id="labelSubheader" prefHeight="47.0" prefWidth="432.0" styleClass="subtitle" text="%home.title.subtitle" translateY="25.0" />
</children>
</Group>
<StackPane fx:id="navigationContainer" maxWidth="-Infinity" prefHeight="500.0" prefWidth="100.0" StackPane.alignment="CENTER_RIGHT">
<StackPane.margin>
<Insets top="50.0" />
</StackPane.margin>
</StackPane>
<StackPane fx:id="informationContainer" prefHeight="150.0" prefWidth="670.0">
<StackPane.margin>
<Insets right="120.0" top="160.0" />
</StackPane.margin>
</StackPane>
</children>
</StackPane>
36 changes: 22 additions & 14 deletions out/production/Kopfrechen-Trainer/resources/javafx/stats.fxml
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.scene.*?>
<?import javafx.scene.image.*?>
<?import com.jfoenix.controls.*?>
<?import java.lang.*?>
<?import java.util.*?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.paint.*?>
<?import javafx.scene.text.*?>
<?import javafx.scene.Group?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.text.Font?>

<StackPane fx:id="container" prefHeight="506.0" prefWidth="806.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="handlers.FXMLHandler">
<StackPane fx:id="container" prefHeight="506.0" prefWidth="806.0" xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1" fx:controller="handlers.FXMLHandler">
<children>
<Group translateY="-130.0">
<children>
Expand Down Expand Up @@ -43,9 +37,23 @@
</Label>
</children>
</Group>
<Group translateY="45.0">
<children>
<Label alignment="CENTER_RIGHT" contentDisplay="RIGHT" prefHeight="25.0" prefWidth="330.0" text="%stats.error.quote" translateX="-180.0">
<font>
<Font size="16.0" />
</font>
</Label>
<Label fx:id="errorQuote" prefHeight="25.0" prefWidth="330.0" styleClass="label-bold" text="" translateX="180.0">
<font>
<Font name="Segoe UI" size="16.0" />
</font>
</Label>
</children>
</Group>
</children>
</Group>
<Group translateY="-50.0">
<Group translateY="-35.0">
<children>
<Group translateY="-15.0">
<children>
Expand Down Expand Up @@ -77,7 +85,7 @@
</Group>
</children>
</Group>
<Group translateY="30.0">
<Group translateY="45.0">
<children>
<Group translateY="-15.0">
<children>
Expand Down Expand Up @@ -109,7 +117,7 @@
</Group>
</children>
</Group>
<Group translateY="110.0">
<Group translateY="125.0">
<children>
<Group translateY="-15.0">
<children>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,4 @@ update.yes=Ja
settings.notAvailable=Wurzel- und Potenzaufgaben sind derzeit nicht verfügbar!\n\
Bleib immer aktuell und erfahre sofort, wenn diese Funktion\n\
verfügbar ist, indem du mir auf Twitter folgst!
stats.error.quote=Fehlerquote:
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,4 @@ update.version.new=Start new version
update.version.old=Continue with old version
update.yes=Yes
settings.notAvailable=\
stats.error.quote=Error quote:
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,4 @@ update.version.new=Abrir Nueva Versi\u00F3n
update.version.old=Continuar con la versi\u00F3n antigua
update.yes=S\u00ED
settings.notAvailable=\
stats.error.quote=\
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,4 @@ update.version.new=D\u00E9marrez la nouvelle version
update.version.old=Continuer avec ancienne version
update.yes=Oui
settings.notAvailable=\
stats.error.quote=\
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,4 @@ update.version.new=\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043D\u043E\u0432
update.version.old=\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C \u0441\u043E \u0441\u0442\u0430\u0440\u043E\u0439 \u0432\u0435\u0440\u0441\u0438\u0438
update.yes=\u0434\u0430
settings.notAvailable=\
stats.error.quote=\
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,4 @@ update.version.new=\u6253\u5F00\u65B0\u7248\u672C
update.version.old=\u4E0E\u65E7\u7248\u672C\u7EE7\u7EED
update.yes=\u662F\u7684
settings.notAvailable=\
stats.error.quote=\
Binary file modified out/production/Kopfrechen-Trainer/settings/Settings.class
Binary file not shown.
Binary file modified out/production/Kopfrechen-Trainer/statistics/Stats.class
Binary file not shown.
41 changes: 24 additions & 17 deletions src/initializers/InitMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.Random;

import javafx.scene.image.Image;
import javafx.scene.layout.*;
import resources.lang.Language;

import com.jfoenix.controls.JFXButton;
Expand All @@ -13,7 +17,6 @@
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Tooltip;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;

public class InitMain {
Expand All @@ -28,12 +31,20 @@ public Scene init() throws IOException, InvocationTargetException {
SceneHandler sw = new SceneHandler();
Scene scene = sw.switchScene("main", this.stage);
StackPane sp = (StackPane) scene.lookup("#container");

InitToolbar itb = new InitToolbar(scene);
scene = itb.init(Language.get("home.toolbar"), false, null, stage, "main");


StackPane informationContainer = (StackPane) scene.lookup("#informationContainer");
String[] bImageArray = new String[] {"/resources/img/1.gif", "/resources/img/2.gif", "/resources/img/3.gif", "/resources/img/4.gif", "/resources/img/5.gif", "/resources/img/6.gif", "/resources/img/7.gif", "/resources/img/8.gif", "/resources/img/9.gif", "/resources/img/10.gif"};

BackgroundImage bImage = new BackgroundImage(new Image(bImageArray[new Random().nextInt(bImageArray.length)],-1,-1, false, true), BackgroundRepeat.NO_REPEAT, BackgroundRepeat.NO_REPEAT, BackgroundPosition.CENTER, new BackgroundSize(BackgroundSize.AUTO, BackgroundSize.AUTO, false, false, true, false));
informationContainer.setBackground(new Background(bImage));

StackPane navigationContainer = (StackPane) scene.lookup("#navigationContainer");

JFXButton btnStart = new JFXButton();
MaterialIconFactory.get().setIcon(btnStart, MaterialIcon.PLAY_CIRCLE_FILLED, "10em");
MaterialIconFactory.get().setIcon(btnStart, MaterialIcon.PLAY_CIRCLE_FILLED, "90px");
btnStart.setDefaultButton(true);
btnStart.getStyleClass().add("blue-button");
btnStart.setOnAction(new EventHandler<ActionEvent>() {
Expand All @@ -49,16 +60,16 @@ public void handle(ActionEvent event) {
}
});
btnStart.setTooltip(new Tooltip(Language.get("home.hover.play")));
sp.getChildren().add(btnStart);
navigationContainer.getChildren().add(btnStart);

// Add settings button
JFXButton btnSettings = new JFXButton();
MaterialIconFactory.get().setIcon(btnSettings, MaterialIcon.SETTINGS, "3.5em");
MaterialIconFactory.get().setIcon(btnSettings, MaterialIcon.SETTINGS, "40px");
btnSettings.setCancelButton(true);
btnSettings.setTranslateX(150);
btnSettings.setTranslateY(125);
btnSettings.setTooltip(new Tooltip(Language.get("home.hover.settings")));
btnSettings.setOnAction(new EventHandler<ActionEvent>() {

@Override
public void handle(ActionEvent arg0) {
try {
Expand All @@ -67,15 +78,15 @@ public void handle(ActionEvent arg0) {
} catch (IOException e) {
e.printStackTrace();
}

}
});
sp.getChildren().add(btnSettings);
navigationContainer.getChildren().add(btnSettings);

// Add statistics button
JFXButton btnStats = new JFXButton();
MaterialIconFactory.get().setIcon(btnStats, MaterialIcon.EQUALIZER, "3em");
btnStats.setTranslateX(-150);
MaterialIconFactory.get().setIcon(btnStats, MaterialIcon.EQUALIZER, "40px");
btnStats.setTranslateY(-125);
btnStats.setTooltip(new Tooltip(Language.get("home.hover.stats")));
btnStats.setOnAction(new EventHandler<ActionEvent>() {

Expand All @@ -89,11 +100,7 @@ public void handle(ActionEvent arg0) {
}
}
});
sp.getChildren().add(btnStats);

btnStart.setTranslateY(15);
btnStats.setTranslateY(15);
btnSettings.setTranslateY(15);
navigationContainer.getChildren().add(btnStats);

return scene;
}
Expand Down
Binary file added src/resources/img/1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/resources/img/10.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/resources/img/2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/resources/img/3.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/resources/img/4.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/resources/img/5.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/resources/img/6.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/resources/img/7.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/resources/img/8.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/resources/img/9.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 18 additions & 9 deletions src/resources/javafx/main.fxml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.scene.media.*?>
<?import javafx.scene.*?>
<?import javafx.geometry.*?>
<?import javafx.scene.image.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import java.lang.*?>
<?import javafx.scene.canvas.*?>
<?import javafx.geometry.Insets?>
<?import javafx.geometry.Rectangle2D?>
<?import javafx.scene.Group?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.StackPane?>

<StackPane fx:id="container" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="500.0" prefWidth="750.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
<StackPane fx:id="container" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="500.0" prefWidth="750.0" xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1">
<children>
<Group translateX="75.0" translateY="75.0" StackPane.alignment="TOP_CENTER">
<children>
Expand All @@ -25,5 +24,15 @@
<Label fx:id="labelSubheader" prefHeight="47.0" prefWidth="432.0" styleClass="subtitle" text="%home.title.subtitle" translateY="25.0" />
</children>
</Group>
<StackPane fx:id="navigationContainer" maxWidth="-Infinity" prefHeight="500.0" prefWidth="100.0" StackPane.alignment="CENTER_RIGHT">
<StackPane.margin>
<Insets top="50.0" />
</StackPane.margin>
</StackPane>
<StackPane fx:id="informationContainer" prefHeight="150.0" prefWidth="670.0">
<StackPane.margin>
<Insets right="120.0" top="160.0" />
</StackPane.margin>
</StackPane>
</children>
</StackPane>
Loading

0 comments on commit 7f8a9d1

Please sign in to comment.