Remove some tooltip2 references

This commit is contained in:
2023-03-05 23:26:37 +01:00
parent 1521a67614
commit a19632eb27
4 changed files with 1 additions and 15 deletions

View File

@@ -10,6 +10,3 @@ export(String) var action2_text = ""
export(String) var action3_text = ""
# Action 3 tooltip text in inventory
export(String) var action4_text = ""
# The text for the tooltip of action2
export(String) var tooltip2_name

View File

@@ -84,9 +84,6 @@ var tooltip2_node: Object
func _ready():
if $tooltip_layer/tooltip.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")
func _enter_tree():
var room_selector_parent = $CanvasLayer/ui/HBoxContainer/VBoxContainer
@@ -228,12 +225,10 @@ func element_focused(element_id: String) -> void:
if target_obj is ESCItem or ESCItemWithTooltip:
$tooltip_layer/tooltip.set_target(target_obj.tooltip_name)
$tooltip_layer/tooltip.set_target_object(target_obj)
#$tooltip_layer/tooltip2.set_target(target_obj.tooltip2_name)
func element_unfocused() -> void:
$tooltip_layer/tooltip.set_target("")
$tooltip_layer/tooltip.set_target_object(null)
#$tooltip_layer/tooltip2.set_target("")
## ITEMS ##
@@ -252,7 +247,7 @@ func click_on_item(item_global_id: String, event: InputEvent, action: String) ->
true
)
if (action == ACTION1 && target_obj.tooltip_name != "") || (action == ACTION2 && target_obj is ESCItemWithTooltip && target_obj.tooltip2_name != ""):
if (action == ACTION1 && target_obj.action1_text != "") || (action == ACTION2 && target_obj is ESCItemWithTooltip && target_obj.action2_text != ""):
$tooltip_layer/tooltip.hide()
func left_click_on_item(item_global_id: String, event: InputEvent) -> void:

View File

@@ -109,7 +109,6 @@ tooltip_name = "This is action1"
combine_when_selected_action_is_in = [ ]
inventory_texture = ExtResource( 10 )
dialog_color = Color( 1, 1, 1, 1 )
tooltip2_name = "This is action2"
[node name="Art1" type="Sprite" parent="Hotspots/artwork1"]
position = Vector2( 470, 140 )

View File

@@ -69,7 +69,6 @@ combine_when_selected_action_is_in = [ ]
dialog_color = Color( 1, 1, 1, 1 )
action1_text = "Esto es una puerta y tiene una descripcion mu larga"
action2_text = "Entrar! con descricion..."
tooltip2_name = "Entrar! con descricion..."
animations = SubResource( 2 )
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Hotspots/entrada_cocina"]
@@ -94,7 +93,6 @@ action1_text = "Mirar bombona"
action2_text = "Coger bombona"
action3_text = "¿Cómo ha entrado en mi bolsillo?"
action4_text = "¿Por qué es una llave inglesa?"
tooltip2_name = "Coger bombona"
animations = null
[node name="bombona2" parent="Hotspots" instance=ExtResource( 27 )]
@@ -110,7 +108,6 @@ action1_text = "Mirar bombona"
action2_text = "Coger bombona"
action3_text = "Usar"
action4_text = "¿Por qué es un dibujo animado?"
tooltip2_name = "Mirar bombona"
animations = null
[node name="Columna" type="Sprite" parent="."]
@@ -125,7 +122,6 @@ tooltip_name = "Objervar sujeto"
dialog_color = Color( 0, 1, 0.462745, 1 )
action1_text = "Objervar sujeto"
action2_text = "Hablar"
tooltip2_name = "Hablar"
selectable = true
[node name="ESCLocation" type="Position2D" parent="EnekoSmoking"]
@@ -141,7 +137,6 @@ action1_text = "¿Que es esto?"
action2_text = "Coger"
action3_text = "Mirar dentro"
action4_text = "Usar"
tooltip2_name = "Coger"
[node name="ESCLocation" type="Position2D" parent="ESCItemWithTooltip"]
position = Vector2( -51, 69 )