Bazaar and leaderboard bug fixes
This commit is contained in:
@@ -22,13 +22,13 @@ var _item: Dictionary = {}
|
||||
|
||||
func setup(item: Dictionary, fallback_art: String = "") -> void:
|
||||
_item = item
|
||||
|
||||
print(item)
|
||||
name_label.text = item.get("name", "—")
|
||||
|
||||
var desc: String = item.get("description", "")
|
||||
desc_label.text = desc
|
||||
desc_label.visible = not desc.is_empty()
|
||||
|
||||
|
||||
var sub := ""
|
||||
if item.has("totalSlots"):
|
||||
sub = "%d cards per pack" % int(item.get("totalSlots", 0))
|
||||
@@ -60,7 +60,13 @@ func setup(item: Dictionary, fallback_art: String = "") -> void:
|
||||
|
||||
buy_btn.pressed.connect(func(): buy_pressed.emit(_item))
|
||||
|
||||
_load_art(item.get("imageCdnUrl", item.get("previewImageCdnUrl", "")), fallback_art)
|
||||
var imageCdnUrl : Variant = item.get("imageCdnUrl")
|
||||
var previewImageCdnUrl : Variant = item.get("previewImageCdnUrl")
|
||||
if (imageCdnUrl == null):
|
||||
imageCdnUrl = fallback_art
|
||||
if (previewImageCdnUrl == null):
|
||||
previewImageCdnUrl = fallback_art
|
||||
_load_art(imageCdnUrl, previewImageCdnUrl)
|
||||
|
||||
# -- Marketplace listing setup -------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user