-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGameMetaInfo.qml
38 lines (36 loc) · 1.33 KB
/
GameMetaInfo.qml
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
import QtQuick 2.8
import QtQuick.Layouts 1.11
import QtGraphicalEffects 1.12
import "utils.js" as Utils // some helper functions
Rectangle {
id: root
property var game
// border.color: 'red'
// border.width: vpx(5)
Rectangle {
id: metadataRect1
anchors {
top: parent.top
left: parent.left
horizontalCenter: parent.horizontalCenter
}
width: parent.width
height: parent.height
color: "transparent"
RowLayout {
id: metadataRow1
anchors{
left: parent.left
}
spacing: vpx(10)
MetaBox { metaTitle: 'PLAYERS'; metaContent: game.players }
MetaBox { metaTitle: 'RATING'; metaContent: (game.rating == "") ? "N/A" : Math.round(game.rating * 100) + '%'}
MetaBox { metaTitle: 'RELEASED'; metaContent: ( Utils.formatDate(game.release) || "N/A" ) }
MetaBox { metaTitle: 'GENRE'; metaContent: ( game.genreList[0] || "N/A" ) }
MetaBox { metaTitle: 'DEVELOPER'; metaContent: ( game.developerList[0] || "N/A" ) }
MetaBox { metaTitle: 'PUBLISHER'; metaContent: ( game.publisherList[0] || "N/A" ) }
MetaBox { metaTitle: 'LAST PLAYED'; metaContent: Utils.formatLastPlayed(game.lastPlayed) }
MetaBox { metaTitle: 'TIME PLAYED'; metaContent: Utils.formatPlayTime(game.playTime) }
}
}
}