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: