adds a lot holy crap i forgot to commit

This commit is contained in:
2025-04-28 18:14:41 -04:00
parent a496bb3982
commit c684a00f3a
11 changed files with 113 additions and 27 deletions

View File

@ -0,0 +1,14 @@
extends TextureRect
func _set_tip_image(_card_info: Dictionary, card_image: Image) -> void:
card_image.resize(int(size.x / 1.75), int(size.y), Image.INTERPOLATE_LANCZOS)
var tex = ImageTexture.new()
tex.set_image(card_image)
texture = tex
func _clear_tip_image() -> void:
texture = null
func _ready() -> void:
EventBus.connect("card_on_hover", _set_tip_image)
EventBus.connect("card_on_unhover", _clear_tip_image)

View File

@ -0,0 +1 @@
uid://cpvbftm0swoa6

View File

@ -0,0 +1,12 @@
extends RichTextLabel
func _set_tip_text(card_info: Dictionary, _card_image: Image) -> void:
text = card_info["name"] + " | " + card_info["type"] + "\n"
text += card_info["desc"]
func _clear_tip_text() -> void:
text = ""
func _ready() -> void:
EventBus.connect("card_on_hover", _set_tip_text)
EventBus.connect("card_on_unhover", _clear_tip_text)

View File

@ -0,0 +1 @@
uid://b8tioen4n1rip