aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin
diff options
context:
space:
mode:
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