Fix errors with tooltip2
This commit is contained in:
@@ -219,8 +219,10 @@ func left_double_click_on_bg(position: Vector2) -> void:
|
||||
|
||||
func element_focused(element_id: String) -> void:
|
||||
var target_obj = escoria.object_manager.get_object(element_id).node
|
||||
$tooltip_layer/tooltip.set_target(target_obj.tooltip_name)
|
||||
$tooltip_layer/tooltip2.set_target(target_obj.tooltip2_name)
|
||||
if target_obj is ESCItem:
|
||||
$tooltip_layer/tooltip.set_target(target_obj.tooltip_name)
|
||||
if target_obj is ESCItemWithTooltip:
|
||||
$tooltip_layer/tooltip2.set_target(target_obj.tooltip2_name)
|
||||
|
||||
func element_unfocused() -> void:
|
||||
$tooltip_layer/tooltip.set_target("")
|
||||
|
||||
@@ -12,6 +12,8 @@ export(int) var action1_x = 0
|
||||
# Action 1 Y
|
||||
export(int) var action1_y = 0
|
||||
|
||||
# The text for the tooltip of action2
|
||||
export(String) var tooltip2_name
|
||||
|
||||
#$tooltips.visible = true;
|
||||
var action1Tooltip: Object
|
||||
@@ -42,4 +44,3 @@ func _detect_labels() -> void:
|
||||
#c.set_text("AAAAAAA")
|
||||
tooltips.append(c)
|
||||
#tooltipsLayer = c
|
||||
|
||||
|
||||
@@ -319,6 +319,11 @@ _global_script_classes=[ {
|
||||
"language": "GDScript",
|
||||
"path": "res://addons/escoria-core/game/core-scripts/esc_item.gd"
|
||||
}, {
|
||||
"base": "ESCItem",
|
||||
"class": "ESCItemWithTooltip",
|
||||
"language": "GDScript",
|
||||
"path": "res://gymkhana/addons/escoria-ui-return-monkey-island/item.gd"
|
||||
}, {
|
||||
"base": "Position2D",
|
||||
"class": "ESCLocation",
|
||||
"language": "GDScript",
|
||||
@@ -747,6 +752,7 @@ _global_script_class_icons={
|
||||
"ESCInventoryItem": "",
|
||||
"ESCInventoryManager": "",
|
||||
"ESCItem": "res://addons/escoria-core/design/esc_item.svg",
|
||||
"ESCItemWithTooltip": "res://addons/escoria-core/design/esc_item.svg",
|
||||
"ESCLocation": "res://addons/escoria-core/design/esc_location.svg",
|
||||
"ESCMain": "",
|
||||
"ESCMigration": "",
|
||||
|
||||
Reference in New Issue
Block a user