From e46d153604b912c03e5251acb43ebd0f485841ea Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Sun, 8 Dec 2024 14:02:04 +0100 Subject: [PATCH] Add game timer --- qml/Main.qml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/qml/Main.qml b/qml/Main.qml index 7c22d20..a07c34b 100644 --- a/qml/Main.qml +++ b/qml/Main.qml @@ -50,10 +50,19 @@ ApplicationWindow { property real cardHeight: Math.min((app.height - Math.min(app.height * 0.08, 50)) / (maxCardsPerColumn * 0.2 + 2.65), (app.width / 8.05) * 1.4) property real cardWidth: cardHeight / 1.4 + Timer { + id: gameTimer + interval: 1000 + running: true + repeat: true + onTriggered: scoreBar.time += 1 + } + ScoreBar { id: scoreBar moves: GameState.moveAmount + time: 0 height: Math.max(parent.height * 0.08, 50) anchors.top: parent.top