Exit game save with escape
This commit is contained in:
committed by
Matthias Mailänder
parent
54547a11d0
commit
31840328b7
@@ -83,7 +83,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
this.isSavePanel = isSavePanel;
|
||||
Game.BeforeGameStart += OnGameStart;
|
||||
|
||||
panel.Get<ButtonWidget>("CANCEL_BUTTON").OnClick = () =>
|
||||
var cancelButton = panel.Get<ButtonWidget>("CANCEL_BUTTON");
|
||||
cancelButton.OnClick = () =>
|
||||
{
|
||||
Ui.CloseWindow();
|
||||
onExit();
|
||||
@@ -122,6 +123,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
|
||||
saveTextField = saveWidgets.Get<TextFieldWidget>("SAVE_TEXTFIELD");
|
||||
saveTextField.OnEnterKey = input => saveButton.HandleKeyPress(input);
|
||||
saveTextField.OnEscKey = input => cancelButton.HandleKeyPress(input);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user