-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConfiguredBossSlot.qml
More file actions
137 lines (112 loc) · 3.79 KB
/
ConfiguredBossSlot.qml
File metadata and controls
137 lines (112 loc) · 3.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
import QtQuick
import QtQuick.Effects
import QtQuick.Layouts
import qmlcomponents
TibiaFrame2PixelUpFilledWithCaption {
id: borderPanel
property int selectedRaceID: 0
property int numberOfKills: 0
property int numberOfKillsForProwess: 0
property int numberOfKillsForExpertise: 0
property int numberOfKillsForMastery: 0
property int currentLootBonus: 0
property string priceForReset: "0"
property string bossRaritySource: ""
property string bossRarityTooltip: ""
property var controller: null
property var bossName: ""
property int slotNumber: 0
property bool isInBoostedSlot: false
property var playerGold: 0
property int resetPriceNumber: 0
caption: qsTrId("bosstiary_caption_configured_slot").arg(slotNumber).arg(bossName)
ColumnLayout {
spacing: TibiaStyle.marginRelated
anchors { left: parent.left; leftMargin: parent.marginsToContent;
right: parent.right; rightMargin: parent.marginsToContent;
bottom: parent.bottom; bottomMargin: parent.marginsToContent;
top: parent.top; topMargin: parent.topMarginToContent }
Item {
Layout.fillWidth: true
Layout.preferredHeight: iconImage.height + monsterOutfit.height
Image {
id: iconImage
source: bossRaritySource
smooth: false
anchors { right: monsterOutfit.left; rightMargin: TibiaStyle.marginUnrelated;
top: monsterOutfit.top; }
Tooltip {
anchors.fill: parent
text: bossRarityTooltip
}
} // Image
RaceAppearanceInstanceRenderer {
id: monsterOutfit
width: 64
height: 64
anchors.centerIn: parent
raceID: selectedRaceID
isUnknown: false
} // RaceAppearanceInstanceRenderer
MultiEffect {
height: monsterOutfit.height
width: height
anchors.centerIn: parent
brightness: isInBoostedSlot ? -0.5 : 0.0
source: monsterOutfit
} // MultiEffect
} // Item
Item {
Layout.preferredHeight: 9
Layout.fillWidth: true
}
BosstiaryUnlockProgress {
kills: numberOfKills
killsForProwess: numberOfKillsForProwess
killsForExpertise: numberOfKillsForExpertise
killsForMastery: numberOfKillsForMastery
preferredProgressBarWidth: selectButton.width
Layout.preferredWidth: borderPanel.width
} // BosstiaryUnlockProgress
Item {
Layout.preferredHeight: 10
Layout.fillWidth: true
}
TibiaText {
text: isInBoostedSlot ? qsTrId("bosstiary_configured_slot_boosted") : qsTrId("bosstiary_configured_slot_lootbonus_text").arg(currentLootBonus)
Layout.fillWidth: true
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.Wrap
} // TibiaText
Item {
Layout.fillHeight: true
Layout.fillWidth: true
}
Item {
Layout.alignment: Qt.AlignHCenter
Layout.preferredWidth: selectButton.width
Layout.preferredHeight: selectButton.height
TibiaButton {
id: selectButton
text: qsTrId("bosstiary_configured_slot_clear_button")
enabled: ((playerGold >= resetPriceNumber) ? true : false)
visible: true
width: TibiaStyle.buttonWidthWidest
anchors.centerIn: parent
onClicked: { controller.onClearClicked(slotNumber); }
} //TibiaButton
Tooltip {
anchors.fill: parent
text: qsTrId("bosstiary_configured_slot_clear_button_tooltip").arg(priceForReset)
} // Tooltip
} // Item
TibiaCurrencyView {
Layout.preferredWidth: selectButton.width
implicitWidth: NaN
price: priceForReset
iconId: "GoldCoin"
Layout.alignment: Qt.AlignHCenter
tooLowBalance: playerGold < resetPriceNumber
} //TibiaCurrencyView
} // ColumnLayout
} // TibiaFrame2PixelUpFilledWithCaption