Allow saving games by pressing enter

This commit is contained in:
abcdefg30
2023-02-10 17:06:47 +01:00
committed by Gustas
parent f1d439a07f
commit 73f29005bd

View File

@@ -120,6 +120,14 @@ namespace OpenRA.Mods.Common.Widgets.Logic
saveTextField = saveWidgets.Get<TextFieldWidget>("SAVE_TEXTFIELD");
gameList.Bounds.Height -= saveWidgets.Bounds.Height;
saveWidgets.IsVisible = () => true;
saveTextField.OnEnterKey = _ =>
{
if (!string.IsNullOrWhiteSpace(saveTextField.Text))
Save(world);
return true;
};
}
else
{