From ac16798f12ca0e42a60c8f0d74d89c7a0c954bd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matt=C3=A9o=20Delabre?= Date: Tue, 12 Apr 2016 15:19:39 +0200 Subject: [PATCH] =?UTF-8?q?Raccourci=20pour=20quittationner=20l'=C3=A9dite?= =?UTF-8?q?ur?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/editor.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/editor.cpp b/src/editor.cpp index 245c150..f817ef9 100644 --- a/src/editor.cpp +++ b/src/editor.cpp @@ -229,6 +229,12 @@ void Editor::processEvent(const sf::Event& event) { if (event.key.code == sf::Keyboard::Space) { test(); } + + // touche retour ou échap : on quitte l'éditeur + if (event.key.code == sf::Keyboard::BackSpace || + event.key.code == sf::Keyboard::Escape) { + getManager().popState(); + } } }