resolved #12511 - disallow slashes in mp game names

This commit is contained in:
yairm210
2024-11-21 19:26:24 +02:00
parent d28aabaf7c
commit c68f1fe0dc

View File

@ -284,6 +284,8 @@ class MultiplayerScreen : PickerScreen() {
btn.onClick {
Popup(this).apply {
val textField = UncivTextField("Game name", selectedGame!!.name)
// slashes in mp names are interpreted as directory separators, so we don't allow them
textField.setTextFieldFilter { _, c -> c != '/' && c != '\\' }
add(textField).width(stageToShowOn.width / 2).row()
val saveButton = "Save".toTextButton()