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(); + } } }