diff --git a/motus/Bouton.qml b/motus/Bouton.qml new file mode 100644 index 0000000000000000000000000000000000000000..cc233796bb3045587838cd4ba0482ae303e13fb5 --- /dev/null +++ b/motus/Bouton.qml @@ -0,0 +1,33 @@ +import QtQuick + +Item { + x: 120 + y: 50 + width: 180 + height: 40 + property alias mouseArea: mouseArea + + Rectangle { + id: rectangle + color: "#2ec27e" + anchors.fill: parent + anchors.leftMargin: 0 + anchors.rightMargin: 0 + anchors.topMargin: 0 + anchors.bottomMargin: 0 + + Text { + id: _text + x: 40 + y: 13 + text: qsTr("Démarrer la partie") + font.pixelSize: 12 + } + } + + MouseArea { + id: mouseArea + anchors.fill: parent + } + +} diff --git a/motus/CMakeLists.txt b/motus/CMakeLists.txt index 11878d1362c292854bf8c2e41b803ee568ed3ccf..108da781b86833fa37b4f8902e8a3bcb6a352f0c 100644 --- a/motus/CMakeLists.txt +++ b/motus/CMakeLists.txt @@ -31,6 +31,9 @@ qt_add_qml_module(appmotus RESOURCES assets/enter.png assets/del.png RESOURCES words_alpha.txt QML_FILES MenuDeroulant.qml + QML_FILES Bouton.qml + RESOURCES + QML_FILES GameWindow.qml ) # Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1. diff --git a/motus/GameWindow.qml b/motus/GameWindow.qml new file mode 100644 index 0000000000000000000000000000000000000000..abdd6f38078c95a0d0629db4ebd091a65092b691 --- /dev/null +++ b/motus/GameWindow.qml @@ -0,0 +1,19 @@ +import QtQuick + +Item { + width: 900 + height: 800 + + Rectangle { + id: rectangle + color: "#ffffff" + anchors.fill: parent + + Clavier { + id: clavier + x: 225 + y: 594 + } + } + +} diff --git a/motus/Main.qml b/motus/Main.qml index 6e90d9b3ea36c51ab3d7987468706c41a880f779..4a50211240a2e1e3b70911cca1aeb011029bca7d 100644 --- a/motus/Main.qml +++ b/motus/Main.qml @@ -1,14 +1,29 @@ import QtQuick Window { - width: 640 - height: 480 + width: 900 + height: 800 visible: true title: qsTr("Hello World") MenuDeroulant { id: menuDeroulant - x: 36 - y: 269 + x: 38 + y: 301 } + + Bouton { + id: bouton + x: 360 + y: 624 + mouseArea.onClicked:{ + pageLoader.source = "GameWindow.qml" + } + } + + Loader { + id: pageLoader + anchors.centerIn: parent + } + } diff --git a/motus/Resources.qrc b/motus/Resources.qrc index 3d9b5060e6fbea8de33925a59cb7541d4356796e..90f00a4f4f44de866ea813758f297cf9733984d0 100644 --- a/motus/Resources.qrc +++ b/motus/Resources.qrc @@ -4,5 +4,8 @@ <file>Main.qml</file> <file>Clavier.qml</file> <file>MenuDeroulant.qml</file> + <file>bouton.qml</file> + <file>Bouton.qml</file> + <file>GameWindow.qml</file> </qresource> </RCC>