-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathBosstiaryUnlockProgress.qml
More file actions
93 lines (81 loc) · 2.79 KB
/
Copy pathBosstiaryUnlockProgress.qml
File metadata and controls
93 lines (81 loc) · 2.79 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
import QtQuick
import QtQuick.Layouts
import qmlcomponents
ColumnLayout {
id: root
property int kills: 0
property int killsForProwess: 0
property int killsForExpertise: 0
property int killsForMastery: 0
property int preferredProgressBarWidth: 0
property bool showTotalKillsCaption: true
spacing: TibiaStyle.marginNarrow
TibiaText {
visible: root.showTotalKillsCaption
Layout.alignment: Qt.AlignHCenter
Layout.bottomMargin: TibiaStyle.marginNarrow
text: qsTrId("bosstiary_total_kills")
} // TibiaText
CreatureUnlockProgress {
Layout.fillWidth: (preferredProgressBarWidth > 0 ? false : true)
Layout.preferredWidth: (preferredProgressBarWidth > 0 ? preferredProgressBarWidth : -1)
Layout.alignment: Qt.AlignHCenter
Layout.preferredHeight: TibiaStyle.progressBarSmallHeight
currentKills: kills
killsToUnlockDetails1: killsForProwess
killsToUnlockDetails2: killsForExpertise
killsToFullUnlock: killsForMastery
} // CreatureUnlockProgress
RowLayout {
Layout.fillWidth: (preferredProgressBarWidth > 0 ? false : true)
Layout.preferredWidth: (preferredProgressBarWidth > 0 ? preferredProgressBarWidth : -1)
Layout.alignment: Qt.AlignHCenter
spacing: 0
Item {
Layout.preferredWidth: parent.width / 3
Layout.preferredHeight: childrenRect.height
readonly property string prowessUnlockImageSource: kills >= killsForProwess ? "/images/icon-star-bronze.png" : "/images/icon-star-dark.png"
Image {
anchors.horizontalCenter: parent.horizontalCenter
source: parent.prowessUnlockImageSource
} // Image
} // Item
RowLayout {
Layout.preferredWidth: parent.width / 3
spacing: TibiaStyle.marginNarrow
readonly property string expertiseUnlockImageSource: kills >= killsForExpertise ? "/images/icon-star-silver.png" : "/images/icon-star-dark.png"
Item {
Layout.fillWidth: true
} // Item
Image {
source: parent.expertiseUnlockImageSource
} // Image
Image {
source: parent.expertiseUnlockImageSource
} // Image
Item {
Layout.fillWidth: true
} // Item
} // RowLayout
RowLayout {
Layout.preferredWidth: parent.width / 3
spacing: TibiaStyle.marginNarrow
readonly property string masteryUnlockImageSource: kills >= killsForMastery ? "/images/icon-star-gold.png" : "/images/icon-star-dark.png"
Item {
Layout.fillWidth: true
} // Item
Image {
source: parent.masteryUnlockImageSource
} // Image
Image {
source: parent.masteryUnlockImageSource
} // Image
Image {
source: parent.masteryUnlockImageSource
} // Image
Item {
Layout.fillWidth: true
} // Item
} // RowLayout
} // RowLayout
} // ColumnLayout