made one stateMachine in calculator

This commit is contained in:
Max 2018-11-30 20:58:24 +01:00
parent 5e5d8f954a
commit 534832f546
4 changed files with 10 additions and 6 deletions

View file

@ -42,7 +42,7 @@ Item {
name: "ending"
PropertyChanges {
target: calculatorStack
currPage: calculatorEndPageComp
currPage: calculatorGameOverPageComp
}
}
]
@ -74,9 +74,8 @@ Item {
}
Component {
id: calculatorEndPageComp
CalculatorEndPage {
id: calculatorEndPage
id: calculatorGameOverPageComp
CalculatorGameOverPage {
}
}
@ -142,4 +141,10 @@ Item {
calculator.endPageVisibility = true
}
}
function setState(state) {
if (state === "starting") {
}
calculator.state = state
}
}

View file

@ -36,7 +36,6 @@ Window {
PropertyChanges {
target: mainStack
currPage: calculatorPageComp
}
}
]

View file

@ -5,7 +5,7 @@
<file>StartPage.qml</file>
<file>CalculatorMainPage.qml</file>
<file>CalculatorStartPage.qml</file>
<file>CalculatorEndPage.qml</file>
<file>CalculatorGameOverPage.qml</file>
<file>Calculator.qml</file>
</qresource>
</RCC>