|
@@ -209,11 +209,13 @@ void MaFenetre::lancerDialogueOptions() {
|
|
|
|
|
|
void MaFenetre::keyReleaseEvent (QKeyEvent * evenement) {
|
|
|
if (evenement->key() == Qt::Key_Space) {
|
|
|
- if (marche == true) {
|
|
|
+ if (marche) {
|
|
|
switcher();
|
|
|
}
|
|
|
- if (marche == false) {
|
|
|
+ if ( !marche && boutonDemarrer->isEnabled()) {
|
|
|
demarrer();
|
|
|
+ } else if ( !marche && !boutonDemarrer->isEnabled()) {
|
|
|
+ init();
|
|
|
}
|
|
|
}
|
|
|
if (evenement->key() == Qt::Key_Return) {
|