outline fix
This commit is contained in:
@@ -342,10 +342,8 @@ func has_actions(current_target_object):
|
||||
return false
|
||||
|
||||
func get_tooltip_from_current_target(verb,current_target_object):
|
||||
var tooltips = current_target_object.get('tooltips')
|
||||
if(tooltips.has(verb)):
|
||||
return tooltips.get(verb)
|
||||
return ""
|
||||
return gymkhana.tooltip_manager.getTooltip(current_target_object.global_id, verb)
|
||||
|
||||
func get_action_target_text(action_target_texts: Dictionary):
|
||||
var action_target_text = action_target_texts.get(escoria.action_manager.current_tool.global_id)
|
||||
return action_target_text if action_target_text else ""
|
||||
|
||||
@@ -2,26 +2,6 @@ tool
|
||||
extends ESCItem
|
||||
class_name ESCItemWithTooltip, "res://addons/escoria-core/design/esc_item.svg"
|
||||
|
||||
# Action 1 Label text
|
||||
export(String) var action1_text = ""
|
||||
|
||||
# Action 2 Label text
|
||||
export(String) var action2_text = ""
|
||||
|
||||
# Action 3 tooltip text if item in inventory
|
||||
export(String) var action3_text = ""
|
||||
|
||||
# Action 4 tooltip text if item in inventory
|
||||
export(String) var action4_text = ""
|
||||
|
||||
export(Dictionary) var tooltips = {}
|
||||
|
||||
# Action 3 tooltip texts if item is target. Dictionary with tool's global id as key.
|
||||
export(Dictionary) var action3_target_texts = {}
|
||||
|
||||
# Action 4 tooltip texts if item is target. Dictionary with tool's global id as key
|
||||
export(Dictionary) var action4_target_texts = {}
|
||||
|
||||
# If action used by player is in this list, this is a valid target (second item in combination)
|
||||
export(Array) var target_when_selected_action_is_in = []
|
||||
|
||||
@@ -33,10 +13,6 @@ func _ready():
|
||||
register_components()
|
||||
|
||||
|
||||
func set_tooltip(action: String, text: String):
|
||||
tooltips[action] = text
|
||||
|
||||
|
||||
func has_component(key: String)->bool:
|
||||
return components.has(key)
|
||||
|
||||
|
||||
@@ -355,7 +355,7 @@ func right_click_on_inventory_item(inventory_item_global_id: String, event: Inpu
|
||||
func inventory_item_focused(inventory_item_global_id: String) -> void:
|
||||
var target_obj = escoria.object_manager.get_object(inventory_item_global_id).node
|
||||
if target_obj is ESCItemWithTooltip:
|
||||
$tooltip_layer/tooltip.set_target(target_obj.action3_text)
|
||||
#$tooltip_layer/tooltip.set_target(target_obj.action3_text)
|
||||
$tooltip_layer/tooltip.set_target_object(target_obj)
|
||||
|
||||
|
||||
|
||||
@@ -897,7 +897,7 @@ _global_script_class_icons={
|
||||
"InventoryAddCommand": "",
|
||||
"InventoryRemoveCommand": "",
|
||||
"ItemCountAddCommand": "",
|
||||
"ItemOutline": "",
|
||||
"ItemOutline": "res://addons/escoria-core/design/esc_item.svg",
|
||||
"PlayLibSound": "",
|
||||
"PlaySndCommand": "",
|
||||
"PlayVideoCommand": "",
|
||||
|
||||
Reference in New Issue
Block a user