-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathImbuingDialog.qml
More file actions
766 lines (635 loc) · 25.5 KB
/
ImbuingDialog.qml
File metadata and controls
766 lines (635 loc) · 25.5 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import qmlcomponents
TibiaDialog {
id: imbueDialog
caption: qsTrId("imbuing_dialog_caption")
width: 740
property var imbuementIconSize: 66
property var controller: null
property var selectedImbuement: controller.selectedImbuement
property var existingImbuement: controller.existingImbuement
property bool editingExistingImbuement: existingImbuement != null
property bool updateFromControllerInProgress: false
property bool noActionAvailable: (existingImbuement == null) && (selectedImbuement == null)
property bool clientSettingSmoothFiltering: controller.clientSettingSmoothFiltering
onReturnPressedFunction: function () {}
onCancelPressedFunction: function () {
if (controller != null) {
controller.requestClose();
}
}
function imbuementSectionCaption() {
if (controller.imbueModeScroll) {
return qsTrId("imbuing_item_scroll_caption");
}
var selectedImbuement = controller.existingImbuement;
if (selectedImbuement != null) {
if (selectedImbuement.imbuementId != 0) {
return qsTrId("imbuing_item_existing_slot_caption");
}
}
return qsTrId("imbuing_item_empty_slot_caption");
}
function imbuementActionCaption() {
if (controller.imbueModeScroll) {
if ((selectedImbuement != null) && (selectedImbuement.imbuementId != 0)) {
return qsTrId("imbuing_action_scroll_caption").arg(selectedImbuement.name);
}
}
if (existingImbuement != null) {
if (existingImbuement.imbuementId != 0) {
return qsTrId("imbuing_item_clear_caption").arg(existingImbuement.name);
}
}
if (selectedImbuement != null) {
if ((selectedImbuement != null) && (selectedImbuement.imbuementId != 0)) {
return qsTrId("imbuing_action_empty_slot_caption").arg(selectedImbuement.name);
}
}
return "";
}
initialFocusItem: imbueDialog
KeyNavigation.tab: imbueDialog
ColumnLayout {
anchors {
left: parent.left
top: parent.top
right: parent.right
}
spacing: TibiaStyle.marginUnrelated
// Item selection section
TibiaFrame2PixelUpFilledWithCaption {
caption: qsTrId("imbuing_item_information_caption")
Layout.fillWidth: true
Layout.preferredHeight: itemInfoAndSlotLayout.height + marginsToContent + topMarginToContent
RowLayout {
id: itemInfoAndSlotLayout
anchors {
left: parent.left
right: parent.right
top: parent.top
}
anchors.margins: parent.marginsToContent
anchors.topMargin: parent.topMarginToContent
RowLayout {
id: itemSelectionButtons
Layout.alignment: Qt.AlignLeft
TibiaButton {
id: pickItemButton
Layout.preferredWidth: TibiaStyle.mapWindowPixelPerField * 3
Layout.preferredHeight: TibiaStyle.mapWindowPixelPerField * 2
imageSource: "/cursors/cursor-crosshair.png"
imageAnchor: "center"
imageXOffset: 4
imageYOffset: -4
text: qsTrId("imbuing_pick_item")
textFont: TibiaStyle.defaultTextFont
textVerticalAlignment: Text.AlignBottom
textBottomPadding: 4
onClicked: controller.handlePickItemToImbue()
}
TibiaButton {
id: pickScrollButton
// enabled: controller.scrollIsAvailable || !controller.isPremium
Layout.preferredWidth: TibiaStyle.mapWindowPixelPerField * 3
Layout.preferredHeight: TibiaStyle.mapWindowPixelPerField * 2
text: qsTrId("imbuing_pick_scroll")
textFont: TibiaStyle.defaultTextFont
textVerticalAlignment: Text.AlignBottom
textBottomPadding: 4
color: controller.isPremium ? "grey" : "blue"
onClicked: {
if (!controller.isPremium) {
controller.openPremiumStore();
} else {
controller.handleImbueScroll();
}
}
ScalableObjectDisplay {
anchors.centerIn: parent
anchors.verticalCenterOffset: -8
smoothTextureFiltering: imbueDialog.clientSettingSmoothFiltering
showBackground: false
animated: true
typeid: 51442
}
}
}
RowLayout {
id: imbuementSlotSection
Layout.alignment: Qt.AlignCenter
visible: controller.itemSelectionValid
TibiaText {
visible: (controller.selectedItemText != "")
text: controller.selectedItemText
}
ScalableObjectDisplay {
id: selectedItem
visible: controller.itemSelectionValid
Layout.preferredWidth: TibiaStyle.mapWindowPixelPerField * 3
Layout.preferredHeight: TibiaStyle.mapWindowPixelPerField * 2
scaleFactor: TibiaStyle.imbuingImbuedItemScaleFactor
smoothTextureFiltering: imbueDialog.clientSettingSmoothFiltering
showBackground: false
animated: true
typeid: controller.imbuedItemObjectID
upgradeTier: controller != null ? controller.imbuedItemObjectUpgradeTier : 0
}
TibiaText {
visible: controller.imbuementSlots.count > 0
text: qsTrId("imbuing_select_slot")
verticalAlignment: Text.AlignVCenter
}
Repeater {
model: controller.imbuementSlots
BorderImage {
property bool isSelected: controller.selectedImbuementSlotIndex == model.slotIndex
Layout.preferredWidth: imbuementIconSize
Layout.preferredHeight: imbuementIconSize
border {
left: 1
right: 1
top: 1
bottom: 1
}
source: isSelected ? "/images/1pixel-down-frame.png" : "/images/1pixel-up-frame.png"
horizontalTileMode: BorderImage.Repeat
verticalTileMode: BorderImage.Repeat
Image {
anchors.fill: parent
anchors.margins: 1
source: model.imageSource
}
MouseArea {
anchors.fill: parent
hoverEnabled: true
onClicked: {
if (model.category == qsTrId("imbuing_category_basic")) {
basicFilterButton.checked = true;
controller.handlePickFilterBasic();
}
if (model.category == qsTrId("imbuing_category_intricate")) {
intricateFilterButton.checked = true;
controller.handlePickFilterIntricate();
}
if (model.category == qsTrId("imbuing_category_powerful")) {
powerfulFilterButton.checked = true;
controller.handlePickFilterPowerful();
}
if (model.slotIndex != controller.selectedImbuementSlotIndex) {
controller.handleSelectImbuementSlot(model.slotIndex);
}
}
onEntered: {}
onExited: {
actionSectionHoverText.text = "";
}
}
}
}
}
}
}
// Imbuement section
TibiaFrame2PixelUpFilledWithCaption {
id: imbuementSelectionSection
caption: imbuementSectionCaption()
Layout.fillWidth: true
Layout.preferredHeight: topMarginToContent + emptySlotImbuementLayout.height + marginsToContent
ColumnLayout {
id: emptySlotImbuementLayout
visible: controller.itemSelectionValid
anchors {
left: parent.left
right: parent.right
top: parent.top
}
anchors.margins: parent.borderWidth + TibiaStyle.marginUnrelated
anchors.topMargin: parent.topMarginToContent
RowLayout {
id: categoryFilterSelection
visible: controller.imbueModeItem || controller.imbueModeScroll
spacing: TibiaStyle.marginUnrelated
Layout.alignment: Qt.AlignHCenter
ButtonGroup {
id: imbuementFilterGroup
exclusive: true
onClicked: function (button) {
if (!controller.isPremium) {
if (button.text == qsTrId("imbuing_category_intricate")) {
controller.openPremiumStore();
return;
}
if (button.text == qsTrId("imbuing_category_powerful")) {
controller.openPremiumStore();
return;
}
}
if (controller.imbuementFilter != button.text) {
controller.imbuementFilter = button.text;
}
}
}
TibiaButton {
id: basicFilterButton
imageSource: "/images/imbuing/icon-imbuementlevel-basic.png"
imageAnchor: "left"
text: qsTrId("imbuing_category_basic")
textFont: TibiaStyle.defaultTextFont
Layout.preferredWidth: TibiaStyle.premiumStateButtonWidth + 16
Layout.preferredHeight: TibiaStyle.premiumStateButtonHeight
ButtonGroup.group: imbuementFilterGroup
checked: controller.imbuementFilter == qsTrId("imbuing_category_basic")
checkable: true
visible: existingImbuement == null && !controller.imbueModeScroll
enabled: (existingImbuement == null)
}
TibiaButton {
id: intricateFilterButton
imageSource: "/images/imbuing/icon-imbuementlevel-intricate.png"
imageAnchor: "left"
text: qsTrId("imbuing_category_intricate")
textFont: TibiaStyle.defaultTextFont
Layout.preferredWidth: TibiaStyle.premiumStateButtonWidth + 16
Layout.preferredHeight: TibiaStyle.premiumStateButtonHeight
Image {
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenterOffset: (parent.pressed || parent.checked ? 1 : 0)
anchors.horizontalCenter: parent.horizontalCenter
anchors.horizontalCenterOffset: (parent.width / 2.6) + (parent.pressed || parent.checked ? 1 : 0)
source: controller.isPremium ? "/images/imbuing/imbuing-icon-premium.png" : "/images/imbuing/imbuing-icon-nopremium.png"
smooth: false
}
ButtonGroup.group: imbuementFilterGroup
checked: controller.imbuementFilter == qsTrId("imbuing_category_intricate")
checkable: true
visible: existingImbuement == null
enabled: existingImbuement == null
color: controller.isPremium ? "grey" : "blue"
}
TibiaButton {
id: powerfulFilterButton
imageSource: "/images/imbuing/icon-imbuementlevel-powerful.png"
imageAnchor: "left"
text: qsTrId("imbuing_category_powerful")
textFont: TibiaStyle.defaultTextFont
Layout.preferredWidth: TibiaStyle.premiumStateButtonWidth + 16
Layout.preferredHeight: TibiaStyle.premiumStateButtonHeight
Image {
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenterOffset: (parent.pressed || parent.checked ? 1 : 0)
anchors.horizontalCenter: parent.horizontalCenter
anchors.horizontalCenterOffset: (parent.width / 2.6) + (parent.pressed || parent.checked ? 1 : 0)
source: controller.isPremium ? "/images/imbuing/imbuing-icon-premium.png" : "/images/imbuing/imbuing-icon-nopremium.png"
smooth: false
}
ButtonGroup.group: imbuementFilterGroup
checked: controller.imbuementFilter == qsTrId("imbuing_category_powerful")
checkable: true
visible: existingImbuement == null
enabled: existingImbuement == null
color: controller.isPremium ? "grey" : "blue"
}
Item {
Layout.preferredHeight: TibiaStyle.premiumStateButtonHeight
visible: existingImbuement != null
}
}
GridView {
id: imbuementsGrid
model: controller.availableImbuements
Layout.alignment: Qt.AlignHCenter
Layout.preferredWidth: (imbuementIconSize + 4) * Math.min(controller.availableImbuements.rowCount(), 9)
Layout.preferredHeight: (imbuementIconSize + 4) * Math.ceil(controller.availableImbuements.rowCount() / 9)
interactive: false
cellWidth: imbuementIconSize + 4
cellHeight: imbuementIconSize + 4
delegate: BorderImage {
id: item
property bool checked: controller.selectedImbuementId == model.imbuementId
property bool isDisabled: (existingImbuement != null) && (existingImbuement.imbuementID != model.imbuementId)
width: imbuementIconSize
height: imbuementIconSize
border {
left: 1
right: 1
top: 1
bottom: 1
}
source: checked ? "/images/1pixel-down-frame.png" : "/images/1pixel-up-frame.png"
Image {
visible: model.imbuementId != 0
anchors.fill: parent
anchors.margins: 1
source: model.imageSource
}
MouseArea {
anchors.fill: parent
hoverEnabled: true
onClicked: {
if (!isDisabled) {
imbuementsGrid.currentIndex = index;
controller.handleSelectImbuement(model.imbuementId);
}
}
}
TibiaDisabledOverlay {
anchors.fill: parent
anchors.margins: 1
visible: isDisabled
}
Rectangle {
anchors.fill: parent
visible: !isDisabled && (controller.selectedImbuementId == model.imbuementId)
color: "transparent" // No fill, just the border
border.width: 1 // 1 'logical' pixel in QML
border.color: "white"
}
}
}
RowLayout {
id: imbuementInformation
spacing: TibiaStyle.marginUnrelated
Layout.fillWidth: true
TibiaText {
id: imbuementInformationText
Layout.fillWidth: true
verticalAlignment: Text.AlignTop
wrapMode: Text.Wrap
text: controller.selectedImbuement != null ? controller.selectedImbuement.description : ""
}
}
}
TibiaDisabledOverlay {
anchors.fill: parent
anchors.margins: 1
visible: !controller.itemSelectionValid
}
}
// Action section
TibiaFrame2PixelUpFilledWithCaption {
id: actionArea
caption: imbuementActionCaption()
Layout.fillWidth: true
Layout.preferredHeight: resourceInformation.height + actionSectionHoverTextLayout.height + TibiaStyle.marginUnrelated * 4
ColumnLayout {
anchors {
left: parent.left
right: parent.right
top: parent.top
}
anchors.margins: parent.borderWidth + TibiaStyle.marginUnrelated
anchors.topMargin: parent.captionHeight + TibiaStyle.marginUnrelated
RowLayout {
id: resourceInformation
visible: selectedImbuement != null || existingImbuement != null
Item {
id: resourcesContainer
Layout.preferredWidth: resourceLayout.width + TibiaStyle.marginRelated
Layout.preferredHeight: resourceLayout.height
visible: !editingExistingImbuement || controller.imbueModeScroll
RowLayout {
id: resourceLayout
Repeater {
model: selectedImbuement != null ? selectedImbuement.astralSources : []
ColumnLayout {
spacing: TibiaStyle.marginNarrow
BorderImage {
id: resourceBackground
Layout.preferredWidth: TibiaStyle.mapWindowPixelPerField * 2 + 2
Layout.preferredHeight: TibiaStyle.mapWindowPixelPerField * 2 + 2
source: "/images/backdrop-dark-grey.png"
horizontalTileMode: BorderImage.Repeat
verticalTileMode: BorderImage.Repeat
TibiaFrame1PixelDown {
anchors.fill: parent
SingleObjectAppearanceInstanceRenderer {
anchors.centerIn: parent
width: TibiaStyle.mapWindowPixelPerField * 2
height: TibiaStyle.mapWindowPixelPerField * 2
scaleFactor: TibiaStyle.imbuingAstralSourcesScaleFactor
smoothTextureFiltering: imbueDialog.clientSettingSmoothFiltering
animated: true
typeid: modelData.objectID
cumulativeCount: modelData.objectCount
liquidType: modelData.liquidType
hookDirection: modelData.hookDirection
decoItemObjectID: 0
}
}
MouseArea {
anchors.fill: parent
hoverEnabled: true
onEntered: {
actionSectionHoverText.text = modelData != null && modelData.resourceString.length > 0 ? (modelData.hasEnoughToImbue ? qsTrId("imbuing_time_resource_available_tooltip").arg(modelData.name) : qsTrId("imbuing_time_resource_unavailable_tooltip").arg(modelData.name)) : "";
}
onExited: {
actionSectionHoverText.text = "";
}
}
}
TibiaCurrencyView {
balance: modelData.resourceString
rightAligned: false
iconId: ""
Layout.preferredWidth: resourceBackground.width
tooLowBalance: !modelData.hasEnoughToImbue
}
}
}
}
}
Item {
Layout.fillWidth: true
Layout.preferredHeight: 1
visible: editingExistingImbuement
}
TibiaProgressBar {
id: timeLeftProgressBar
Layout.preferredHeight: TibiaStyle.progressBarLargeHeight
Layout.preferredWidth: Math.max(imbuementIconSize * 4 + TibiaStyle.marginRelated * 3 // Four 66x item slots plus padding in between
, resourcesContainer.width)
fillPercentage: existingImbuement != null ? existingImbuement.remainingDurationPercentage : 0
visible: editingExistingImbuement
frameSource: "/images/1pixel-down-frame.png"
backgroundSource: "/images/backdrop-dark-grey.png"
fillSource: "/images/progressbar-orange-large.png"
frameBorder {
left: 1
right: 1
top: 1
bottom: 1
}
fillOffset {
left: 1
right: 1
top: 1
bottom: 1
}
TibiaText {
anchors.centerIn: parent
text: existingImbuement != null ? existingImbuement.remainingDuration : ""
}
MouseArea {
anchors.fill: parent
hoverEnabled: true
onEntered: {
actionSectionHoverText.text = qsTrId("imbuing_time_remaining_tooltip");
}
onExited: {
actionSectionHoverText.text = "";
}
}
}
Item {
Layout.fillWidth: true
Layout.preferredHeight: 1
}
Image {
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
source: "/images/skin/classic/indicator-arrowright.png"
visible: !editingExistingImbuement
}
Item {
Layout.fillWidth: true
Layout.preferredHeight: 1
}
ColumnLayout {
id: imbueButtonLayout
spacing: TibiaStyle.marginNarrow
Layout.alignment: Qt.AlignRight
visible: !editingExistingImbuement
Item {
Layout.preferredWidth: 128
Layout.preferredHeight: imbuementIconSize
MouseArea {
id: imbueButtonHoverArea
property string text: qsTrId("imbuing_imbue_button_tooltip")
anchors.fill: parent
hoverEnabled: enabled
enabled: !imbueButton.enabled && imbueButtonLayout.visible
onEntered: {
actionSectionHoverText.text = text;
}
onExited: {
actionSectionHoverText.text = "";
}
}
TibiaButton {
id: imbueButton
property bool canPayGoldCost: !imbuementPriceView.tooLowBalance
property bool correctPremiumRequiredment: (selectedImbuement != null) && (controller.isPremium || !selectedImbuement.premiumOnly)
property bool correctAstralSources: (selectedImbuement != null) && selectedImbuement.enoughAstralSourcesForImbuement
anchors.fill: parent
imageSource: "/images/imbuing/imbuing-icon-imbue-active.png"
imageSourceDisabled: "/images/imbuing/imbuing-icon-imbue-disabled.png"
enabled: canPayGoldCost && correctPremiumRequiredment && correctAstralSources
onClicked: {
controller.requestImbue();
}
onHoveredChanged: {
actionSectionHoverText.text = hovered ? imbueButtonHoverArea.text : "";
}
}
}
TibiaCurrencyView {
id: imbuementPriceView
property int imbuementPrice: (selectedImbuement != null) ? selectedImbuement.goldCost : 0
property string imbuementPriceString: (selectedImbuement != null) ? selectedImbuement.goldCostString : ""
balance: imbuementPriceString
rightAligned: false
iconId: "GoldCoin"
tooLowBalance: imbuementPrice > storeAndResourceBalanceHelper.totalGoldBalance
Layout.preferredWidth: imbueButton.width
}
}
ColumnLayout {
id: clearButtonLayout
spacing: TibiaStyle.marginNarrow
Layout.alignment: Qt.AlignRight
visible: editingExistingImbuement
Item {
Layout.preferredWidth: 128
Layout.preferredHeight: imbuementIconSize
MouseArea {
id: clearButtonHoverArea
property string text: qsTrId("imbuing_clear_button_tooltip")
anchors.fill: parent
hoverEnabled: enabled
enabled: !clearButton.enabled && clearButtonLayout.visible
onEntered: {
actionSectionHoverText.text = text;
}
onExited: {
actionSectionHoverText.text = "";
}
}
TibiaButton {
id: clearButton
property bool canPayGoldCost: !clearPriceView.tooLowBalance
anchors.fill: parent
imageSource: "/images/imbuing/imbuing-icon-remove-active.png"
imageSourceDisabled: "/images/imbuing/imbuing-icon-remove-disabled.png"
enabled: canPayGoldCost
onClicked: {
if (controller != null) {
controller.requestClearImbuement();
}
}
onHoveredChanged: {
actionSectionHoverText.text = hovered ? clearButtonHoverArea.text : "";
}
}
}
TibiaCurrencyView {
id: clearPriceView
property int clearPrice: existingImbuement != null ? existingImbuement.clearingGoldCost : 0
property string clearPriceString: existingImbuement != null ? existingImbuement.clearingGoldCostString : ""
balance: clearPriceString
rightAligned: false
iconId: "GoldCoin"
tooLowBalance: clearPrice > storeAndResourceBalanceHelper.totalGoldBalance
Layout.preferredWidth: clearButton.width
}
}
}
RowLayout {
id: actionSectionHoverTextLayout
spacing: TibiaStyle.marginUnrelated
Layout.fillWidth: true
TibiaText {
id: actionSectionHoverText
Layout.fillWidth: true
text: ""
wrapMode: Text.Wrap
}
}
}
TibiaDisabledOverlay {
anchors.fill: parent
anchors.margins: 1
visible: selectedImbuement == null && existingImbuement == null
}
}
TibiaHorizontalSeparator {
Layout.fillWidth: true
}
RowLayout {
spacing: TibiaStyle.marginRelated
TibiaCurrentBalanceView {
Layout.preferredWidth: TibiaStyle.currencyViewWidth
balanceType: "GoldCoin"
}
Item {
Layout.fillWidth: true
height: 1
}
TibiaButton {
text: qsTrId("close")
onClicked: onCancelPressedFunction()
}
}
}
}