diff --git a/Motus/LangageButton.qml b/Motus/LangageButton.qml index 7ad8cd4b505d4de01c538e06768bec5d412ffbc0..13123c2bdf980d569631616c0f6927fc3e246502 100644 --- a/Motus/LangageButton.qml +++ b/Motus/LangageButton.qml @@ -3,6 +3,7 @@ import QtQuick Item { width: 200 height: 100 + property alias rectangleColor: rectangle.color property alias _textText: _text.text @@ -12,7 +13,7 @@ Item { y: 0 width: 200 height: 100 - color: "#7a7a7a" + color: rectangleColor radius: 10 border.color: "#ffffff" border.width: 5 diff --git a/Motus/Main.qml b/Motus/Main.qml index dfcb13151ee1d65c3db46071259cb0261c2c901c..1c119a452e66a20368564268e8af9c32f4d7c784 100644 --- a/Motus/Main.qml +++ b/Motus/Main.qml @@ -240,6 +240,7 @@ Window { id: langageButton anchors.horizontalCenter: parent.horizontalCenter _textText: "Français" + rectangleColor: "#7a7a7a" MouseArea { anchors.left: parent.left anchors.top: parent.top @@ -247,19 +248,26 @@ Window { anchors.horizontalCenter: parent.horizontalCenter cursorShape: Qt.PointingHandCursor onClicked: { + motusGame.dictionnaryChoosed = "Motus\\mots_francais_bis.txt"; + langageButton2.rectangleColor= "#7a7a7a"; + langageButton.rectangleColor= "green"; } } } LangageButton { + id: langageButton2 anchors.horizontalCenter: parent.horizontalCenter _textText: "English" + rectangleColor: "green" MouseArea { anchors.fill: parent cursorShape: Qt.PointingHandCursor onClicked: { motusGame.dictionnaryChoosed = "Motus\\words_alpha.txt"; + langageButton2.rectangleColor= "green"; + langageButton.rectangleColor= "#7a7a7a"; } } }