Skip to content

Commit

Permalink
fix: UI should now highlight proper verb instead of always going back…
Browse files Browse the repository at this point in the history
… to an item's default action
  • Loading branch information
BHSDuncan authored and StraToN committed Sep 14, 2022
1 parent e07c404 commit 62c2920
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions addons/escoria-ui-9verbs/game.gd
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,19 @@ 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
if escoria.action_manager.current_action != VERB_USE \
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)

Expand Down

0 comments on commit 62c2920

Please sign in to comment.