use css style option, save the sample texture locally

This commit is contained in:
Jannik 2019-05-09 12:03:49 +02:00
parent 956e885aa2
commit 805cfed250
Signed by: Seil0
GPG Key ID: E8459F3723C52C24
7 changed files with 15 additions and 24 deletions

View File

@ -5,6 +5,6 @@ import org.hso.texturesyncclient.view.mainView.MainView
import org.hso.texturesyncclient.view.startupView.StartupView
import tornadofx.App
class Main: App(MainView::class){
class Main: App(ImportView::class){
}

View File

@ -11,8 +11,6 @@ import javafx.scene.layout.CornerRadii
import javafx.scene.paint.Paint
import javafx.scene.control.Label
import javafx.scene.layout.Priority
import javafx.scene.text.Font
import javafx.scene.text.FontWeight
import tornadofx.*
class ImportView : View() {
@ -57,19 +55,18 @@ class ImportView : View() {
}
style {
labelHeading.font = Font.font("Verdana", FontWeight.MEDIUM, 40.0)
labelHeading.textFill = Paint.valueOf("#2b7bbb")
labelHeading.style = "-fx-font: 20px Verdana; -fx-text-fill: #2b7bbb;"
tfFilePath.style = "-fx-text-fill: #b15b2e;"
tfFilePath.promptText = "Pfad zur Datei"
tfFilePath.hgrow = Priority.ALWAYS
tfFilePath.style = "-fx-text-fill: #b15b2e;"
btnFileChooser.style = "-fx-button-type: RAISED; -fx-background-color: #3c3f41; -fx-text-fill: #2b7bbb;"
labelName.style = "-fx-font: 14px Verdana; -fx-text-fill: #2b7bbb;"
tfName.promptText = "Name eingeben"
tfName.style = "-fx-text-fill: #b15b2e;"
tfName.promptText = "Name eingeben"
labelTags.style = "-fx-font: 14px Verdana; -fx-text-fill: #2b7bbb;"

View File

@ -1,6 +1,5 @@
package org.hso.texturesyncclient.view.importView
import javafx.stage.FileChooser
import javafx.stage.FileChooser.ExtensionFilter
import tornadofx.Controller
import tornadofx.FileChooserMode

View File

@ -14,8 +14,8 @@ class DetailView: View() {
val preview = Preview3D()
init {
val DIFFUSE_MAP = "https://bit.ly/2FTajSP"
preview.setTexture(Image(DIFFUSE_MAP))
// set a default texture
preview.setTexture(Image("textures/sample_texture.jpg"))
}
override val root = form {

View File

@ -1,6 +1,5 @@
package org.hso.texturesyncclient.view.startupView
import com.jfoenix.animation.alert.CenterTransition
import com.jfoenix.controls.JFXButton
import com.jfoenix.controls.JFXSpinner
import com.jfoenix.controls.JFXTextField
@ -12,8 +11,6 @@ import javafx.scene.layout.Background
import javafx.scene.layout.BackgroundFill
import javafx.scene.layout.CornerRadii
import javafx.scene.paint.Paint
import javafx.scene.text.Font
import javafx.scene.text.FontWeight
import tornadofx.*
class StartupView : View("StartupView") {
@ -51,14 +48,12 @@ class StartupView : View("StartupView") {
style {
spinnerStatus.isVisible = false
labelStatus.font = Font.font("Verdana", FontWeight.MEDIUM, 20.0)
labelStatus.textFill = Paint.valueOf("#2b7bbb")
labelStatus.style = "-fx-font: 20px Verdana; -fx-text-fill: #2b7bbb;"
labelServerIP.style = "-fx-font: 15px Verdana; -fx-text-fill: #2b7bbb;"
labelServerIP.textFill = Paint.valueOf("#2b7bbb")
labelServerIP.font = Font.font("Verdana", FontWeight.MEDIUM, 15.0)
btnConnect.textFill = Paint.valueOf("#2b7bbb")
btnConnect.background = Background(BackgroundFill(Paint.valueOf("#3c3f41"), CornerRadii.EMPTY, Insets.EMPTY))
btnConnect.style = "-fx-button-type: RAISED; -fx-background-color: #3c3f41; -fx-text-fill: #2b7bbb;"
//tfServerIP.style = "-fx-text-fill: #b15b2e;"
tfServerIP.style { //TODO without .style
textFill = Paint.valueOf("#b15b2e")
alignment = Pos.BASELINE_CENTER
@ -77,7 +72,7 @@ class StartupView : View("StartupView") {
if (it.code == KeyCode.ENTER) {
spinnerStatus.isVisible = true
svc.btnConnectAction(tfServerIP.text)
spinnerStatus.isVisible = false
//spinnerStatus.isVisible = false
}
}

View File

@ -15,10 +15,10 @@ class StartupViewController : Controller() {
startupView.labelStatus.text = txt
}
fun tfServerIPClear (){
val startupView = find(StartupView::class)
startupView.tfServerIP.clear()
}
fun tfServerIPClear (){
val startupView = find(StartupView::class)
startupView.tfServerIP.clear()
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB