challenge-editor/scene/trade_card_btn_spec.gd
2024-10-02 18:35:48 +08:00

14 lines
388 B
GDScript

extends ToolButton
const BAG_SIDE_CARD_INTRODUCTION = preload("res://scene/bag_side_card_introduction.tscn")
func _get_tooltip(at_position: Vector2) -> String:
return JSON.stringify(get_parent().data)
pass
func _make_custom_tooltip(for_text: String) -> Object:
var new_card=BAG_SIDE_CARD_INTRODUCTION.instantiate()
new_card.data=JSON.parse_string(for_text)
return new_card
pass