Desktop: Escape in a modified game asks about saving; Escape in the question leaves
The game's Escape is taken when it leaves: the question about unsaved edits, opened in the same frame, read the same key as its own Escape and closed at once, so Escape seemed to do nothing in a modified game. In the question Escape now goes on without saving (the owner's choice); Cancel stays to keep editing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
ff6c966953
commit
a3541ed1d4
3 changed files with 10 additions and 3 deletions
|
|
@ -1489,6 +1489,9 @@ impl GameView {
|
|||
} else if self.board.is_busy() {
|
||||
self.board.clear();
|
||||
} else if !crate::app::overlay_open(ui.ctx()) {
|
||||
// Taken: the question about unsaved edits that leaving may open in
|
||||
// this frame must not read the same key as its own Escape.
|
||||
ui.input_mut(|i| i.consume_key(Modifiers::NONE, Key::Escape));
|
||||
actions.push(if self.previous.is_some() {
|
||||
GameAction::ReturnToPrevious
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue