RustHacker/tooltip.gd

21 lines
460 B
GDScript3
Raw Normal View History

extends PanelContainer
@export var tooltip_label : Label
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
global_position = get_global_mouse_position() + Vector2(12,-6)
func show_tip(text : String):
tooltip_label.text = text
show()
func hide_tip():
hide()
pass