made one stateMachine in calculator
This commit is contained in:
parent
5e5d8f954a
commit
534832f546
4 changed files with 10 additions and 6 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
1
main.qml
1
main.qml
|
@ -36,7 +36,6 @@ Window {
|
|||
PropertyChanges {
|
||||
target: mainStack
|
||||
currPage: calculatorPageComp
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
2
qml.qrc
2
qml.qrc
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue