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 org.hso.texturesyncclient.view.startupView.StartupView
 | 
				
			||||||
import tornadofx.App
 | 
					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.paint.Paint
 | 
				
			||||||
import javafx.scene.control.Label
 | 
					import javafx.scene.control.Label
 | 
				
			||||||
import javafx.scene.layout.Priority
 | 
					import javafx.scene.layout.Priority
 | 
				
			||||||
import javafx.scene.text.Font
 | 
					 | 
				
			||||||
import javafx.scene.text.FontWeight
 | 
					 | 
				
			||||||
import tornadofx.*
 | 
					import tornadofx.*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class ImportView : View() {
 | 
					class ImportView : View() {
 | 
				
			||||||
@ -57,19 +55,18 @@ class ImportView : View() {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        style {
 | 
					        style {
 | 
				
			||||||
            labelHeading.font = Font.font("Verdana", FontWeight.MEDIUM, 40.0)
 | 
					            labelHeading.style = "-fx-font: 20px Verdana; -fx-text-fill: #2b7bbb;"
 | 
				
			||||||
            labelHeading.textFill = Paint.valueOf("#2b7bbb")
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            tfFilePath.style = "-fx-text-fill: #b15b2e;"
 | 
				
			||||||
            tfFilePath.promptText = "Pfad zur Datei"
 | 
					            tfFilePath.promptText = "Pfad zur Datei"
 | 
				
			||||||
            tfFilePath.hgrow = Priority.ALWAYS
 | 
					            tfFilePath.hgrow = Priority.ALWAYS
 | 
				
			||||||
            tfFilePath.style = "-fx-text-fill: #b15b2e;"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
            btnFileChooser.style = "-fx-button-type: RAISED; -fx-background-color: #3c3f41; -fx-text-fill: #2b7bbb;"
 | 
					            btnFileChooser.style = "-fx-button-type: RAISED; -fx-background-color: #3c3f41; -fx-text-fill: #2b7bbb;"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            labelName.style = "-fx-font: 14px Verdana; -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.style = "-fx-text-fill: #b15b2e;"
 | 
				
			||||||
 | 
					            tfName.promptText = "Name eingeben"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            labelTags.style = "-fx-font: 14px Verdana; -fx-text-fill: #2b7bbb;"
 | 
					            labelTags.style = "-fx-font: 14px Verdana; -fx-text-fill: #2b7bbb;"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1,6 +1,5 @@
 | 
				
			|||||||
package org.hso.texturesyncclient.view.importView
 | 
					package org.hso.texturesyncclient.view.importView
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import javafx.stage.FileChooser
 | 
					 | 
				
			||||||
import javafx.stage.FileChooser.ExtensionFilter
 | 
					import javafx.stage.FileChooser.ExtensionFilter
 | 
				
			||||||
import tornadofx.Controller
 | 
					import tornadofx.Controller
 | 
				
			||||||
import tornadofx.FileChooserMode
 | 
					import tornadofx.FileChooserMode
 | 
				
			||||||
 | 
				
			|||||||
@ -14,8 +14,8 @@ class DetailView: View() {
 | 
				
			|||||||
    val preview = Preview3D()
 | 
					    val preview = Preview3D()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    init {
 | 
					    init {
 | 
				
			||||||
        val DIFFUSE_MAP = "https://bit.ly/2FTajSP"
 | 
					        // set a default texture
 | 
				
			||||||
        preview.setTexture(Image(DIFFUSE_MAP))
 | 
					        preview.setTexture(Image("textures/sample_texture.jpg"))
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    override val root = form {
 | 
					    override val root = form {
 | 
				
			||||||
 | 
				
			|||||||
@ -1,6 +1,5 @@
 | 
				
			|||||||
package org.hso.texturesyncclient.view.startupView
 | 
					package org.hso.texturesyncclient.view.startupView
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import com.jfoenix.animation.alert.CenterTransition
 | 
					 | 
				
			||||||
import com.jfoenix.controls.JFXButton
 | 
					import com.jfoenix.controls.JFXButton
 | 
				
			||||||
import com.jfoenix.controls.JFXSpinner
 | 
					import com.jfoenix.controls.JFXSpinner
 | 
				
			||||||
import com.jfoenix.controls.JFXTextField
 | 
					import com.jfoenix.controls.JFXTextField
 | 
				
			||||||
@ -12,8 +11,6 @@ import javafx.scene.layout.Background
 | 
				
			|||||||
import javafx.scene.layout.BackgroundFill
 | 
					import javafx.scene.layout.BackgroundFill
 | 
				
			||||||
import javafx.scene.layout.CornerRadii
 | 
					import javafx.scene.layout.CornerRadii
 | 
				
			||||||
import javafx.scene.paint.Paint
 | 
					import javafx.scene.paint.Paint
 | 
				
			||||||
import javafx.scene.text.Font
 | 
					 | 
				
			||||||
import javafx.scene.text.FontWeight
 | 
					 | 
				
			||||||
import tornadofx.*
 | 
					import tornadofx.*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class StartupView : View("StartupView") {
 | 
					class StartupView : View("StartupView") {
 | 
				
			||||||
@ -51,14 +48,12 @@ class StartupView : View("StartupView") {
 | 
				
			|||||||
        style {
 | 
					        style {
 | 
				
			||||||
            spinnerStatus.isVisible = false
 | 
					            spinnerStatus.isVisible = false
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            labelStatus.font = Font.font("Verdana", FontWeight.MEDIUM, 20.0)
 | 
					            labelStatus.style = "-fx-font: 20px Verdana; -fx-text-fill: #2b7bbb;"
 | 
				
			||||||
            labelStatus.textFill = Paint.valueOf("#2b7bbb")
 | 
					            labelServerIP.style = "-fx-font: 15px Verdana; -fx-text-fill: #2b7bbb;"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            labelServerIP.textFill = Paint.valueOf("#2b7bbb")
 | 
					            btnConnect.style = "-fx-button-type: RAISED; -fx-background-color: #3c3f41; -fx-text-fill: #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))
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            //tfServerIP.style = "-fx-text-fill: #b15b2e;"
 | 
				
			||||||
            tfServerIP.style { //TODO without .style
 | 
					            tfServerIP.style { //TODO without .style
 | 
				
			||||||
                textFill = Paint.valueOf("#b15b2e")
 | 
					                textFill = Paint.valueOf("#b15b2e")
 | 
				
			||||||
                alignment = Pos.BASELINE_CENTER
 | 
					                alignment = Pos.BASELINE_CENTER
 | 
				
			||||||
@ -77,7 +72,7 @@ class StartupView : View("StartupView") {
 | 
				
			|||||||
            if (it.code == KeyCode.ENTER) {
 | 
					            if (it.code == KeyCode.ENTER) {
 | 
				
			||||||
                spinnerStatus.isVisible = true
 | 
					                spinnerStatus.isVisible = true
 | 
				
			||||||
                svc.btnConnectAction(tfServerIP.text)
 | 
					                svc.btnConnectAction(tfServerIP.text)
 | 
				
			||||||
                spinnerStatus.isVisible = false
 | 
					                //spinnerStatus.isVisible = false
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -15,10 +15,10 @@ class StartupViewController : Controller() {
 | 
				
			|||||||
        startupView.labelStatus.text =  txt
 | 
					        startupView.labelStatus.text =  txt
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
fun tfServerIPClear (){
 | 
					    fun tfServerIPClear (){
 | 
				
			||||||
    val startupView = find(StartupView::class)
 | 
					        val startupView = find(StartupView::class)
 | 
				
			||||||
    startupView.tfServerIP.clear()
 | 
					        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