Warning, /education/marble/examples/cpp/marble-game/InitialMenu.qml is written in an unsupported language. File is not indexed.

0001 // SPDX-License-Identifier: LGPL-2.1-or-later
0002 //
0003 // SPDX-FileCopyrightText: 2015 Abhinav Gangwar <abhgang@gmail.com>
0004 //
0005 
0006 
0007 import QtQuick 2.0
0008 import QtQuick.Controls 1.4
0009 
0010 
0011 /*
0012 * Provides two initial options
0013 * "Browse Map" and "Play Game"
0014 */
0015 Rectangle {
0016     property real partition: 1/4
0017     property real spacingFraction: 1/10
0018 
0019     signal gameMenuButtonClicked()
0020     signal browseButtonClicked()
0021 
0022     id: buttonArea
0023     objectName: "buttonArea"
0024 
0025     color: "#d3d7cf"
0026 
0027     Column {
0028         id: initialMenuLayout
0029         anchors.centerIn: buttonArea
0030         spacing: buttonArea.height*spacingFraction
0031 
0032         CustomButton {
0033             id: browseMapButton
0034             buttonWidth: buttonArea.width*4/5
0035             normalColor: "#114269"
0036             borderColor: "#000000"
0037             labelText: qsTr("Browse Map")
0038             labelColor: "white"
0039 
0040             onButtonClick: {
0041                 browseMapButtonClicked();
0042             }
0043         }
0044 
0045         CustomButton {
0046             id: gameButton
0047             buttonWidth: buttonArea.width*4/5
0048             normalColor: "#114730"
0049             borderColor: "#000000"
0050             labelText: qsTr("Play Game")
0051             labelColor: "white"
0052 
0053             onButtonClick: {
0054                 gameMenuButtonClicked();
0055             }
0056         }
0057     }
0058 }