~josephjamesmills/+junk/americanFootball_api_stuff

« back to all changes in this revision

Viewing changes to MenuView.qml

  • Committer: Joseph Mills
  • Date: 2013-12-15 15:25:28 UTC
  • Revision ID: josephjamesmills@gmail.com-20131215152528-vke40bcaabivhpm9
for dude to pull stuff out

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import QtQuick 2.0
 
2
import "Models"
 
3
Rectangle {
 
4
    width: item.width
 
5
    height:parent.height
 
6
    color: "black"
 
7
    ListView{
 
8
        id: menuView
 
9
        width: parent.width
 
10
        height:parent.height
 
11
        boundsBehavior: Flickable.StopAtBounds
 
12
        spacing: 2
 
13
        snapMode: ListView.SnapToItem
 
14
        keyNavigationWraps: true
 
15
        cacheBuffer: 1000
 
16
        model: MenuModel{}
 
17
        delegate:Item {
 
18
            id: item
 
19
            width: root.width / 2.2
 
20
            height: root.height / 6
 
21
            Rectangle{
 
22
                id:button
 
23
                width: item.width
 
24
                height: item.height
 
25
                gradient: Gradient{
 
26
                    GradientStop{position: 0.1; color: "#55170bac"}
 
27
                    GradientStop{position: 0.5; color: "transparent"}
 
28
                    GradientStop{position: 0.9; color: "#55170bac"}
 
29
                }
 
30
                border{
 
31
                    width: 4
 
32
                    color: "#12FFFFFF"
 
33
                }
 
34
                MouseArea{
 
35
                  anchors.fill: button
 
36
                  onClicked:{
 
37
                      mainMenu.state = "Hidden"
 
38
                      mainLoader.source  = loaderSource
 
39
                  }
 
40
                }
 
41
                Text {
 
42
                    text: name;
 
43
                    styleColor: "#938181"
 
44
                    horizontalAlignment: Text.AlignLeft;
 
45
                    style: Text.Raised;
 
46
                    font.italic: true;
 
47
                    font.family: "Arial Black";
 
48
                    color: "white"
 
49
                    anchors{
 
50
                        left: parent.left
 
51
                        leftMargin: parent.width / 20
 
52
                        verticalCenter: parent.verticalCenter
 
53
                    }
 
54
                        font{
 
55
                        pixelSize: parent.height / 2
 
56
                    }
 
57
                    onTextChanged: {
 
58
                        sc.start()
 
59
                    }
 
60
                }
 
61
            }
 
62
            NumberAnimation{
 
63
                id: sc;
 
64
                target: button;
 
65
                property: "opacity";
 
66
                from: 0
 
67
                to: 1;
 
68
                duration: 1600;
 
69
                easing.type: Easing.OutSine
 
70
            }
 
71
        }
 
72
    }
 
73
}