From 13c4c1cfc0f2ddcf53a9b2e4a1a516b795adb4f6 Mon Sep 17 00:00:00 2001 From: Bryson Steck Date: Sun, 14 May 2023 13:44:35 -0600 Subject: complete rename to ServerCraft --- .../main/kotlin/xyz/brysonsteck/servercraft/App.kt | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 app/src/main/kotlin/xyz/brysonsteck/servercraft/App.kt (limited to 'app/src/main/kotlin/xyz/brysonsteck/servercraft/App.kt') diff --git a/app/src/main/kotlin/xyz/brysonsteck/servercraft/App.kt b/app/src/main/kotlin/xyz/brysonsteck/servercraft/App.kt new file mode 100644 index 0000000..7aa5639 --- /dev/null +++ b/app/src/main/kotlin/xyz/brysonsteck/servercraft/App.kt @@ -0,0 +1,34 @@ +/* + * This Kotlin source file was generated by the Gradle 'init' task. + */ +package xyz.brysonsteck.servercraft + +import javafx.application.Application; +import javafx.fxml.FXMLLoader; +import javafx.scene.Parent; +import javafx.scene.Scene; +import javafx.scene.image.Image +import javafx.stage.Stage; +import java.awt.Desktop; + +class App : Application() { + + override fun start(stage: Stage) { + var scene = Scene(loadFXML("primary"), 963.0, 713.0) + stage.icons.add(Image(this.javaClass.getResourceAsStream("app.png"))) + stage.setResizable(false) + stage.title = "ServerCraft" + stage.scene = scene + stage.show() + } + + public fun loadFXML(fxml: String) : Parent { + val fxmlLoader = FXMLLoader(this.javaClass.getResource(fxml + ".fxml")) + return fxmlLoader.load() + } + + public fun run() { + launch() + } + +} -- cgit v1.2.3