Disallow saving the game with an empty name field

This commit is contained in:
Zachary Schirm
2022-09-08 18:31:50 -04:00
committed by Gustas
parent 125a7b8c88
commit 9a5d352e41

View File

@@ -112,6 +112,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
}
var saveButton = panel.Get<ButtonWidget>("SAVE_BUTTON");
saveButton.IsDisabled = () => string.IsNullOrWhiteSpace(saveTextField.Text);
saveButton.OnClick = () => { Save(world); };
saveButton.IsVisible = () => true;