diff --git a/HangmanFx/src/application/HangmanPreload.java b/HangmanFx/src/application/HangmanPreload.java index 98a99ab..8a2b2d5 100644 --- a/HangmanFx/src/application/HangmanPreload.java +++ b/HangmanFx/src/application/HangmanPreload.java @@ -1,6 +1,7 @@ package application; import javafx.application.Preloader; +import javafx.application.Preloader.ProgressNotification; import javafx.application.Preloader.StateChangeNotification; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; @@ -29,6 +30,12 @@ public class HangmanPreload extends Preloader { } @Override + public void handleApplicationNotification(Preloader.PreloaderNotification info) { + if(info instanceof ProgressNotification) { + StartScreenController.statProgressBar.setProgress(((ProgressNotification) info).getProgress() ); + } + } + @Override public void handleStateChangeNotification(Preloader.StateChangeNotification info) { StateChangeNotification.Type type = info.getType(); diff --git a/HangmanFx/src/application/Main.java b/HangmanFx/src/application/Main.java index d0f852c..513244b 100644 --- a/HangmanFx/src/application/Main.java +++ b/HangmanFx/src/application/Main.java @@ -42,29 +42,17 @@ public class Main extends Application { Text info; @FXML Label title; - @FXML - private Label progress; - public static Label label; + @FXML RadioButton easy; @FXML RadioButton medium; @FXML RadioButton hard; - @FXML - private ProgressBar progressBar; - public static ProgressBar statProgressBar; - - @FXML - private void handleButtonAction(ActionEvent event) { - } - + // G A M E - public void initialize(URL url, ResourceBundle rb) { - label = progress; - statProgressBar = progressBar; - } + private static final int COUNT_LIMIT = 10; @@ -207,7 +195,7 @@ public class Main extends Application { double progress = (double) i / 10; System.out.println("progress: " + progress); LauncherImpl.notifyPreloader(this, new Preloader.ProgressNotification(progress)); - Thread.sleep(250); + Thread.sleep(350); } } diff --git a/HangmanFx/src/application/Preloader.fxml b/HangmanFx/src/application/Preloader.fxml index 90d2d2f..013ea91 100644 --- a/HangmanFx/src/application/Preloader.fxml +++ b/HangmanFx/src/application/Preloader.fxml @@ -1,16 +1,36 @@ + + + + - - + + + + + + + + + + + + + + + + + + diff --git a/HangmanFx/src/application/StartScreenController.java b/HangmanFx/src/application/StartScreenController.java new file mode 100644 index 0000000..c8bc847 --- /dev/null +++ b/HangmanFx/src/application/StartScreenController.java @@ -0,0 +1,34 @@ +package application; + +import java.net.URL; +import java.util.ResourceBundle; + +import javafx.event.ActionEvent; +import javafx.fxml.FXML; +import javafx.fxml.Initializable; +import javafx.scene.control.Label; +import javafx.scene.control.ProgressBar; + +public class StartScreenController implements Initializable { + + + + + @FXML + private ProgressBar progressBar; + + public static ProgressBar statProgressBar; + + @FXML + private void handleButtonAction(ActionEvent event) { + + + } + + @Override + public void initialize(URL url, ResourceBundle rb) { + + statProgressBar = progressBar; + } + + } diff --git a/HangmanFx/src/application/Ui.fxml b/HangmanFx/src/application/Ui.fxml index a5cf340..d934f01 100644 --- a/HangmanFx/src/application/Ui.fxml +++ b/HangmanFx/src/application/Ui.fxml @@ -21,12 +21,12 @@ - + - + - + diff --git a/HangmanFx/src/images/1.png b/HangmanFx/src/images/1.png index 0261dd5..59e609b 100644 Binary files a/HangmanFx/src/images/1.png and b/HangmanFx/src/images/1.png differ diff --git a/HangmanFx/src/images/10.png b/HangmanFx/src/images/10.png index 0eb2924..4cc53ac 100644 Binary files a/HangmanFx/src/images/10.png and b/HangmanFx/src/images/10.png differ diff --git a/HangmanFx/src/images/11.png b/HangmanFx/src/images/11.png index f06d6dc..031174b 100644 Binary files a/HangmanFx/src/images/11.png and b/HangmanFx/src/images/11.png differ diff --git a/HangmanFx/src/images/12.png b/HangmanFx/src/images/12.png index 3e065c1..0ced908 100644 Binary files a/HangmanFx/src/images/12.png and b/HangmanFx/src/images/12.png differ diff --git a/HangmanFx/src/images/13.png b/HangmanFx/src/images/13.png index 07c4e37..1ccae5a 100644 Binary files a/HangmanFx/src/images/13.png and b/HangmanFx/src/images/13.png differ diff --git a/HangmanFx/src/images/14.png b/HangmanFx/src/images/14.png index 03b35d3..cf1b6c5 100644 Binary files a/HangmanFx/src/images/14.png and b/HangmanFx/src/images/14.png differ diff --git a/HangmanFx/src/images/15.png b/HangmanFx/src/images/15.png index a79794b..5a6e772 100644 Binary files a/HangmanFx/src/images/15.png and b/HangmanFx/src/images/15.png differ diff --git a/HangmanFx/src/images/2.png b/HangmanFx/src/images/2.png index 91399a9..52a3b6f 100644 Binary files a/HangmanFx/src/images/2.png and b/HangmanFx/src/images/2.png differ diff --git a/HangmanFx/src/images/3.png b/HangmanFx/src/images/3.png index 23eb3d0..ab3f199 100644 Binary files a/HangmanFx/src/images/3.png and b/HangmanFx/src/images/3.png differ diff --git a/HangmanFx/src/images/4.png b/HangmanFx/src/images/4.png index ca7d124..db64fd8 100644 Binary files a/HangmanFx/src/images/4.png and b/HangmanFx/src/images/4.png differ diff --git a/HangmanFx/src/images/5.png b/HangmanFx/src/images/5.png index a988550..9b708a7 100644 Binary files a/HangmanFx/src/images/5.png and b/HangmanFx/src/images/5.png differ diff --git a/HangmanFx/src/images/6.png b/HangmanFx/src/images/6.png index 44040a8..6bce236 100644 Binary files a/HangmanFx/src/images/6.png and b/HangmanFx/src/images/6.png differ diff --git a/HangmanFx/src/images/7.png b/HangmanFx/src/images/7.png index 691bc7d..5146fab 100644 Binary files a/HangmanFx/src/images/7.png and b/HangmanFx/src/images/7.png differ diff --git a/HangmanFx/src/images/8.png b/HangmanFx/src/images/8.png index b677415..267c116 100644 Binary files a/HangmanFx/src/images/8.png and b/HangmanFx/src/images/8.png differ diff --git a/HangmanFx/src/images/9.png b/HangmanFx/src/images/9.png index 8d1e1d8..5be499d 100644 Binary files a/HangmanFx/src/images/9.png and b/HangmanFx/src/images/9.png differ diff --git a/HangmanFx/src/images/mfproduktion.png b/HangmanFx/src/images/mfproduktion.png new file mode 100644 index 0000000..444c18c Binary files /dev/null and b/HangmanFx/src/images/mfproduktion.png differ