TextureSync/client/src/main/kotlin/org/hso/texturesyncclient/app/Main.kt

31 lines
911 B
Kotlin

package org.hso.texturesyncclient.app
import javafx.scene.image.Image
import javafx.stage.Stage
import org.hso.texturesyncclient.controller.SettingsController
import org.hso.texturesyncclient.view.startupView.StartupView
import org.hso.texturesyncclient.view.startupView.StartupViewController
import tornadofx.App
class Main : App(StartupView::class) {
val svc = StartupViewController()
override fun start(stage: Stage) {
stage.minWidth = 1008.00
stage.minHeight = 535.00
stage.width = 1008.00
stage.height = 535.00
stage.isResizable = true
stage.icons.add(Image("icons/TextureSync_Icon_256x256.png"))
stage.setOnCloseRequest { System.exit(0) }
super.start(stage)
stage.scene.stylesheets.add("/css/Styles.css") // this call must be after the super call
SettingsController.init()
svc.initConnection()
}
}