aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBryson Steck <brysonsteck@protonmail.com>2023-05-20 22:32:20 -0600
committerBryson Steck <brysonsteck@protonmail.com>2023-05-20 22:32:20 -0600
commit9090a0f095af855518cb899f36346d79e0a07b0b (patch)
tree4ea045d48678f98e5e14e384dc13b1bd308ee8af /src
parent403a2a100a8930ba8f6cd9e253fb4f922ee21ede (diff)
downloadServerCraft-9090a0f095af855518cb899f36346d79e0a07b0b.tar
ServerCraft-9090a0f095af855518cb899f36346d79e0a07b0b.tar.gz
ServerCraft-9090a0f095af855518cb899f36346d79e0a07b0b.tar.bz2
trying windows workaround
Diffstat (limited to 'src')
-rw-r--r--src/main/kotlin/xyz/brysonsteck/ServerCraft/controllers/PrimaryController.kt8
-rw-r--r--src/main/resources/xyz/brysonsteck/ServerCraft/primary.fxml24
2 files changed, 17 insertions, 15 deletions
diff --git a/src/main/kotlin/xyz/brysonsteck/ServerCraft/controllers/PrimaryController.kt b/src/main/kotlin/xyz/brysonsteck/ServerCraft/controllers/PrimaryController.kt
index d445923..11bcf5c 100644
--- a/src/main/kotlin/xyz/brysonsteck/ServerCraft/controllers/PrimaryController.kt
+++ b/src/main/kotlin/xyz/brysonsteck/ServerCraft/controllers/PrimaryController.kt
@@ -351,11 +351,13 @@ class PrimaryController {
@FXML
private fun onToggleConsole() {
+ // this os variable is a workaround for weird issues on windows
+ val os = System.getProperty("os.name").lowercase()
if (showingConsole) {
- primary.getScene().window.height = 743.0
+ primary.getScene().window.height = if (os.contains("win")) 750.0 else 743.0
dropDownIcon.image = Image(App().javaClass.getResourceAsStream("icons/arrow_down.png"))
} else {
- primary.getScene().window.height = 905.0
+ primary.getScene().window.height = if (os.contains("win")) 915.0 else 905.0
dropDownIcon.image = Image(App().javaClass.getResourceAsStream("icons/arrow_up.png"))
}
showingConsole = !showingConsole
@@ -735,7 +737,7 @@ class PrimaryController {
val hasProperties = File(directory + File.separator + "server.properties").isFile
val hasServer = findServerJar()
- if (hasDummy && hasServer && hasProperties) {
+ if (hasDummy && hasServer) {
// server complete, just read jproperties
statusBar.text = "Server found!"
startButton.isDisable = false
diff --git a/src/main/resources/xyz/brysonsteck/ServerCraft/primary.fxml b/src/main/resources/xyz/brysonsteck/ServerCraft/primary.fxml
index ea5651f..21f2e5e 100644
--- a/src/main/resources/xyz/brysonsteck/ServerCraft/primary.fxml
+++ b/src/main/resources/xyz/brysonsteck/ServerCraft/primary.fxml
@@ -23,9 +23,9 @@
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.text.Font?>
-<Pane fx:id="primary" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" 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" maxWidth="1.7976931348623157E308" prefHeight="39.0" prefWidth="963.0">
+ <HBox fx:id="directoryPane" prefHeight="39.0" prefWidth="963.0">
<children>
<Button id="openFile" fx:id="chooseDirectoryButton" lineSpacing="10.0" mnemonicParsing="false" onAction="#onDirectoryButtonClick" text="Choose Directory...">
<opaqueInsets>
@@ -58,7 +58,7 @@
<Insets bottom="7.0" left="7.0" right="7.0" top="7.0" />
</padding>
</HBox>
- <HBox fx:id="worldSettingsPane" disable="true" layoutY="39.0" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="41.0" prefWidth="963.0">
+ <HBox fx:id="worldSettingsPane" disable="true" layoutY="39.0" prefHeight="41.0" prefWidth="963.0">
<padding>
<Insets bottom="7.0" left="7.0" right="7.0" top="7.0" />
</padding>
@@ -120,9 +120,9 @@
<Insets bottom="3.0" />
</opaqueInsets>
</HBox>
- <Pane fx:id="parentPane" disable="true" layoutY="78.0" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="555.0" prefWidth="970.0">
+ <Pane fx:id="parentPane" disable="true" layoutY="78.0" prefHeight="555.0" prefWidth="970.0">
<children>
- <TitledPane fx:id="settingsPane" animated="false" collapsible="false" layoutX="10.0" layoutY="7.0" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="273.0" prefWidth="627.0" text="Server Settings">
+ <TitledPane fx:id="settingsPane" animated="false" collapsible="false" layoutX="10.0" layoutY="7.0" prefHeight="273.0" prefWidth="627.0" text="Server Settings">
<content>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="311.0" prefWidth="625.0">
<children>
@@ -172,7 +172,7 @@
</AnchorPane>
</content>
</TitledPane>
- <TitledPane fx:id="advancedPane" expanded="false" layoutX="10.0" layoutY="289.0" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="259.0" prefWidth="627.0" text="Advanced Server Settings">
+ <TitledPane fx:id="advancedPane" expanded="false" layoutX="10.0" layoutY="289.0" prefHeight="259.0" prefWidth="627.0" text="Advanced Server Settings">
<content>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="269.0" prefWidth="625.0">
<children>
@@ -291,7 +291,7 @@
</AnchorPane>
</content>
</TitledPane>
- <TitledPane fx:id="difficultyPane" animated="false" collapsible="false" layoutX="649.0" layoutY="7.0" maxWidth="1.7976931348623157E308" prefHeight="77.0" prefWidth="305.0" text="Difficulty">
+ <TitledPane fx:id="difficultyPane" animated="false" collapsible="false" layoutX="649.0" layoutY="7.0" prefHeight="77.0" prefWidth="305.0" text="Difficulty">
<content>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="94.0" prefWidth="303.0">
<children>
@@ -308,7 +308,7 @@
</AnchorPane>
</content>
</TitledPane>
- <TitledPane fx:id="gamemodePane" animated="false" collapsible="false" layoutX="649.0" layoutY="92.0" maxWidth="1.7976931348623157E308" prefHeight="77.0" prefWidth="305.0" text="Gamemode">
+ <TitledPane fx:id="gamemodePane" animated="false" collapsible="false" layoutX="649.0" layoutY="92.0" prefHeight="77.0" prefWidth="305.0" text="Gamemode">
<content>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="94.0" prefWidth="303.0">
<children>
@@ -317,7 +317,7 @@
</AnchorPane>
</content>
</TitledPane>
- <TitledPane fx:id="worldTypePane" animated="false" collapsible="false" layoutX="649.0" layoutY="178.0" maxWidth="1.7976931348623157E308" prefHeight="77.0" prefWidth="305.0" text="World Type">
+ <TitledPane fx:id="worldTypePane" animated="false" collapsible="false" layoutX="649.0" layoutY="178.0" prefHeight="77.0" prefWidth="305.0" text="World Type">
<content>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="94.0" prefWidth="303.0">
<children>
@@ -328,7 +328,7 @@
</TitledPane>
</children>
</Pane>
- <ButtonBar fx:id="buttonBar" buttonOrder="L+R" layoutY="635.0" maxWidth="1.7976931348623157E308" prefHeight="40.0" prefWidth="963.0">
+ <ButtonBar fx:id="buttonBar" buttonOrder="L+R" layoutY="635.0" prefHeight="40.0" prefWidth="963.0">
<buttons>
<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" />
@@ -339,7 +339,7 @@
<Insets bottom="8.0" left="8.0" right="8.0" top="8.0" />
</padding>
</ButtonBar>
- <Pane layoutY="680.0" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="196.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>
<HBox prefWidth="963.0">
<children>
@@ -368,7 +368,7 @@
<Image url="@icons/arrow_down.png" />
</image>
</ImageView>
- <ScrollPane fx:id="scrollPane" fitToHeight="true" fitToWidth="true" layoutY="34.0" maxHeight="1.7976931348623157E308" prefHeight="162.0" prefWidth="963.0">
+ <ScrollPane fx:id="scrollPane" layoutY="34.0" prefHeight="162.0" prefWidth="963.0" vbarPolicy="ALWAYS">
<padding>
<Insets bottom="7.0" left="7.0" right="7.0" top="7.0" />
</padding>