diff --git a/.idea/workspace (conflicted copy 2023-11-27 010756).xml b/.idea/workspace (conflicted copy 2023-11-27 010756).xml deleted file mode 100644 index a3f95cd474355de6a0b84b629c1fe59021c826f9..0000000000000000000000000000000000000000 --- a/.idea/workspace (conflicted copy 2023-11-27 010756).xml +++ /dev/null @@ -1,114 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project version="4"> - <component name="AutoImportSettings"> - <option name="autoReloadType" value="SELECTIVE" /> - </component> - <component name="ChangeListManager"> - <list default="true" id="3423dd37-5f8e-4e40-8b0d-cd0cd22563a2" name="Changes" comment=""> - <change afterPath="$PROJECT_DIR$/src/main/java/de/hdm_stuttgart/battlearena/Controller/ButtonTransitionScale.java" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/src/main/resources/styles/style.css" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/src/main/java/de/hdm_stuttgart/battlearena/Main/Main.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/de/hdm_stuttgart/battlearena/Main/Main.java" afterDir="false" /> - </list> - <option name="SHOW_DIALOG" value="false" /> - <option name="HIGHLIGHT_CONFLICTS" value="true" /> - <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> - <option name="LAST_RESOLUTION" value="IGNORE" /> - </component> - <component name="FileTemplateManagerImpl"> - <option name="RECENT_TEMPLATES"> - <list> - <option value="FxmlFile" /> - <option value="Class" /> - </list> - </option> - </component> - <component name="Git.Settings"> - <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> - </component> - <component name="JsbtTreeLayoutManager"> - <layout place="tools.popupGrunt"> - <scroll-view-position x="0" y="0" /> - </layout> - </component> - <component name="MarkdownSettingsMigration"> - <option name="stateVersion" value="1" /> - </component> - <component name="ProjectColorInfo">{ - "associatedIndex": 5 -}</component> - <component name="ProjectId" id="2YY5GmsUJWX3zRVN6vauFwkJo8g" /> - <component name="ProjectViewState"> - <option name="hideEmptyMiddlePackages" value="true" /> - <option name="showLibraryContents" value="true" /> - </component> - <component name="PropertiesComponent">{ - "keyToString": { - "RunOnceActivity.OpenProjectViewOnStart": "true", - "RunOnceActivity.ShowReadmeOnStart": "true", - "WebServerToolWindowFactoryState": "false", - "git-widget-placeholder": "ui", - "last_opened_file_path": "C:/Users/Peter/Downloads/EngineTest/pom.xml", - "node.js.detected.package.eslint": "true", - "node.js.detected.package.tslint": "true", - "node.js.selected.package.eslint": "(autodetect)", - "node.js.selected.package.tslint": "(autodetect)", - "nodejs_package_manager_path": "npm", - "settings.editor.selected.configurable": "reference.settings.ide.settings.new.ui", - "vue.rearranger.settings.migration": "true" - } -}</component> - <component name="RecentsManager"> - <key name="CopyFile.RECENT_KEYS"> - <recent name="E:\Nextcloud\03_3.Semester\SE3\battlearena\src\main\resources\fxml" /> - <recent name="C:\Nextcloud\03_3.Semester\SE3\battlearena\src\main\resources\fxml" /> - </key> - </component> - <component name="RunManager"> - <configuration name="Main" type="Application" factoryName="Application"> - <option name="MAIN_CLASS_NAME" value="de.hdm_stuttgart.battlearena.Main.Main" /> - <module name="BattleArena" /> - <method v="2"> - <option name="Make" enabled="true" /> - </method> - </configuration> - </component> - <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" /> - <component name="TaskManager"> - <task active="true" id="Default" summary="Default task"> - <changelist id="3423dd37-5f8e-4e40-8b0d-cd0cd22563a2" name="Changes" comment="" /> - <created>1700689579929</created> - <option name="number" value="Default" /> - <option name="presentableId" value="Default" /> - <updated>1700689579929</updated> - <workItem from="1700689586693" duration="3063000" /> - <workItem from="1700859512650" duration="5287000" /> - <workItem from="1700907344592" duration="7248000" /> - <workItem from="1700921361237" duration="5883000" /> - <workItem from="1700940572975" duration="129000" /> - <workItem from="1700940716982" duration="1275000" /> - <workItem from="1700942112155" duration="6828000" /> - <workItem from="1701004633855" duration="655000" /> - <workItem from="1701015541610" duration="662000" /> - <workItem from="1701028724640" duration="6306000" /> - </task> - <servers /> - </component> - <component name="TypeScriptGeneratedFilesManager"> - <option name="version" value="3" /> - </component> - <component name="Vcs.Log.Tabs.Properties"> - <option name="TAB_STATES"> - <map> - <entry key="MAIN"> - <value> - <State /> - </value> - </entry> - </map> - </option> - </component> - <component name="XSLT-Support.FileAssociations.UIState"> - <expand /> - <select /> - </component> -</project> \ No newline at end of file diff --git a/src/main/java/de/hdm_stuttgart/battlearena/Controller/MainMenuController.java b/src/main/java/de/hdm_stuttgart/battlearena/Controller/MainMenuController.java index ebfc5fe534f9af101b0edbd8ac6a8fb423f9f936..c551764353daab06dfb6694b08dbb66c142b4bb7 100644 --- a/src/main/java/de/hdm_stuttgart/battlearena/Controller/MainMenuController.java +++ b/src/main/java/de/hdm_stuttgart/battlearena/Controller/MainMenuController.java @@ -1,27 +1,19 @@ package de.hdm_stuttgart.battlearena.Controller; import javafx.fxml.FXML; -import javafx.fxml.Initializable; import javafx.scene.control.Button; -import javafx.scene.image.Image; -import javafx.scene.image.ImageView; import javafx.scene.layout.BorderPane; import javafx.scene.layout.Pane; import javafx.stage.Stage; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.net.URL; -import java.util.ResourceBundle; - public class MainMenuController extends SceneLoader { @FXML public BorderPane parent; @FXML public Button exitButton; public void playScene() { - Pane pane = new Pane(loadScene("Play")); // get(0) returns the first item from the getChildren() List + parent.getChildren().clear(); parent.setCenter(pane.getChildren().get(0)); } diff --git a/src/main/resources/fxml/LocalCreate.fxml b/src/main/resources/fxml/LocalCreate.fxml index c52d798ec1531779f7cbbafb3cfa30829e4f6b49..be5e6de5a2246a3dad20febc3f55ccdf1f1aa08c 100644 --- a/src/main/resources/fxml/LocalCreate.fxml +++ b/src/main/resources/fxml/LocalCreate.fxml @@ -1,10 +1,12 @@ <?xml version="1.0" encoding="UTF-8"?> <?import javafx.geometry.Insets?> +<?import javafx.scene.control.Accordion?> <?import javafx.scene.control.Button?> <?import javafx.scene.control.RadioButton?> -<?import javafx.scene.control.TextField?> +<?import javafx.scene.control.TitledPane?> <?import javafx.scene.control.ToggleGroup?> +<?import javafx.scene.layout.AnchorPane?> <?import javafx.scene.layout.BorderPane?> <?import javafx.scene.layout.HBox?> <?import javafx.scene.layout.Pane?> @@ -15,20 +17,35 @@ <center> <VBox alignment="TOP_CENTER" spacing="10.0" BorderPane.alignment="TOP_CENTER"> <children> - <Pane layoutX="10.0" layoutY="95.0" VBox.vgrow="ALWAYS" /> <HBox alignment="TOP_CENTER" spacing="20.0"> <children> <Text strokeType="OUTSIDE" strokeWidth="0.0" text="Rounds:" /> - <TextField /> + <Accordion> + <panes> + <TitledPane animated="false" text="untitled 1"> + <content> + <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" /> + </content> + </TitledPane> + </panes> + </Accordion> </children> <VBox.margin> - <Insets top="50.0" /> + <Insets /> </VBox.margin> </HBox> <HBox alignment="TOP_CENTER" layoutX="10.0" layoutY="10.0" maxWidth="-Infinity" minWidth="-Infinity" prefHeight="25.0" prefWidth="213.0" spacing="20.0"> <children> <Text strokeType="OUTSIDE" strokeWidth="0.0" text="Time:" /> - <TextField /> + <Accordion> + <panes> + <TitledPane animated="false" text="untitled 1"> + <content> + <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" /> + </content> + </TitledPane> + </panes> + </Accordion> </children> </HBox> <HBox alignment="TOP_CENTER" layoutX="10.0" layoutY="343.0" spacing="10.0"> diff --git a/src/main/resources/fxml/MainMenu.fxml b/src/main/resources/fxml/MainMenu.fxml index 152f4a653e79ab42094908e2aae35ebb7ec4865b..c1a2eb36b320004fa84c90f89eaea36015437fb1 100644 --- a/src/main/resources/fxml/MainMenu.fxml +++ b/src/main/resources/fxml/MainMenu.fxml @@ -2,6 +2,8 @@ <?import javafx.geometry.Insets?> <?import javafx.scene.control.Button?> +<?import javafx.scene.image.Image?> +<?import javafx.scene.image.ImageView?> <?import javafx.scene.layout.BorderPane?> <?import javafx.scene.layout.Pane?> <?import javafx.scene.layout.VBox?> @@ -26,4 +28,26 @@ </children> </VBox> </center> + <right> + <Button mnemonicParsing="false" BorderPane.alignment="BOTTOM_CENTER"> + <graphic> + <ImageView fitHeight="439.0" fitWidth="400.0" pickOnBounds="true" preserveRatio="true"> + <image> + <Image url="@../textures/images/gear_with_shadow.png" /> + </image> + </ImageView> + </graphic> + </Button> + </right> + <left> + <Button mnemonicParsing="false" BorderPane.alignment="BOTTOM_CENTER"> + <graphic> + <ImageView fitHeight="408.0" fitWidth="400.0" pickOnBounds="true" preserveRatio="true"> + <image> + <Image url="@../textures/images/dont_delete_or_ui_will_break.png" /> + </image> + </ImageView> + </graphic> + </Button> + </left> </BorderPane> diff --git a/src/main/resources/images/gear_with_shadow.png b/src/main/resources/images/gear_with_shadow.png deleted file mode 100644 index 3268f0dd3c84b0338813f8c4c2d33b1595857ae4..0000000000000000000000000000000000000000 Binary files a/src/main/resources/images/gear_with_shadow.png and /dev/null differ diff --git a/src/main/resources/styles/style.css b/src/main/resources/styles/style.css index fb566bb80e7ea3371b27380eb513d86722cd7797..63a8152f0fda2c79bcd868d7348cd119dcf905ff 100644 --- a/src/main/resources/styles/style.css +++ b/src/main/resources/styles/style.css @@ -3,7 +3,7 @@ -fx-background-color: #3c2014; -fx-text-fill: #956233; -fx-font-size: 50; - -fx-background-image: url("../images/background.png"); + -fx-background-image: url("../textures/images/background.png"); -fx-background-size: cover; -fx-effect: dropshadow(three-pass-box, black, 30, 0.5, 0, 0); } @@ -16,4 +16,12 @@ -fx-text-fill: #956233; -fx-background-color: none; -fx-skin: "de.hdm_stuttgart.battlearena.Controller.ButtonTransitionScale" +} + +.accordion { + -fx-font-size: 30; +} + +.radio-button { + -fx-font-size: 30; } \ No newline at end of file diff --git a/src/main/resources/images/background.png b/src/main/resources/textures/images/background.png similarity index 100% rename from src/main/resources/images/background.png rename to src/main/resources/textures/images/background.png diff --git a/src/main/resources/textures/images/gear_with_shadow.png b/src/main/resources/textures/images/gear_with_shadow.png new file mode 100644 index 0000000000000000000000000000000000000000..257b137d61b5766a8e11338a5b977081e88de18c Binary files /dev/null and b/src/main/resources/textures/images/gear_with_shadow.png differ diff --git a/src/main/resources/images/rusty_metal.png b/src/main/resources/textures/images/rusty_metal.png similarity index 100% rename from src/main/resources/images/rusty_metal.png rename to src/main/resources/textures/images/rusty_metal.png diff --git a/src/main/resources/images/vintage_paper_with_drawings.png b/src/main/resources/textures/images/vintage_paper_with_drawings.png similarity index 100% rename from src/main/resources/images/vintage_paper_with_drawings.png rename to src/main/resources/textures/images/vintage_paper_with_drawings.png