Skip to content
Snippets Groups Projects
Commit e0974f51 authored by Breitwiller Josephine's avatar Breitwiller Josephine
Browse files

Update GamePage.qml

parent 7cd43215
No related branches found
No related tags found
No related merge requests found
......@@ -214,6 +214,8 @@ Rectangle {
id: keyHandler
focus: true
Component.onCompleted: keyHandler.forceActiveFocus() // Assure que l'élément a le focus
Keys.onPressed: {
if (event.key === Qt.Key_Left) gameManager.moveLeft();
else if (event.key === Qt.Key_Right) gameManager.moveRight();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment