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

Update Main.qml

parent f8ad2a73
No related branches found
No related tags found
No related merge requests found
......@@ -4,38 +4,50 @@ import QtQuick
Window {
visible: true
width: 400
height: 500
height: 600
title: qsTr("Application 2048")
Text {
text: "Fusionnez les nombres pour atteindre 2048!"
font.bold: true
color:"grey"
anchors.horizontalCenter: parent.horizontalCenter
y:145
}
Rectangle{
width:100;height:100
color:"orange"
x:25
y:10
radius:10
radius:4
Text {
text:"2048"
color: "white"
font.bold: true
font.pixelSize: 30
anchors.centerIn: parent
}
}
Rectangle{
color:"black"
width: 90; height: 50
color:"grey"
width: 90; height: 90
x:270
y:10
radius:10
radius:5
Text{
text: "meilleur score"
color:"white"
text: "MEILLEUR"
color:"lightgrey"
font.pixelSize: 14
font.bold: true
anchors.horizontalCenter: parent.horizontalCenter
y:5
y:10
}
......@@ -44,9 +56,39 @@ Window {
text:"0"
color:"white"
font.bold: true
font.pixelSize: 20
font.pixelSize: 25
anchors.centerIn:parent
}
}
Rectangle{
color:"grey"
width: 90; height: 90
x:165
y:10
radius:5
Text{
text: "SCORE"
color:"lightgrey"
font.pixelSize: 14
font.bold: true
anchors.horizontalCenter: parent.horizontalCenter
y:20
y:10
}
Text{
id: score
text:"0"
color:"white"
font.bold: true
font.pixelSize: 25
anchors.centerIn:parent
}
}
......@@ -54,10 +96,10 @@ Window {
Rectangle {
id: buttonNew
color:"#F65E3B"
width: 90; height: 40
x:160
y:65
radius:10
width: 90; height: 30
x:165
y:105
radius:5
Text{
id: buttonLabel
......@@ -79,10 +121,10 @@ Window {
Rectangle {
id: undo
color: "#F65E3B"
width: 90; height: 40
width: 90; height: 30
x:270
y:65
radius:10
y:105
radius:5
Text{
......@@ -105,8 +147,8 @@ Window {
Rectangle{
width:350; height:350
anchors.horizontalCenter: parent.horizontalCenter
y:120
color:"brown"
y:170
color:"grey"
radius: 10
......@@ -115,16 +157,17 @@ Window {
columns: 4
rows: 4
anchors.centerIn: parent
spacing: 5
spacing: 8
padding:8
Repeater {
model: 16
Rectangle {
width: 80
height: 80
width: 78
height: 78
color: "lightgrey"
border.color: "black"
radius:10
Text {
anchors.centerIn: parent
......@@ -136,6 +179,9 @@ Window {
}
Item{
id: keyHandler
focus: true
Keys.onPressed: {
if (event.key === Qt.Key_Left) gameManager.moveLeft();
......@@ -146,3 +192,6 @@ Window {
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment