-
Notifications
You must be signed in to change notification settings - Fork 1
/
Menu.qml
48 lines (39 loc) · 1.05 KB
/
Menu.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
import QtQuick 1.0
Rectangle{
id: menu
color: "transparent"
Rectangle{
id: crazyButton
anchors.horizontalCenter: menu.horizontalCenter
anchors.top: menu.top
anchors.topMargin: 100
width: 200; height: 50
color: "black"
Text{
id: buttText
text: "TurnBanana!!"
color: "yellow"
anchors.horizontalCenter: crazyButton.horizontalCenter
anchors.verticalCenter: crazyButton.verticalCenter
font.pointSize: 10; font.bold: true
}
MouseArea{
id: buttArea
anchors.fill: parent
}
states: State {
name: "pressed"; when: buttArea.pressed == true
PropertyChanges { target: crazyButton; color: "pink" }
}
}
Image{
source:"images/Banana.png"
id:banana
anchors.bottom: menu.bottom
anchors.bottomMargin: 30
anchors.horizontalCenter: menu.horizontalCenter
width:250
height:290
RotationAnimation on rotation{ running: buttArea.pressed; paused: buttArea.released; alwaysRunToEnd: false; loops: Animation.Infinite; duration: 800; to: banana.rotation+360}
}
}