Fixed a bug where bottle in magical closet room 9 had wrong interaction position.

This commit is contained in:
Julian Murgia
2021-02-26 21:31:50 +01:00
parent f743d1089c
commit b8f668df0a
25 changed files with 298 additions and 350 deletions

View File

@@ -29,9 +29,12 @@ Implement methods to react to inputs.
- show_ui()
- _on_event_done(event_name: String)
"""
func _ready():
ProjectSettings.set_setting("escoria/ui/tooltip_follows_mouse", true)
## BACKGROUND ##
func left_click_on_bg(position : Vector2) -> void:
@@ -54,7 +57,6 @@ func left_double_click_on_bg(position : Vector2) -> void:
func element_focused(element_id : String) -> void:
var target_obj = escoria.esc_runner.get_object(element_id)
$ui/tooltip_layer/tooltip.set_target(target_obj.tooltip_name)
$ui/tooltip_layer/tooltip.show()
if escoria.esc_runner.current_action != "use" && escoria.esc_runner.current_tool == null:
if target_obj is ESCItem:
@@ -62,7 +64,6 @@ func element_focused(element_id : String) -> void:
func element_unfocused() -> void:
$ui/tooltip_layer/tooltip.set_target("")
$ui/tooltip_layer/tooltip.hide()
## ITEMS ##

View File

@@ -1,7 +1,6 @@
extends ESCTooltip
func update_tooltip_text():
print("new color " + str(color))
bbcode_text = "[center]"
bbcode_text += "[color=#" + color.to_html(false) + "]"
bbcode_text += current_target