aboutsummaryrefslogtreecommitdiffstats
path: root/examples/bluetooth/heartrate_game/HeartRateGame/SplashScreen.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/bluetooth/heartrate_game/HeartRateGame/SplashScreen.qml')
-rw-r--r--examples/bluetooth/heartrate_game/HeartRateGame/SplashScreen.qml30
1 files changed, 30 insertions, 0 deletions
diff --git a/examples/bluetooth/heartrate_game/HeartRateGame/SplashScreen.qml b/examples/bluetooth/heartrate_game/HeartRateGame/SplashScreen.qml
new file mode 100644
index 000000000..2f9ac1b3f
--- /dev/null
+++ b/examples/bluetooth/heartrate_game/HeartRateGame/SplashScreen.qml
@@ -0,0 +1,30 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import HeartRateGame
+
+Item {
+ id: root
+
+ property bool appIsReady: false
+ property bool splashIsReady: false
+ property bool ready: appIsReady && splashIsReady
+
+ anchors.fill: parent
+
+ Image {
+ anchors.centerIn: parent
+ width: Math.min(parent.height, parent.width) * 0.6
+ height: GameSettings.heightForWidth(width, sourceSize)
+ source: "images/logo.png"
+ }
+
+ Timer {
+ id: splashTimer
+ interval: 1000
+ onTriggered: splashIsReady = true
+ }
+
+ Component.onCompleted: splashTimer.start()
+}