prueba tooltip wrapper
This commit is contained in:
3
gymkhana.tres
Normal file
3
gymkhana.tres
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[gd_resource type="Theme" format=2]
|
||||||
|
|
||||||
|
[resource]
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
extends HBoxContainer
|
||||||
|
|
||||||
|
|
||||||
|
# Declare member variables here. Examples:
|
||||||
|
# var a = 2
|
||||||
|
# var b = "text"
|
||||||
|
#func _ready():
|
||||||
|
#if $label.connect("tooltip_size_updated", self, "update_tooltip_following_mouse_position", [tooltip_node]) != 0:
|
||||||
|
# escoria.logger.error(self, "Error connecting tooltip_size_updated")
|
||||||
|
#if $tooltip_layer/tooltip2.connect("tooltip2_size_updated", self, "update_tooltip_following_mouse_position", [tooltip2_node]) != 0:
|
||||||
|
# escoria.logger.error(self, "Error connecting tooltip2_size_updated")
|
||||||
|
signal tooltip_size_updated
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
|
||||||
|
|
||||||
|
func set_target(target: String, needs_second_target: bool = false):
|
||||||
|
$label.set_target(target, needs_second_target)
|
||||||
|
|
||||||
|
|
||||||
|
func set_target2(target: String, needs_second_target: bool = false):
|
||||||
|
$label.set_target2(target, needs_second_target)
|
||||||
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
|
#func _process(delta):
|
||||||
|
# pass
|
||||||
|
func update_tooltip_text():
|
||||||
|
$label.update_tooltip_text()
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
[gd_scene load_steps=4 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://gymkhana/addons/escoria-ui-return-monkey-island/tooltip/target_tooltip.tscn" type="PackedScene" id=1]
|
||||||
|
[ext_resource path="res://gymkhana/addons/escoria-ui-return-monkey-island/tooltip/ESCTooltipWithIcon.gd" type="Script" id=2]
|
||||||
|
[ext_resource path="res://gymkhana/addons/escoria-ui-return-monkey-island/cursors/mouse_left.png" type="Texture" id=3]
|
||||||
|
|
||||||
|
[node name="tooltip" type="HBoxContainer"]
|
||||||
|
margin_right = 40.0
|
||||||
|
margin_bottom = 40.0
|
||||||
|
alignment = 1
|
||||||
|
script = ExtResource( 2 )
|
||||||
|
|
||||||
|
[node name="icon" type="TextureRect" parent="."]
|
||||||
|
margin_left = 10.0
|
||||||
|
margin_right = 26.0
|
||||||
|
margin_bottom = 40.0
|
||||||
|
texture = ExtResource( 3 )
|
||||||
|
|
||||||
|
[node name="label" parent="." instance=ExtResource( 1 )]
|
||||||
|
margin_left = 30.0
|
||||||
|
margin_right = 30.0
|
||||||
|
margin_bottom = 40.0
|
||||||
Reference in New Issue
Block a user