-
Notifications
You must be signed in to change notification settings - Fork 0
/
Info.qml
93 lines (72 loc) · 1.7 KB
/
Info.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
import QtQuick 2.0
import QtGraphicalEffects 1.0
Item {
id:window_container
property string message: "level:"
property int played: 0
states: [
State {
name: "Hide"
PropertyChanges {
target: window_container
y:parent.height * 1.2
}
},
State {
name:"Show"
PropertyChanges {
target: window_container
y:parent.height /2 - (window_container.height /2)
}
}
]
transitions: [
Transition {
from: "Hide"
to: "Show"
reversible: true
NumberAnimation {
target: window_container
property: "y"
duration: 400
easing.type: Easing.InOutQuad
}
}
]
onStateChanged: if(state == "Show") { message = "level:"+gameBoard1.level,starttext.running = true}
Timer {
id:starttext
running:false
repeat:false
interval: 2000
onTriggered:message = "start",hide.running = true
}
Timer {
id:hide
running:false
repeat:false
interval:400
onTriggered: window_container.state = "Hide",played = 1
}
Rectangle {
id:backing
anchors.fill: parent
color:"black"
opacity:0.5
radius:8
}
Glow {
radius:8
samples:17
source:backing
anchors.fill:backing
opacity:0.5
}
Text {
anchors.centerIn: parent
font.family: pixeltext.name
font.pixelSize: parent.height * 0.28
text:message
color:"White"
}
}