aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin
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/main/kotlin
parent403a2a100a8930ba8f6cd9e253fb4f922ee21ede (diff)
downloadServerCraft-9090a0f095af855518cb899f36346d79e0a07b0b.tar
ServerCraft-9090a0f095af855518cb899f36346d79e0a07b0b.tar.gz
ServerCraft-9090a0f095af855518cb899f36346d79e0a07b0b.tar.bz2
trying windows workaround
Diffstat (limited to 'src/main/kotlin')
-rw-r--r--src/main/kotlin/xyz/brysonsteck/ServerCraft/controllers/PrimaryController.kt8
1 files changed, 5 insertions, 3 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