Merge branch 'master' of git.mosad.xyz:localhorst/TextureSync
This commit is contained in:
commit
3f18760a74
@ -29,8 +29,6 @@ import java.nio.file.Files
|
|||||||
import java.io.FileOutputStream
|
import java.io.FileOutputStream
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.text.DateFormat
|
|
||||||
|
|
||||||
|
|
||||||
class RootController : Controller() {
|
class RootController : Controller() {
|
||||||
|
|
||||||
@ -230,18 +228,9 @@ class RootController : Controller() {
|
|||||||
*/
|
*/
|
||||||
fun showDetail(data: Texture) {
|
fun showDetail(data: Texture) {
|
||||||
mvc.setPreview3DTexture(con.getTexturePreview(data.textureHash))
|
mvc.setPreview3DTexture(con.getTexturePreview(data.textureHash))
|
||||||
|
|
||||||
val sdf = SimpleDateFormat("dd.MM.yyyy")
|
val sdf = SimpleDateFormat("dd.MM.yyyy")
|
||||||
|
|
||||||
|
mvc.setMeta(data.name, "${data.resolution.first}px x ${data.resolution.second}px", data.format.toString(), sdf.format(data.addedOn.time))
|
||||||
|
|
||||||
|
|
||||||
mvc.setMeta(
|
|
||||||
data.name,
|
|
||||||
"${data.resolution.first.toString()}px x ${data.resolution.second.toString()}px",
|
|
||||||
data.format.toString(),
|
|
||||||
sdf.format(data.addedOn.time)
|
|
||||||
)
|
|
||||||
mvc.setTags(data.tags.toList().observable())
|
mvc.setTags(data.tags.toList().observable())
|
||||||
selectedTexture = data
|
selectedTexture = data
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ import java.lang.Exception
|
|||||||
|
|
||||||
sealed class ConnectionException(override val message: String) : Exception(message)
|
sealed class ConnectionException(override val message: String) : Exception(message)
|
||||||
|
|
||||||
class ConnectionErrorException(val errorCode: Int, val errorMessage: String) :
|
class ConnectionErrorException(errorCode: Int, errorMessage: String) :
|
||||||
ConnectionException("$errorCode $errorMessage") {
|
ConnectionException("$errorCode $errorMessage") {
|
||||||
internal constructor(err: ErrorPackage) : this(err.code, err.message)
|
internal constructor(err: ErrorPackage) : this(err.code, err.message)
|
||||||
}
|
}
|
||||||
|
@ -15,21 +15,20 @@ import tornadofx.*
|
|||||||
|
|
||||||
class DetailView: View() {
|
class DetailView: View() {
|
||||||
|
|
||||||
private val mvc: MainViewController by inject()
|
|
||||||
|
|
||||||
val preview = Preview3D()
|
val preview = Preview3D()
|
||||||
val metaLabel = Label("Auflösung: 8MP\nName: Texture.png\nAndere: was anderes")
|
val metaLabel = Label("Auflösung: 8MP\nName: Texture.png\nAndere: was anderes\nEinfügedatum: 31.02.2019")
|
||||||
val cvTags = JFXChipView<String>()
|
val cvTags = JFXChipView<String>()
|
||||||
val btnImport = JFXButton("+")
|
val btnImport = JFXButton("+")
|
||||||
|
|
||||||
init {
|
init {
|
||||||
// set a default texture
|
// set a default texture
|
||||||
preview.setTexture(Image("textures/sample_texture_1.jpg"))
|
preview.setTexture(Image("textures/sample_texture_1.jpg"))
|
||||||
|
//preview.setTexture(Image("icons/TextureSync_Icon_256x256.jpg"))
|
||||||
}
|
}
|
||||||
|
|
||||||
override val root = form {
|
override val root = form {
|
||||||
minWidth = 250.0
|
minWidth = 250.0
|
||||||
background = Background(BackgroundFill(Paint.valueOf("#9f9f9f"), CornerRadii.EMPTY, Insets.EMPTY))
|
background = Background(BackgroundFill(Paint.valueOf("#3a3a3a"), CornerRadii.EMPTY, Insets.EMPTY))
|
||||||
|
|
||||||
fieldset(labelPosition = Orientation.VERTICAL) {
|
fieldset(labelPosition = Orientation.VERTICAL) {
|
||||||
|
|
||||||
@ -40,11 +39,13 @@ class DetailView: View() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
field {
|
field {
|
||||||
|
paddingTop = 2
|
||||||
|
paddingBottom = 3
|
||||||
add(metaLabel)
|
add(metaLabel)
|
||||||
}
|
}
|
||||||
|
|
||||||
field {
|
field {
|
||||||
minHeight = 145.0
|
minHeight = 155.0
|
||||||
add(cvTags)
|
add(cvTags)
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -58,12 +59,14 @@ class DetailView: View() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
style {
|
style {
|
||||||
cvTags.minHeight = 135.0
|
metaLabel.style = "-fx-text-fill: #2b7bbb;"
|
||||||
|
|
||||||
|
cvTags.minHeight = 145.0
|
||||||
cvTags.paddingAll = 3.0
|
cvTags.paddingAll = 3.0
|
||||||
cvTags.style = "-fx-background-color: #53585b; -fx-text-inner-color: #b15b2e;"
|
cvTags.style = "-fx-background-color: #53585b; -fx-text-inner-color: #b15b2e;"
|
||||||
|
|
||||||
btnImport.buttonType = JFXButton.ButtonType.RAISED
|
btnImport.buttonType = JFXButton.ButtonType.RAISED
|
||||||
btnImport.styleClass.add("jfx-floating-action-button");
|
btnImport.styleClass.add("jfx-floating-action-button")
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ class Preview3D : View("Preview3D") {
|
|||||||
style {
|
style {
|
||||||
minWidth = 200.px
|
minWidth = 200.px
|
||||||
minHeight = 200.px
|
minHeight = 200.px
|
||||||
background = Background(BackgroundFill(Color.valueOf("#9f9f9f"), CornerRadii.EMPTY, Insets.EMPTY))
|
background = Background(BackgroundFill(Color.valueOf("#3a3a3a"), CornerRadii.EMPTY, Insets.EMPTY))
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ class StartupViewController : Controller() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun setServerAddress(address: String) {
|
fun setServerAddress(address: String) {
|
||||||
sv.tfServerIP.text = address
|
//sv.tfServerIP.text = address
|
||||||
sv.tfServerIP.isFocusTraversable = false
|
sv.tfServerIP.isFocusTraversable = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BIN
client/src/main/resources/icons/TextureSync_Icon_256x256.jpeg
Normal file
BIN
client/src/main/resources/icons/TextureSync_Icon_256x256.jpeg
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
Loading…
Reference in New Issue
Block a user