added functions that change the states instead of directly change the state completed

This commit is contained in:
Max 2018-12-01 21:05:09 +01:00
parent 623b28b045
commit 5ebc6048b0
3 changed files with 12 additions and 4 deletions

View file

@ -79,8 +79,7 @@ Page {
width: height width: height
text: "home" text: "home"
onClicked: { onClicked: {
game.state = "starting" game.start()
calculator.reset()
} }
} }

View file

@ -20,7 +20,7 @@ Page {
} }
onClicked: { onClicked: {
game.state = "calender" game.calender()
} }
} }
@ -38,7 +38,7 @@ Page {
} }
onClicked: { onClicked: {
game.state = "calculator" game.calculator()
} }
} }
} }

View file

@ -92,5 +92,14 @@ Window {
} }
} }
} }
function start() {
game.state = "starting"
}
function calender() {
game.state = "calender"
}
function calculator() {
game.state = "calculator"
}
} }
} }