added functions that change the states instead of directly change the state completed
This commit is contained in:
parent
623b28b045
commit
5ebc6048b0
3 changed files with 12 additions and 4 deletions
|
@ -79,8 +79,7 @@ Page {
|
|||
width: height
|
||||
text: "home"
|
||||
onClicked: {
|
||||
game.state = "starting"
|
||||
calculator.reset()
|
||||
game.start()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ Page {
|
|||
}
|
||||
|
||||
onClicked: {
|
||||
game.state = "calender"
|
||||
game.calender()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ Page {
|
|||
}
|
||||
|
||||
onClicked: {
|
||||
game.state = "calculator"
|
||||
game.calculator()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
9
main.qml
9
main.qml
|
@ -92,5 +92,14 @@ Window {
|
|||
}
|
||||
}
|
||||
}
|
||||
function start() {
|
||||
game.state = "starting"
|
||||
}
|
||||
function calender() {
|
||||
game.state = "calender"
|
||||
}
|
||||
function calculator() {
|
||||
game.state = "calculator"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue