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