aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources/xyz/brysonsteck
diff options
context:
space:
mode:
authorBryson Steck <brysonsteck@protonmail.com>2023-05-20 20:02:08 -0600
committerBryson Steck <brysonsteck@protonmail.com>2023-05-20 20:02:08 -0600
commit49311129e97a232074478c94db23a7285f106d99 (patch)
tree777ea947e6a4c68fb4248e21646374ec26f21cc4 /src/main/resources/xyz/brysonsteck
parent9b200a05ef39c49a718d18829212e3f1fb350b67 (diff)
downloadServerCraft-49311129e97a232074478c94db23a7285f106d99.tar
ServerCraft-49311129e97a232074478c94db23a7285f106d99.tar.gz
ServerCraft-49311129e97a232074478c94db23a7285f106d99.tar.bz2
implemented properties, console, and logging system
Diffstat (limited to 'src/main/resources/xyz/brysonsteck')
-rw-r--r--src/main/resources/xyz/brysonsteck/ServerCraft/icons/arrow_down.pngbin0 -> 846 bytes
-rw-r--r--src/main/resources/xyz/brysonsteck/ServerCraft/icons/arrow_up.pngbin0 -> 841 bytes
-rw-r--r--src/main/resources/xyz/brysonsteck/ServerCraft/primary.fxml96
3 files changed, 60 insertions, 36 deletions
diff --git a/src/main/resources/xyz/brysonsteck/ServerCraft/icons/arrow_down.png b/src/main/resources/xyz/brysonsteck/ServerCraft/icons/arrow_down.png
new file mode 100644
index 0000000..3ca5992
--- /dev/null
+++ b/src/main/resources/xyz/brysonsteck/ServerCraft/icons/arrow_down.png
Binary files differ
diff --git a/src/main/resources/xyz/brysonsteck/ServerCraft/icons/arrow_up.png b/src/main/resources/xyz/brysonsteck/ServerCraft/icons/arrow_up.png
new file mode 100644
index 0000000..a61ea1d
--- /dev/null
+++ b/src/main/resources/xyz/brysonsteck/ServerCraft/icons/arrow_up.png
Binary files differ
diff --git a/src/main/resources/xyz/brysonsteck/ServerCraft/primary.fxml b/src/main/resources/xyz/brysonsteck/ServerCraft/primary.fxml
index 6b34102..cec0d2c 100644
--- a/src/main/resources/xyz/brysonsteck/ServerCraft/primary.fxml
+++ b/src/main/resources/xyz/brysonsteck/ServerCraft/primary.fxml
@@ -9,22 +9,25 @@
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.MenuItem?>
<?import javafx.scene.control.ProgressBar?>
+<?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.control.Separator?>
<?import javafx.scene.control.Spinner?>
<?import javafx.scene.control.SpinnerValueFactory.IntegerSpinnerValueFactory?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.control.TitledPane?>
<?import javafx.scene.control.Tooltip?>
+<?import javafx.scene.image.Image?>
+<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.text.Font?>
-<Pane fx:id="primary" maxHeight="713.0" maxWidth="963.0" minHeight="713.0" minWidth="963.0" prefHeight="713.0" prefWidth="963.0" xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1" fx:controller="xyz.brysonsteck.ServerCraft.controllers.PrimaryController">
+<Pane fx:id="primary" maxHeight="873.0" maxWidth="963.0" minHeight="713.0" minWidth="963.0" prefHeight="873.0" prefWidth="963.0" xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1" fx:controller="xyz.brysonsteck.ServerCraft.controllers.PrimaryController">
<children>
<HBox fx:id="directoryPane" prefHeight="39.0" prefWidth="963.0">
<children>
- <Button id="openFile" fx:id="chooseDirectoryButton" lineSpacing="10.0" mnemonicParsing="false" onMouseClicked="#onDirectoryButtonClick" text="Choose Directory...">
+ <Button id="openFile" fx:id="chooseDirectoryButton" lineSpacing="10.0" mnemonicParsing="false" onAction="#onDirectoryButtonClick" text="Choose Directory...">
<opaqueInsets>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</opaqueInsets>
@@ -68,7 +71,7 @@
<Insets bottom="5.0" left="5.0" right="5.0" top="6.0" />
</HBox.margin>
</Label>
- <TextField fx:id="worldNameField" onInputMethodTextChanged="#onWorldNameChange" text="world">
+ <TextField fx:id="worldNameField" text="world">
<HBox.margin>
<Insets top="2.0" />
</HBox.margin>
@@ -86,7 +89,7 @@
<Insets bottom="5.0" left="5.0" right="5.0" top="6.0" />
</HBox.margin>
</Label>
- <TextField fx:id="seedField" onInputMethodTextChanged="#onSeedChange" promptText="Leave empty for random seed" HBox.hgrow="ALWAYS">
+ <TextField fx:id="seedField" promptText="Leave empty for random seed" HBox.hgrow="ALWAYS">
<HBox.margin>
<Insets top="2.0" />
</HBox.margin>
@@ -104,7 +107,7 @@
<Insets bottom="5.0" left="5.0" right="5.0" top="6.0" />
</HBox.margin>
</Label>
- <Spinner fx:id="portSpinner" editable="true" onInputMethodTextChanged="#onPortChange" prefWidth="95.0">
+ <Spinner fx:id="portSpinner" editable="true" prefWidth="95.0">
<HBox.margin>
<Insets top="2.0" />
</HBox.margin>
@@ -123,11 +126,11 @@
<content>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="311.0" prefWidth="625.0">
<children>
- <CheckBox fx:id="flightCheckbox" layoutX="14.0" layoutY="14.0" mnemonicParsing="false" onMouseClicked="#onCheckboxClick" text="Allow Flight" />
- <CheckBox fx:id="netherCheckbox" layoutX="14.0" layoutY="42.0" mnemonicParsing="false" onMouseClicked="#onCheckboxClick" selected="true" text="Allow The Nether" />
- <CheckBox fx:id="structuresCheckbox" alignment="TOP_LEFT" layoutX="14.0" layoutY="70.0" mnemonicParsing="false" onMouseClicked="#onCheckboxClick" selected="true" text="Generate Structures&#10;(such as villages and strongholds)" />
- <CheckBox fx:id="pvpCheckbox" layoutX="14.0" layoutY="109.0" mnemonicParsing="false" onMouseClicked="#onCheckboxClick" selected="true" text="Allow PvP" />
- <CheckBox fx:id="whitelistCheckbox" alignment="TOP_LEFT" layoutX="14.0" layoutY="138.0" mnemonicParsing="false" onMouseClicked="#onCheckboxClick" text="Enable Whitelist&#10;(Only users you specify can join)" />
+ <CheckBox fx:id="flightCheckbox" layoutX="14.0" layoutY="14.0" mnemonicParsing="false" onAction="#onCheckboxClick" text="Allow Flight" />
+ <CheckBox fx:id="netherCheckbox" layoutX="14.0" layoutY="42.0" mnemonicParsing="false" onAction="#onCheckboxClick" selected="true" text="Allow The Nether" />
+ <CheckBox fx:id="structuresCheckbox" alignment="TOP_LEFT" layoutX="14.0" layoutY="70.0" mnemonicParsing="false" onAction="#onCheckboxClick" selected="true" text="Generate Structures&#10;(such as villages and strongholds)" />
+ <CheckBox fx:id="pvpCheckbox" layoutX="14.0" layoutY="109.0" mnemonicParsing="false" onAction="#onCheckboxClick" selected="true" text="Allow PvP" />
+ <CheckBox fx:id="whitelistCheckbox" alignment="TOP_LEFT" layoutX="14.0" layoutY="138.0" mnemonicParsing="false" onAction="#onCheckboxClick" text="Enable Whitelist&#10;(Only users you specify can join)" />
<HBox layoutX="6.0" layoutY="174.0">
<children>
<Label text="Maximum Players:" HBox.hgrow="ALWAYS">
@@ -173,8 +176,8 @@
<content>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="269.0" prefWidth="625.0">
<children>
- <CheckBox fx:id="cmdBlocksCheckbox" layoutX="14.0" layoutY="14.0" mnemonicParsing="false" onMouseClicked="#onCheckboxClick" text="Enable Command Blocks" />
- <CheckBox fx:id="playerCountCheckbox" layoutX="14.0" layoutY="41.0" mnemonicParsing="false" onMouseClicked="#onCheckboxClick" text="Hide Online Player Count" />
+ <CheckBox fx:id="cmdBlocksCheckbox" layoutX="14.0" layoutY="14.0" mnemonicParsing="false" onAction="#onCheckboxClick" text="Enable Command Blocks" />
+ <CheckBox fx:id="playerCountCheckbox" layoutX="14.0" layoutY="41.0" mnemonicParsing="false" onAction="#onCheckboxClick" text="Hide Online Player Count" />
<HBox layoutX="7.0" layoutY="65.0">
<children>
<Label ellipsisString="" text="Server Memory in MB:" textOverrun="CLIP" HBox.hgrow="ALWAYS">
@@ -327,36 +330,57 @@
</Pane>
<ButtonBar fx:id="buttonBar" buttonOrder="L+R" layoutY="635.0" prefHeight="40.0" prefWidth="963.0">
<buttons>
- <Button fx:id="infoButton" mnemonicParsing="false" onMouseClicked="#onInfo" text="About ServerCraft" ButtonBar.buttonData="LEFT" />
- <Button fx:id="defaultsButton" disable="true" mnemonicParsing="false" onMouseClicked="#onBuild" text="Reset to Defaults" ButtonBar.buttonData="LEFT" />
- <Button fx:id="buildButton" disable="true" mnemonicParsing="false" onMouseClicked="#onBuild" text="Build Server" ButtonBar.buttonData="RIGHT" />
- <Button fx:id="startButton" defaultButton="true" disable="true" mnemonicParsing="false" onMouseClicked="#onStart" prefWidth="120.0" text="Start Server" ButtonBar.buttonData="RIGHT" />
+ <Button fx:id="infoButton" mnemonicParsing="false" onAction="#onInfo" text="About ServerCraft" ButtonBar.buttonData="LEFT" />
+ <Button fx:id="defaultsButton" disable="true" mnemonicParsing="false" onAction="#onDefaults" text="Reset to Defaults" ButtonBar.buttonData="LEFT" />
+ <Button fx:id="buildButton" disable="true" mnemonicParsing="false" onAction="#onBuild" text="Build Server" ButtonBar.buttonData="RIGHT" />
+ <Button fx:id="startButton" defaultButton="true" disable="true" mnemonicParsing="false" onAction="#onStart" prefWidth="120.0" text="Start Server" ButtonBar.buttonData="RIGHT" />
</buttons>
<padding>
<Insets bottom="8.0" left="8.0" right="8.0" top="8.0" />
</padding>
</ButtonBar>
- <HBox layoutY="680.0" prefHeight="33.0" prefWidth="963.0" style="-fx-background-color: ddd;">
+ <Pane layoutY="680.0" prefHeight="196.0" prefWidth="963.0" style="-fx-background-color: ddd;">
<children>
- <Label text="Status:">
- <font>
- <Font name="System Bold" size="13.0" />
- </font>
- </Label>
- <Label fx:id="statusBar" text="Ready.">
- <HBox.margin>
- <Insets left="5.0" />
- </HBox.margin>
- </Label>
- <ProgressBar fx:id="progressBar" prefWidth="400.0" visible="false">
- <HBox.margin>
- <Insets left="10.0" />
- </HBox.margin>
- </ProgressBar>
+ <HBox prefWidth="963.0">
+ <children>
+ <Label text="Status:">
+ <font>
+ <Font name="System Bold" size="13.0" />
+ </font>
+ </Label>
+ <Label fx:id="statusBar" text="Ready.">
+ <HBox.margin>
+ <Insets left="5.0" />
+ </HBox.margin>
+ </Label>
+ <ProgressBar fx:id="progressBar" prefWidth="400.0" visible="false">
+ <HBox.margin>
+ <Insets left="10.0" />
+ </HBox.margin>
+ </ProgressBar>
+ </children>
+ <padding>
+ <Insets bottom="9.0" left="9.0" right="9.0" top="9.0" />
+ </padding>
+ </HBox>
+ <ImageView fx:id="dropDownIcon" fitHeight="66.0" fitWidth="39.0" layoutX="923.0" layoutY="-3.0" onMouseClicked="#onToggleConsole" pickOnBounds="true" preserveRatio="true">
+ <image>
+ <Image url="@icons/arrow_down.png" />
+ </image>
+ </ImageView>
+ <ScrollPane fx:id="scrollPane" layoutY="34.0" prefHeight="162.0" prefWidth="963.0">
+ <padding>
+ <Insets bottom="7.0" left="7.0" right="7.0" top="7.0" />
+ </padding>
+ <content>
+ <Label fx:id="console" prefWidth="935.0" text="Console Output:&#10; " wrapText="true">
+ <font>
+ <Font name="Monospaced Regular" size="13.0" />
+ </font>
+ </Label>
+ </content>
+ </ScrollPane>
</children>
- <padding>
- <Insets bottom="9.0" left="9.0" right="9.0" top="9.0" />
- </padding>
- </HBox>
+ </Pane>
</children>
</Pane>