2026-01-10 23:40:52 +11:00
|
|
|
extends PanelContainer
|
|
|
|
|
|
2026-01-17 17:07:53 +11:00
|
|
|
@export var tooltip_label : RichTextLabel
|
2026-01-14 19:00:40 +11:00
|
|
|
@export var exdata_box : VBoxContainer
|
|
|
|
|
@export var exdata_label : Label
|
2026-01-23 16:12:01 +11:00
|
|
|
@export var rarity_label : Label
|
|
|
|
|
@export var rarity_colors : Dictionary[String,Color]
|
2026-01-10 23:40:52 +11:00
|
|
|
|
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
|
|
|
func _ready() -> void:
|
2026-01-11 16:05:12 +11:00
|
|
|
hide()
|
2026-01-10 23:40:52 +11:00
|
|
|
pass # Replace with function body.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
|
|
|
func _process(delta: float) -> void:
|
2026-01-11 11:31:35 +11:00
|
|
|
global_position = get_global_mouse_position() + Vector2(12,-6)
|
|
|
|
|
|
2026-01-17 17:07:53 +11:00
|
|
|
func show_tip(item : ItemData, extra : String = ""):
|
2026-01-17 18:06:34 +11:00
|
|
|
tooltip_label.text = item.item_name
|
2026-01-18 20:10:35 +11:00
|
|
|
if item.buy_value > 200:
|
|
|
|
|
tooltip_label.text += "\n[color=gold]Sell Value: $"+str(floori(item.buy_value/float(2))) + "[/color]"
|
|
|
|
|
elif item.buy_value > 0:
|
2026-01-17 18:06:34 +11:00
|
|
|
tooltip_label.text += "\nSell Value: $"+str(floori(item.buy_value/float(2)))
|
2026-01-17 17:07:53 +11:00
|
|
|
if item.botnet_power > 0:
|
|
|
|
|
tooltip_label.text += "\n[color=orchid]Botnet Power: " + str(item.botnet_power) +"[/color]"
|
2026-01-23 16:12:01 +11:00
|
|
|
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()
|
2026-01-14 19:00:40 +11:00
|
|
|
if extra != "":
|
|
|
|
|
exdata_box.show()
|
|
|
|
|
exdata_label.text = extra
|
|
|
|
|
else:
|
|
|
|
|
exdata_box.hide()
|
2026-01-11 16:05:12 +11:00
|
|
|
reset_size()
|
2026-01-11 11:31:35 +11:00
|
|
|
show()
|
|
|
|
|
|
|
|
|
|
func hide_tip():
|
|
|
|
|
hide()
|
|
|
|
|
pass
|