mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-30 07:21:34 -04:00
Resolved #2794 - Save games and maps cannot have slashes/backslashes, to avoid foldername/filename confusion
This commit is contained in:
parent
329cad660e
commit
0271fdead2
@ -24,6 +24,7 @@ class MapEditorMenuPopup(var mapEditorScreen: MapEditorScreen): Popup(mapEditorS
|
|||||||
private val mapNameEditor: TextField = TextField(mapEditorScreen.mapName, skin)
|
private val mapNameEditor: TextField = TextField(mapEditorScreen.mapName, skin)
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
mapNameEditor.textFieldFilter = TextField.TextFieldFilter { _, char -> char != '\\' && char != '/' }
|
||||||
add(mapNameEditor).fillX().row()
|
add(mapNameEditor).fillX().row()
|
||||||
mapNameEditor.selectAll()
|
mapNameEditor.selectAll()
|
||||||
mapNameEditor.maxLength = 240 // A few under max for most filesystems
|
mapNameEditor.maxLength = 240 // A few under max for most filesystems
|
||||||
|
@ -22,6 +22,7 @@ class SaveGameScreen : PickerScreen() {
|
|||||||
init {
|
init {
|
||||||
setDefaultCloseAction()
|
setDefaultCloseAction()
|
||||||
|
|
||||||
|
textField.textFieldFilter = TextField.TextFieldFilter { _, char -> char != '\\' && char != '/' }
|
||||||
currentSaves.add("Current saves".toLabel()).row()
|
currentSaves.add("Current saves".toLabel()).row()
|
||||||
updateShownSaves(false)
|
updateShownSaves(false)
|
||||||
topTable.add(ScrollPane(currentSaves)).height(stage.height * 2 / 3)
|
topTable.add(ScrollPane(currentSaves)).height(stage.height * 2 / 3)
|
||||||
@ -78,5 +79,3 @@ class SaveGameScreen : PickerScreen() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user