Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Momomotus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pouchet Pierre
Momomotus
Commits
c646b68d
Commit
c646b68d
authored
2 months ago
by
Massies Alexandre
Browse files
Options
Downloads
Patches
Plain Diff
couleurs okk
parent
c829e69b
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Motus/CMakeLists.txt
+1
-0
1 addition, 0 deletions
Motus/CMakeLists.txt
Motus/Case.qml
+4
-2
4 additions, 2 deletions
Motus/Case.qml
Motus/Main.qml
+21
-5
21 additions, 5 deletions
Motus/Main.qml
with
26 additions
and
7 deletions
Motus/CMakeLists.txt
+
1
−
0
View file @
c646b68d
...
...
@@ -48,6 +48,7 @@ qt_add_qml_module(appMotus
QML_FILES MotusTimer.qml
QML_FILES NumberLetterButton.qml
RESOURCES qtquickcontrols2.conf
RESOURCES mots_francais_bis.txt
)
# Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1.
...
...
This diff is collapsed.
Click to expand it.
Motus/Case.qml
+
4
−
2
View file @
c646b68d
...
...
@@ -4,6 +4,8 @@ Item {
id
:
_item
width
:
70
height
:
70
property
alias
rectangleBordercolor
:
rectangle
.
border
.
color
property
alias
rectangleColor
:
rectangle
.
color
focus
:
false
property
alias
rectangleBorderwidth
:
rectangle
.
border
.
width
property
alias
_textText
:
_text
.
text
...
...
@@ -26,11 +28,11 @@ Item {
color
:
"
#ffffff
"
text
:
qsTr
(
""
)
anchors.verticalCenter
:
parent
.
verticalCenter
font.pixelSize
:
6
0
font.pixelSize
:
5
0
horizontalAlignment
:
Text
.
AlignHCenter
verticalAlignment
:
Text
.
AlignVCenter
font.family
:
"
Tahoma
"
font.styleName
:
"
Bold
"
font.styleName
:
"
Regular
"
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
}
...
...
This diff is collapsed.
Click to expand it.
Motus/Main.qml
+
21
−
5
View file @
c646b68d
...
...
@@ -56,15 +56,31 @@ Window {
// Passage à la ligne suivante avec la touche Entrée
else
if
(
event
.
key
===
Qt
.
Key_Return
)
{
// On ne passe à la ligne suivante que si la ligne est complètement remplie
console
.
log
(
indice_case
);
if
(
indice_case
===
nb_lettres
)
{
// Ici, vous pouvez ajouter la vérification de la proposition (vérifier les lettres, colorier, etc.)
// Vérification de la proposition sur la ligne actuelle
for
(
var
ind_verif
=
0
;
ind_verif
<
nb_lettres
;
ind_verif
++
)
{
var
case_verif
=
caseArray
[
current_essai
*
nb_lettres
+
ind_verif
];
var
lettre_verif
=
case_verif
.
_textText
;
if
(
lettre_verif
===
mot_split
[
ind_verif
].
toUpperCase
())
{
case_verif
.
rectangleColor
=
"
#42cc3d
"
;
case_verif
.
rectangleBordercolor
=
"
#42cc3d
"
;
}
else
{
for
(
var
j
=
0
;
j
<
nb_lettres
;
j
++
)
{
if
(
lettre_verif
===
mot_split
[
j
].
toUpperCase
())
{
case_verif
.
rectangleColor
=
"
#f0d437
"
;
case_verif
.
rectangleBordercolor
=
"
#f0d437
"
;
break
;
}
}
}
}
// Après vérification, passage à la ligne suivante si possible
if
(
current_essai
<
nb_essais
-
1
)
{
current_essai
++
;
indice_case
=
0
;
}
else
{
// Fin de partie : désactiver l'interface ou lancer une animation de fin, etc.
// Par exemple, réinitialiser nb_essais ou afficher un message
}
else
{
// Fin de partie : vous pouvez désactiver l'interface ou afficher un message
mot
=
""
;
}
event
.
accepted
=
true
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment