Added info to storage view
This commit is contained in:
parent
252002db5a
commit
25251e64f9
@ -19,6 +19,7 @@ import javafx.beans.property.SimpleBooleanProperty
|
|||||||
import javafx.beans.property.SimpleObjectProperty
|
import javafx.beans.property.SimpleObjectProperty
|
||||||
import javafx.beans.property.SimpleStringProperty
|
import javafx.beans.property.SimpleStringProperty
|
||||||
import javafx.geometry.Insets
|
import javafx.geometry.Insets
|
||||||
|
import javafx.scene.control.ContextMenu
|
||||||
import javafx.scene.control.TreeItem
|
import javafx.scene.control.TreeItem
|
||||||
import javafx.scene.image.ImageView
|
import javafx.scene.image.ImageView
|
||||||
import javafx.scene.layout.Priority
|
import javafx.scene.layout.Priority
|
||||||
@ -139,11 +140,27 @@ class StorageView(private val context: Context = Global.instance()) : View(title
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
cellFormat { value ->
|
cellFormat { value ->
|
||||||
|
contextMenu = null
|
||||||
when (value.content) {
|
when (value.content) {
|
||||||
is Storage -> text = value.id
|
is Storage -> text = value.id
|
||||||
is NumassSet -> {
|
is NumassSet -> {
|
||||||
text = null
|
text = null
|
||||||
graphic = checkbox(value.id, value.checkedProperty)
|
graphic = checkbox(value.id, value.checkedProperty)
|
||||||
|
contextMenu = ContextMenu().apply {
|
||||||
|
item("Info") {
|
||||||
|
action {
|
||||||
|
openInternalBuilderWindow(title = "Info: ${value.id}", escapeClosesWindow = true) {
|
||||||
|
scrollpane {
|
||||||
|
textarea {
|
||||||
|
isEditable = false
|
||||||
|
isWrapText = true
|
||||||
|
text = value.content.meta.toString().replace(" ", "\n\t")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
is NumassPoint -> {
|
is NumassPoint -> {
|
||||||
text = null
|
text = null
|
||||||
|
Loading…
Reference in New Issue
Block a user