fix: correct JSON payload key for gacha pull RPC and update gacha panel UI labels

This commit is contained in:
2026-07-06 14:37:22 +08:00
parent af6870f6a9
commit acd927eef6
4 changed files with 15 additions and 5 deletions
+7
View File
@@ -12,6 +12,8 @@ signal closed
@onready var banner_label := %BannerLabel as Label
@onready var gold_label := %GoldLabel as Label
@onready var star_label := %StarLabel as Label
@onready var left_gold_label := %LeftGoldLabel as Label
@onready var left_star_label := %LeftStarLabel as Label
@onready var pity_label := %PityLabel as Label
@onready var pull_1_btn := %Pull1Btn as Button
@onready var pull_10_btn := %Pull10Btn as Button
@@ -142,6 +144,11 @@ func _refresh_ui() -> void:
star_label.text = str(UserProfileManager.wallet.get("star", 0))
gold_label.text = str(UserProfileManager.wallet.get("gold", 0))
if left_star_label:
left_star_label.text = str(UserProfileManager.wallet.get("star", 0))
if left_gold_label:
left_gold_label.text = str(UserProfileManager.wallet.get("gold", 0))
pity_label.text = "Pity: %d / %d" % [pity, pity_at]
cost_1_label.text = "%s %d" % [icon, c1]
cost_10_label.text = "%s %d" % [icon, c10]