TextureSync/client/src/main/kotlin/org/hso/texturesyncclient/model/GUIModelController.kt

28 lines
650 B
Kotlin
Raw Normal View History

2019-06-04 18:20:09 +02:00
package org.hso.texturesyncclient.model
import org.hso.texturesyncclient.controller.RootController
import tornadofx.Controller
class GUIModelController : Controller() {
2019-06-04 18:20:09 +02:00
private val rootc = find(RootController::class)
lateinit var lastSelected: GUIModel
fun isLastSelectedInitialized() = ::lastSelected.isInitialized
2019-06-04 18:20:09 +02:00
fun export(data: Texture) {
rootc.exportTexture(data)
}
fun delete(data: Texture) {
rootc.deleteTexture(data)
}
2019-06-04 18:20:09 +02:00
fun previewSelectedAction(data: Texture) {
rootc.showDetail(data)
}
fun setSelected(model: GUIModel) {
rootc.setSelectedTexture(model)
}
2019-06-04 18:20:09 +02:00
}