[Editor] Create settings for already opened maps
This commit is contained in:
@@ -30,6 +30,9 @@ class MapPane(
|
|||||||
widthProperty().bind(mapVM.widthProperty)
|
widthProperty().bind(mapVM.widthProperty)
|
||||||
heightProperty().bind(mapVM.heightProperty)
|
heightProperty().bind(mapVM.heightProperty)
|
||||||
|
|
||||||
|
mapVM.item.rowsProperty.addListener { _, _, _ -> render() }
|
||||||
|
mapVM.item.columnsProperty.addListener { _, _, _ -> render() }
|
||||||
|
|
||||||
editorStateVM.showGridProperty.addListener { _, _, _ -> render() }
|
editorStateVM.showGridProperty.addListener { _, _, _ -> render() }
|
||||||
editorStateVM.selectedLayerProperty.addListener { _, _, _ -> render() }
|
editorStateVM.selectedLayerProperty.addListener { _, _, _ -> render() }
|
||||||
editorStateVM.coverUnderlyingLayersProperty.addListener { _, _, _ -> render() }
|
editorStateVM.coverUnderlyingLayersProperty.addListener { _, _, _ -> render() }
|
||||||
|
|||||||
@@ -16,7 +16,9 @@ class MainView : View("BASE Game Editor") {
|
|||||||
|
|
||||||
center = tabpane {
|
center = tabpane {
|
||||||
tabs.bind(mainController.openMaps) { scope, map ->
|
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) }
|
setOnClosed { mainController.openMaps.remove(scope) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -128,5 +128,11 @@ class MapToolbarView : View() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this += FontIcon("fa-paint-brush").apply { iconSize = 15 }
|
this += FontIcon("fa-paint-brush").apply { iconSize = 15 }
|
||||||
|
|
||||||
|
button(graphic = FontIcon("fa-sliders")) {
|
||||||
|
action {
|
||||||
|
find<MapSettingsFragment>().openModal(block = true, resizable = false)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user