From 62c2920439a4a7cb23b30b3be321bcaa43f0c286 Mon Sep 17 00:00:00 2001 From: Duncan Brown Date: Tue, 13 Sep 2022 19:24:32 -0400 Subject: [PATCH] fix: UI should now highlight proper verb instead of always going back to an item's default action --- addons/escoria-ui-9verbs/game.gd | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/addons/escoria-ui-9verbs/game.gd b/addons/escoria-ui-9verbs/game.gd index f2777d8f..e3e9e47a 100644 --- a/addons/escoria-ui-9verbs/game.gd +++ b/addons/escoria-ui-9verbs/game.gd @@ -114,8 +114,7 @@ func element_focused(element_id: String) -> void: ESCActionManager.ACTION_INPUT_STATE.COMPLETED: return - ESCActionManager.ACTION_INPUT_STATE.AWAITING_VERB_OR_ITEM, \ - ESCActionManager.ACTION_INPUT_STATE.AWAITING_ITEM: + ESCActionManager.ACTION_INPUT_STATE.AWAITING_VERB_OR_ITEM: tooltip.set_target(target_obj.tooltip_name) # Hovering an ESCItem highlights its default action @@ -123,6 +122,11 @@ func element_focused(element_id: String) -> void: and target_obj is ESCItem: verbs_menu.set_by_name(target_obj.default_action) + ESCActionManager.ACTION_INPUT_STATE.AWAITING_ITEM: + tooltip.set_target(target_obj.tooltip_name) + + verbs_menu.set_by_name(escoria.action_manager.current_action) + ESCActionManager.ACTION_INPUT_STATE.AWAITING_TARGET_ITEM: tooltip.set_target2(target_obj.tooltip_name)