prevent issues when ui button is pressed but no label is looked at
This commit is contained in:
parent
4baa16794c
commit
edc1603fe5
|
|
@ -176,21 +176,10 @@ func _input(event:InputEvent):
|
|||
elif Input.is_action_just_pressed("zoom_out_mouse"):
|
||||
zoomed = false
|
||||
|
||||
|
||||
#FIXME remove this if it has been determined that this kind of reveal all is no longer planned.
|
||||
#else:
|
||||
#State.free_focus()
|
||||
#get_tree().call_group("interactables", "reveal")
|
||||
if event.is_action_pressed("collect_memento_ui") or event.is_action_pressed("option_memento_ui"):
|
||||
focus_ray.get_collider().handle(event)
|
||||
get_viewport().set_input_as_handled()
|
||||
#FIXME this code jeets focxus back to the player, but I think it may be an anti-pattern.
|
||||
#else:
|
||||
# if event is InputEventMouseButton:
|
||||
# if event.button_index == MOUSE_BUTTON_RIGHT and event.pressed:
|
||||
# if !Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT):
|
||||
# State.take_stage(self, true)
|
||||
# get_tree().call_group("interactables", "collapse")
|
||||
if focus_ray.is_colliding():
|
||||
focus_ray.get_collider().handle(event)
|
||||
get_viewport().set_input_as_handled()
|
||||
|
||||
func play_scene(id: int, _repeat):
|
||||
if id == Scenes.id.YOUTH_DRAEVEN:
|
||||
|
|
|
|||
Loading…
Reference in New Issue