Allow Escape key to cancel trades

This commit is contained in:
Snowram 2021-03-25 01:42:14 +01:00
parent 28952f6d7b
commit 0e259294d4

View File

@ -3127,6 +3127,8 @@ impl Hud {
WinEvent::InputUpdate(GameInput::Escape, true) => {
if self.typing() {
self.ui.focus_widget(None);
} else if self.show.trade {
self.events.push(Event::TradeAction(TradeAction::Decline));
} else {
// Close windows on esc
self.show.toggle_windows(global_state);