From 4ec1400058af70bf092e2a2e02c9e6ff65a80e70 Mon Sep 17 00:00:00 2001 From: ppouchet <pierre.pouchet@etu.ec-lyon.fr> Date: Mon, 31 Mar 2025 11:45:02 +0200 Subject: [PATCH] Affichage de la langue choisie --- Motus/LangageButton.qml | 3 ++- Motus/Main.qml | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Motus/LangageButton.qml b/Motus/LangageButton.qml index 7ad8cd4..13123c2 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 dfcb131..1c119a4 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"; } } } -- GitLab