[Editor] Create settings for already opened maps

This commit is contained in:
2021-02-07 21:06:55 +01:00
parent 3887664b14
commit 28ae063ae9
3 changed files with 12 additions and 1 deletions

View File

@@ -30,6 +30,9 @@ class MapPane(
widthProperty().bind(mapVM.widthProperty)
heightProperty().bind(mapVM.heightProperty)
mapVM.item.rowsProperty.addListener { _, _, _ -> render() }
mapVM.item.columnsProperty.addListener { _, _, _ -> render() }
editorStateVM.showGridProperty.addListener { _, _, _ -> render() }
editorStateVM.selectedLayerProperty.addListener { _, _, _ -> render() }
editorStateVM.coverUnderlyingLayersProperty.addListener { _, _, _ -> render() }

View File

@@ -16,7 +16,9 @@ class MainView : View("BASE Game Editor") {
center = tabpane {
tabs.bind(mainController.openMaps) { scope, map ->
Tab(map.name, find<MapFragment>(scope).root).apply {
Tab().apply {
textProperty().bindBidirectional(map.nameProperty)
content = find<MapFragment>(scope).root
setOnClosed { mainController.openMaps.remove(scope) }
}
}

View File

@@ -128,5 +128,11 @@ class MapToolbarView : View() {
}
this += FontIcon("fa-paint-brush").apply { iconSize = 15 }
button(graphic = FontIcon("fa-sliders")) {
action {
find<MapSettingsFragment>().openModal(block = true, resizable = false)
}
}
}
}