trying windows workaround
This commit is contained in:
parent
403a2a100a
commit
9090a0f095
2 changed files with 17 additions and 15 deletions
|
@ -351,11 +351,13 @@ class PrimaryController {
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private fun onToggleConsole() {
|
private fun onToggleConsole() {
|
||||||
|
// this os variable is a workaround for weird issues on windows
|
||||||
|
val os = System.getProperty("os.name").lowercase()
|
||||||
if (showingConsole) {
|
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"))
|
dropDownIcon.image = Image(App().javaClass.getResourceAsStream("icons/arrow_down.png"))
|
||||||
} else {
|
} 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"))
|
dropDownIcon.image = Image(App().javaClass.getResourceAsStream("icons/arrow_up.png"))
|
||||||
}
|
}
|
||||||
showingConsole = !showingConsole
|
showingConsole = !showingConsole
|
||||||
|
@ -735,7 +737,7 @@ class PrimaryController {
|
||||||
val hasProperties = File(directory + File.separator + "server.properties").isFile
|
val hasProperties = File(directory + File.separator + "server.properties").isFile
|
||||||
val hasServer = findServerJar()
|
val hasServer = findServerJar()
|
||||||
|
|
||||||
if (hasDummy && hasServer && hasProperties) {
|
if (hasDummy && hasServer) {
|
||||||
// server complete, just read jproperties
|
// server complete, just read jproperties
|
||||||
statusBar.text = "Server found!"
|
statusBar.text = "Server found!"
|
||||||
startButton.isDisable = false
|
startButton.isDisable = false
|
||||||
|
|
|
@ -23,9 +23,9 @@
|
||||||
<?import javafx.scene.layout.Pane?>
|
<?import javafx.scene.layout.Pane?>
|
||||||
<?import javafx.scene.text.Font?>
|
<?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>
|
<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>
|
<children>
|
||||||
<Button id="openFile" fx:id="chooseDirectoryButton" lineSpacing="10.0" mnemonicParsing="false" onAction="#onDirectoryButtonClick" text="Choose Directory...">
|
<Button id="openFile" fx:id="chooseDirectoryButton" lineSpacing="10.0" mnemonicParsing="false" onAction="#onDirectoryButtonClick" text="Choose Directory...">
|
||||||
<opaqueInsets>
|
<opaqueInsets>
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
<Insets bottom="7.0" left="7.0" right="7.0" top="7.0" />
|
<Insets bottom="7.0" left="7.0" right="7.0" top="7.0" />
|
||||||
</padding>
|
</padding>
|
||||||
</HBox>
|
</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>
|
<padding>
|
||||||
<Insets bottom="7.0" left="7.0" right="7.0" top="7.0" />
|
<Insets bottom="7.0" left="7.0" right="7.0" top="7.0" />
|
||||||
</padding>
|
</padding>
|
||||||
|
@ -120,9 +120,9 @@
|
||||||
<Insets bottom="3.0" />
|
<Insets bottom="3.0" />
|
||||||
</opaqueInsets>
|
</opaqueInsets>
|
||||||
</HBox>
|
</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>
|
<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>
|
<content>
|
||||||
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="311.0" prefWidth="625.0">
|
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="311.0" prefWidth="625.0">
|
||||||
<children>
|
<children>
|
||||||
|
@ -172,7 +172,7 @@
|
||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
</content>
|
</content>
|
||||||
</TitledPane>
|
</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>
|
<content>
|
||||||
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="269.0" prefWidth="625.0">
|
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="269.0" prefWidth="625.0">
|
||||||
<children>
|
<children>
|
||||||
|
@ -291,7 +291,7 @@
|
||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
</content>
|
</content>
|
||||||
</TitledPane>
|
</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>
|
<content>
|
||||||
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="94.0" prefWidth="303.0">
|
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="94.0" prefWidth="303.0">
|
||||||
<children>
|
<children>
|
||||||
|
@ -308,7 +308,7 @@
|
||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
</content>
|
</content>
|
||||||
</TitledPane>
|
</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>
|
<content>
|
||||||
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="94.0" prefWidth="303.0">
|
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="94.0" prefWidth="303.0">
|
||||||
<children>
|
<children>
|
||||||
|
@ -317,7 +317,7 @@
|
||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
</content>
|
</content>
|
||||||
</TitledPane>
|
</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>
|
<content>
|
||||||
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="94.0" prefWidth="303.0">
|
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="94.0" prefWidth="303.0">
|
||||||
<children>
|
<children>
|
||||||
|
@ -328,7 +328,7 @@
|
||||||
</TitledPane>
|
</TitledPane>
|
||||||
</children>
|
</children>
|
||||||
</Pane>
|
</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>
|
<buttons>
|
||||||
<Button fx:id="infoButton" mnemonicParsing="false" onAction="#onInfo" text="About ServerCraft" ButtonBar.buttonData="LEFT" />
|
<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="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" />
|
<Insets bottom="8.0" left="8.0" right="8.0" top="8.0" />
|
||||||
</padding>
|
</padding>
|
||||||
</ButtonBar>
|
</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>
|
<children>
|
||||||
<HBox prefWidth="963.0">
|
<HBox prefWidth="963.0">
|
||||||
<children>
|
<children>
|
||||||
|
@ -368,7 +368,7 @@
|
||||||
<Image url="@icons/arrow_down.png" />
|
<Image url="@icons/arrow_down.png" />
|
||||||
</image>
|
</image>
|
||||||
</ImageView>
|
</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>
|
<padding>
|
||||||
<Insets bottom="7.0" left="7.0" right="7.0" top="7.0" />
|
<Insets bottom="7.0" left="7.0" right="7.0" top="7.0" />
|
||||||
</padding>
|
</padding>
|
||||||
|
|
Loading…
Add table
Reference in a new issue