use css style option, save the sample texture locally
This commit is contained in:
		@ -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){
 | 
			
		||||
    
 | 
			
		||||
}
 | 
			
		||||
@ -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;"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
 | 
			
		||||
@ -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 {
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -15,10 +15,10 @@ class StartupViewController : Controller() {
 | 
			
		||||
        startupView.labelStatus.text =  txt
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
fun tfServerIPClear (){
 | 
			
		||||
    fun tfServerIPClear (){
 | 
			
		||||
        val startupView = find(StartupView::class)
 | 
			
		||||
        startupView.tfServerIP.clear()
 | 
			
		||||
}
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								client/src/main/resources/textures/sample_texture.jpg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								client/src/main/resources/textures/sample_texture.jpg
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 115 KiB  | 
		Reference in New Issue
	
	Block a user