add tooltips and fix stuff
This commit is contained in:
21
core/tooltips/tooltip.gd
Normal file
21
core/tooltips/tooltip.gd
Normal file
@@ -0,0 +1,21 @@
|
||||
@tool
|
||||
extends HBoxContainer
|
||||
|
||||
@export var image: Texture:
|
||||
set(value):
|
||||
image = value
|
||||
if is_inside_tree() and has_node("%Texture"):
|
||||
$%Texture.texture = image
|
||||
|
||||
@export var text: String:
|
||||
set(value):
|
||||
text = value
|
||||
if is_inside_tree() and has_node("%Label"):
|
||||
$%Label.text = text
|
||||
|
||||
|
||||
func _ready():
|
||||
if image != null and has_node("%Texture"):
|
||||
$%Texture.texture = image
|
||||
if is_inside_tree() and has_node("%Label"):
|
||||
$%Label.text = text
|
||||
Reference in New Issue
Block a user