make the convenience method more legit convenient

This commit is contained in:
Adam D. Ruppe 2019-05-11 09:42:54 -04:00
parent f9442ead2a
commit 6357257cb8
1 changed files with 1 additions and 1 deletions

View File

@ -6010,7 +6010,7 @@ void displayImage(Image image, SimpleWindow win = null) {
} }
win.eventLoop(0, win.eventLoop(0,
(KeyEvent ev) { (KeyEvent ev) {
if (ev.pressed) win.close(); if (ev.pressed && (ev.key == Key.Escape || ev.key == Key.Space)) win.close();
} ); } );
} else { } else {
win.image = image; win.image = image;