rarity tags
This commit is contained in:
parent
b1a57b7290
commit
f92e1344fa
23 changed files with 56 additions and 2 deletions
|
|
@ -3,6 +3,8 @@ extends PanelContainer
|
|||
@export var tooltip_label : RichTextLabel
|
||||
@export var exdata_box : VBoxContainer
|
||||
@export var exdata_label : Label
|
||||
@export var rarity_label : Label
|
||||
@export var rarity_colors : Dictionary[String,Color]
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
|
|
@ -22,6 +24,13 @@ func show_tip(item : ItemData, extra : String = ""):
|
|||
tooltip_label.text += "\nSell Value: $"+str(floori(item.buy_value/float(2)))
|
||||
if item.botnet_power > 0:
|
||||
tooltip_label.text += "\n[color=orchid]Botnet Power: " + str(item.botnet_power) +"[/color]"
|
||||
if item.rarity != "":
|
||||
rarity_label.show()
|
||||
rarity_label.text = item.rarity
|
||||
if rarity_colors.has(item.rarity):
|
||||
rarity_label.self_modulate = rarity_colors.get(item.rarity)
|
||||
else:
|
||||
rarity_label.hide()
|
||||
if extra != "":
|
||||
exdata_box.show()
|
||||
exdata_label.text = extra
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue