46
by Robert Ancell
Add team score label |
1 |
/*
|
2 |
* Copyright (C) 2013 Robert Ancell <robert.ancell@gmail.com>
|
|
3 |
*
|
|
4 |
* This program is free software: you can redistribute it and/or modify it under
|
|
5 |
* the terms of the GNU General Public License as published by the Free Software
|
|
6 |
* Foundation, either version 3 of the License, or (at your option) any later
|
|
7 |
* version. See http://www.gnu.org/copyleft/gpl.html the full text of the
|
|
8 |
* license.
|
|
9 |
*/
|
|
10 |
||
11 |
import QtQuick 2.0 |
|
12 |
||
13 |
Text { |
|
14 |
id: label; |
|
15 |
color: "white"; |
|
16 |
font.family: "Ubuntu"; |
|
17 |
||
18 |
Behavior on opacity { |
|
19 |
NumberAnimation { |
|
20 |
duration: 300; |
|
21 |
easing.type: Easing.InOutCubic; |
|
22 |
}
|
|
23 |
}
|
|
24 |
Behavior on x { |
|
25 |
NumberAnimation { |
|
26 |
duration: 300; |
|
27 |
easing.type: Easing.InOutCubic; |
|
28 |
}
|
|
29 |
}
|
|
30 |
Behavior on y { |
|
31 |
NumberAnimation { |
|
32 |
duration: 300; |
|
33 |
easing.type: Easing.InOutCubic; |
|
34 |
}
|
|
35 |
}
|
|
36 |
Behavior on width { |
|
37 |
NumberAnimation { |
|
38 |
duration: 300; |
|
39 |
easing.type: Easing.InOutCubic; |
|
40 |
}
|
|
41 |
}
|
|
42 |
Behavior on height { |
|
43 |
NumberAnimation { |
|
44 |
duration: 300; |
|
45 |
easing.type: Easing.InOutCubic; |
|
46 |
}
|
|
47 |
}
|
|
48 |
Behavior on scale { |
|
49 |
NumberAnimation { |
|
50 |
duration: 300; |
|
51 |
easing.type: Easing.InOutCubic; |
|
52 |
}
|
|
53 |
}
|
|
54 |
||
55 |
SequentialAnimation { |
|
56 |
id: pulse_animation; |
|
57 |
ParallelAnimation { |
|
58 |
NumberAnimation { |
|
59 |
target: label; |
|
60 |
properties: "scale"; |
|
49
by Robert Ancell
Slow down score pulse animation |
61 |
duration: 200; |
46
by Robert Ancell
Add team score label |
62 |
to: 2; |
63 |
easing.type: Easing.InQuad; |
|
64 |
}
|
|
65 |
NumberAnimation { |
|
66 |
target: label; |
|
67 |
properties: "opacity"; |
|
49
by Robert Ancell
Slow down score pulse animation |
68 |
duration: 200; |
69 |
to: 1; |
|
46
by Robert Ancell
Add team score label |
70 |
easing.type: Easing.InQuad; |
71 |
}
|
|
72 |
}
|
|
73 |
ParallelAnimation { |
|
74 |
NumberAnimation { |
|
75 |
target: label; |
|
76 |
properties: "scale"; |
|
49
by Robert Ancell
Slow down score pulse animation |
77 |
duration: 200; |
46
by Robert Ancell
Add team score label |
78 |
to: 1; |
79 |
easing.type: Easing.OutQuad; |
|
80 |
}
|
|
81 |
NumberAnimation { |
|
82 |
target: label; |
|
83 |
properties: "opacity"; |
|
49
by Robert Ancell
Slow down score pulse animation |
84 |
duration: 200; |
85 |
to: 0.25; |
|
46
by Robert Ancell
Add team score label |
86 |
easing.type: Easing.OutQuad; |
87 |
}
|
|
55
by Robert Ancell
Remove trailing whitespace |
88 |
}
|
46
by Robert Ancell
Add team score label |
89 |
}
|
55
by Robert Ancell
Remove trailing whitespace |
90 |
|
46
by Robert Ancell
Add team score label |
91 |
function pulse () { |
92 |
pulse_animation.start (); |
|
93 |
}
|
|
94 |
}
|