Skip to content

Commit

Permalink
Disallow save button if empty name field
Browse files Browse the repository at this point in the history
Disallow saving game with an empty name field
  • Loading branch information
The-Zen-Cat committed Sep 8, 2022
1 parent ee0d958 commit 53bd75c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions OpenRA.Mods.Common/Widgets/Logic/GameSaveBrowserLogic.cs
Expand Up @@ -112,6 +112,7 @@ public GameSaveBrowserLogic(Widget widget, ModData modData, Action onExit, Actio
}

var saveButton = panel.Get<ButtonWidget>("SAVE_BUTTON");
saveButton.IsDisabled = () => string.IsNullOrWhiteSpace(saveTextField.Text);
saveButton.OnClick = () => { Save(world); };
saveButton.IsVisible = () => true;

Expand Down

0 comments on commit 53bd75c

Please sign in to comment.