From 602ed1ccd5b5e9b5f3014fbd8cda1c500fb12c13 Mon Sep 17 00:00:00 2001
From: Robert Goldmann <deadlocker@gmx.de>
Date: Mon, 5 Dec 2016 12:57:20 +0100
Subject: [PATCH] tweaked ui

---
 bin/de/bricked/main/_de.properties            |  5 ++-
 bin/de/brickedleveleditor/main/_de.properties |  4 ++-
 .../ui/fxml/level_pack_dialog_controller.fxml | 34 +++++++++++++++++++
 .../{GUI.fxml => fxml/main_controller.fxml}   |  6 ++--
 src/de/bricked/main/_de.properties            |  5 ++-
 src/de/bricked/ui/LevelController.java        | 12 +++----
 .../bricked/ui/LevelPackSelectController.java |  4 +--
 7 files changed, 56 insertions(+), 14 deletions(-)
 create mode 100644 bin/de/brickedleveleditor/ui/fxml/level_pack_dialog_controller.fxml
 rename bin/de/brickedleveleditor/ui/{GUI.fxml => fxml/main_controller.fxml} (91%)

diff --git a/bin/de/bricked/main/_de.properties b/bin/de/bricked/main/_de.properties
index d644203..f34e0b8 100644
--- a/bin/de/bricked/main/_de.properties
+++ b/bin/de/bricked/main/_de.properties
@@ -6,7 +6,10 @@ author=Max Wittig, Robert Goldmann (Vielen Dank an Tobias)
 
 shortcut.debug.console=F12
 
+color.default=#F4F4F4
 color.background=#333333
+color.background.level=#ADADAD
 color.select.levelpack=#FFDD66
 color.select.level=#77C0EA
-color.button=#CCCCCC
\ No newline at end of file
+color.button=#333333
+color.button.light=#CCCCCC
\ No newline at end of file
diff --git a/bin/de/brickedleveleditor/main/_de.properties b/bin/de/brickedleveleditor/main/_de.properties
index 5882f88..824b21f 100644
--- a/bin/de/brickedleveleditor/main/_de.properties
+++ b/bin/de/brickedleveleditor/main/_de.properties
@@ -2,4 +2,6 @@ app.name=Bricked LevelEditor
 version.code=0
 version.name=0.0.0
 version.date=19.10.16
-author=Max Wittig, Robert Goldmann
\ No newline at end of file
+author=Max Wittig, Robert Goldmann
+
+level.saver=Save Level
diff --git a/bin/de/brickedleveleditor/ui/fxml/level_pack_dialog_controller.fxml b/bin/de/brickedleveleditor/ui/fxml/level_pack_dialog_controller.fxml
new file mode 100644
index 0000000..785f7da
--- /dev/null
+++ b/bin/de/brickedleveleditor/ui/fxml/level_pack_dialog_controller.fxml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<?import javafx.scene.control.Button?>
+<?import javafx.scene.control.ComboBox?>
+<?import javafx.scene.control.Label?>
+<?import javafx.scene.control.Spinner?>
+<?import javafx.scene.control.TextField?>
+<?import javafx.scene.layout.AnchorPane?>
+<?import javafx.scene.control.SpinnerValueFactory.IntegerSpinnerValueFactory?>
+
+<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="317.0" prefWidth="397.0" xmlns="http://javafx.com/javafx/8.0.65" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.brickedleveleditor.ui.controller.LevelPackDialogController">
+   <children>
+      <Label layoutX="14.0" layoutY="22.0" prefHeight="16.0" prefWidth="112.0" text="Levelname:" AnchorPane.leftAnchor="14.0" />
+      <Label layoutX="14.0" layoutY="61.0" prefHeight="16.0" prefWidth="112.0" text="Author:" AnchorPane.leftAnchor="14.0" />
+      <TextField fx:id="authorTextField" layoutX="212.0" layoutY="56.0" AnchorPane.rightAnchor="14.0" />
+      <TextField fx:id="levelNameTextField" layoutX="212.0" layoutY="17.0" AnchorPane.rightAnchor="14.0" />
+      <Label layoutX="14.0" layoutY="99.0" prefHeight="16.0" prefWidth="112.0" text="Difficulty:" AnchorPane.leftAnchor="14.0" />
+      <Spinner fx:id="difficultySpinner" layoutX="212.0" layoutY="94.0" prefHeight="26.0" prefWidth="171.0" AnchorPane.rightAnchor="14.0">
+          <valueFactory>
+              <SpinnerValueFactory.IntegerSpinnerValueFactory min="1" max="10"/>
+          </valueFactory>
+      </Spinner>
+      <Label layoutX="14.0" layoutY="138.0" prefHeight="16.0" prefWidth="112.0" text="Start-Lives:" AnchorPane.leftAnchor="14.0" />
+      <Label layoutX="14.0" layoutY="174.0" prefHeight="16.0" prefWidth="112.0" text="Paddle-Size" AnchorPane.leftAnchor="14.0" />
+      <ComboBox fx:id="paddleSizeComboBox" layoutX="212.0" layoutY="169.0" prefHeight="26.0" prefWidth="171.0" AnchorPane.rightAnchor="14.0" />
+      <Button layoutX="126.0" layoutY="277.0" mnemonicParsing="false" onAction="#onSaveButtonClicked" text="Save" AnchorPane.bottomAnchor="14.0" />
+      <Button layoutX="212.0" layoutY="277.0" mnemonicParsing="false" onAction="#onBackButtonClicked" text="Back" AnchorPane.bottomAnchor="14.0" />
+      <Spinner fx:id="startLivesSpinner" layoutX="212.0" layoutY="133.0">
+          <valueFactory>
+              <SpinnerValueFactory.IntegerSpinnerValueFactory min="1" max="5"/>
+          </valueFactory>
+      </Spinner>
+   </children>
+</AnchorPane>
diff --git a/bin/de/brickedleveleditor/ui/GUI.fxml b/bin/de/brickedleveleditor/ui/fxml/main_controller.fxml
similarity index 91%
rename from bin/de/brickedleveleditor/ui/GUI.fxml
rename to bin/de/brickedleveleditor/ui/fxml/main_controller.fxml
index 23f129a..7cb5639 100644
--- a/bin/de/brickedleveleditor/ui/GUI.fxml
+++ b/bin/de/brickedleveleditor/ui/fxml/main_controller.fxml
@@ -9,17 +9,17 @@
 <?import javafx.scene.layout.RowConstraints?>
 <?import javafx.scene.layout.VBox?>
 
-<AnchorPane fx:id="anchorPane" prefHeight="600.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8.0.65" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.brickedleveleditor.ui.Controller">
+<AnchorPane fx:id="anchorPane" prefHeight="600.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8.0.65" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.brickedleveleditor.ui.controller.MainController">
    <children>
       <MenuBar layoutX="40.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
         <menus>
             <Menu mnemonicParsing="false" text="File">
               <items>
-                <MenuItem fx:id="saveMenuItem" mnemonicParsing="false" text="Save" />
+                <MenuItem fx:id="saveMenuItem" mnemonicParsing="false" onAction="#onSaveMenuItemClicked" text="Save" />
                   <MenuItem mnemonicParsing="false" text="Unspecified Action" />
               </items>
             </Menu>
-          <Menu mnemonicParsing="false" text="Hilfe">
+          <Menu mnemonicParsing="false" text="Help">
             <items>
               <MenuItem mnemonicParsing="false" onAction="#about" text="Über" />
             </items>
diff --git a/src/de/bricked/main/_de.properties b/src/de/bricked/main/_de.properties
index d644203..f34e0b8 100644
--- a/src/de/bricked/main/_de.properties
+++ b/src/de/bricked/main/_de.properties
@@ -6,7 +6,10 @@ author=Max Wittig, Robert Goldmann (Vielen Dank an Tobias)
 
 shortcut.debug.console=F12
 
+color.default=#F4F4F4
 color.background=#333333
+color.background.level=#ADADAD
 color.select.levelpack=#FFDD66
 color.select.level=#77C0EA
-color.button=#CCCCCC
\ No newline at end of file
+color.button=#333333
+color.button.light=#CCCCCC
\ No newline at end of file
diff --git a/src/de/bricked/ui/LevelController.java b/src/de/bricked/ui/LevelController.java
index cbefa7f..185cf18 100644
--- a/src/de/bricked/ui/LevelController.java
+++ b/src/de/bricked/ui/LevelController.java
@@ -146,8 +146,8 @@ public class LevelController
 		game.setLevelController(this);
 		
 		anchorPane.setStyle("-fx-base: " + bundle.getString("color.background") + ";");
-		buttonBack.setStyle("-fx-base: " + bundle.getString("color.button"));
-		anchorPaneGame.setStyle("-fx-background-color: #F4F4F4");	
+		buttonBack.setStyle("-fx-base: " + bundle.getString("color.button.light"));
+		anchorPaneGame.setStyle("-fx-background-color: " + bundle.getString("color.default"));	
 		labelMultiplicator.setStyle("-fx-text-fill: #000000;");	
 		anchorPaneGame.setCursor(Cursor.NONE);
 
@@ -297,11 +297,11 @@ public class LevelController
 		buttonBack.setText("");
 		buttonBack.setGraphic(iconBack);
 
-		vboxPowerUps.setStyle("-fx-border-color: #333333; -fx-border-width: 2px; -fx-background-color: #F4F4F4");
+		vboxPowerUps.setStyle("-fx-border-color: #000000; -fx-border-width: 2px; -fx-background-color: #F4F4F4");
 		vboxPowerUps.setPadding(new Insets(3));
 		vboxPowerUps.setAlignment(Pos.TOP_CENTER);
 		vboxPowerUps.setSpacing(7);
-		vboxLives.setStyle("-fx-border-color: #333333; -fx-border-width: 2px; -fx-background-color: #F4F4F4");
+		vboxLives.setStyle("-fx-border-color: #000000; -fx-border-width: 2px; -fx-background-color: #F4F4F4");
 		vboxLives.setPadding(new Insets(3));
 		vboxLives.setAlignment(Pos.BOTTOM_CENTER);
 		vboxLives.setSpacing(9);
@@ -318,9 +318,9 @@ public class LevelController
 		gamePaneWidth = game.getSettings().getGameSize().getWidth() - 100;
 		gamePaneHeight = game.getSettings().getGameSize().getHeight() - 150;
 
-		grid = new GridPane();
-		grid.setStyle("-fx-border-color: #333333; -fx-border-width: 2px;");
+		grid = new GridPane();	
 		grid.setGridLinesVisible(false);
+		grid.setStyle("-fx-border-color: #000000; -fx-border-width: 2px;");
 		grid.setHgap(0);
 		grid.setVgap(0);
 
diff --git a/src/de/bricked/ui/LevelPackSelectController.java b/src/de/bricked/ui/LevelPackSelectController.java
index a40a11d..bdd34e4 100644
--- a/src/de/bricked/ui/LevelPackSelectController.java
+++ b/src/de/bricked/ui/LevelPackSelectController.java
@@ -109,8 +109,8 @@ public class LevelPackSelectController
 		
 		mainPane.setStyle("-fx-base: " + bundle.getString("color.background") + ";");
 		
-		buttonBack.setStyle("-fx-base: " + bundle.getString("color.button"));
-		downloadLevelpackButton.setStyle("-fx-base: " + bundle.getString("color.button"));
+//		buttonBack.setStyle("-fx-base: " + bundle.getString("color.button"));
+//		downloadLevelpackButton.setStyle("-fx-base: " + bundle.getString("color.button"));
 	}
 
 	public void reload()
-- 
GitLab