File: InitialMenu.qml

package info (click to toggle)
marble 4%3A16.08.3-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 76,596 kB
  • ctags: 22,881
  • sloc: cpp: 177,552; xml: 39,363; ansic: 7,204; python: 2,209; sh: 1,140; makefile: 230; perl: 222; ruby: 97; java: 66
file content (63 lines) | stat: -rw-r--r-- 1,437 bytes parent folder | download | duplicates (3)
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
//
// This file is part of the Marble Virtual Globe.
//
// This program is free software licensed under the GNU LGPL. You can
// find a copy of this license in LICENSE.txt in the top directory of
// the source code.
//
// Copyright 2015 Abhinav Gangwar <abhgang@gmail.com>
//


import QtQuick 2.0
import QtQuick.Controls 1.4


/*
* Provides two initial options
* "Browse Map" and "Play Game"
*/
Rectangle {
    property real partition: 1/4
    property real spacingFraction: 1/10

    signal gameMenuButtonClicked()
    signal browseButtonClicked()

    id: buttonArea
    objectName: "buttonArea"

    color: "#d3d7cf"

    Column {
        id: initialMenuLayout
        anchors.centerIn: buttonArea
        spacing: buttonArea.height*spacingFraction

        CustomButton {
            id: browseMapButton
            buttonWidth: buttonArea.width*4/5
            normalColor: "#114269"
            borderColor: "#000000"
            labelText: qsTr("Browse Map")
            labelColor: "white"

            onButtonClick: {
                browseMapButtonClicked();
            }
        }

        CustomButton {
            id: gameButton
            buttonWidth: buttonArea.width*4/5
            normalColor: "#114730"
            borderColor: "#000000"
            labelText: qsTr("Play Game")
            labelColor: "white"

            onButtonClick: {
                gameMenuButtonClicked();
            }
        }
    }
}