Move Escoria settings load action out of init (#414)
InputMap actions added/removed at plugin enabled/disabled Some changes to README Co-authored-by: StraToN <StraToN@users.noreply.github.com>
This commit is contained in:
@@ -85,7 +85,8 @@ func _ready():
|
||||
func _input(event) -> void:
|
||||
if not escoria.current_state == escoria.GAME_STATE.DEFAULT:
|
||||
return
|
||||
if event.is_action_pressed("switch_action_verb"):
|
||||
if InputMap.has_action("switch_action_verb") \
|
||||
and event.is_action_pressed("switch_action_verb"):
|
||||
if event.button_index == BUTTON_WHEEL_UP:
|
||||
emit_signal("mouse_wheel_up")
|
||||
elif event.button_index == BUTTON_WHEEL_DOWN:
|
||||
|
||||
@@ -54,7 +54,8 @@ func _ready():
|
||||
#
|
||||
# - event: The event received
|
||||
func _on_inventory_item_gui_input(event: InputEvent):
|
||||
if event.is_action_pressed("switch_action_verb"):
|
||||
if InputMap.has_action("switch_action_verb") \
|
||||
and event.is_action_pressed("switch_action_verb"):
|
||||
if event.button_index == BUTTON_WHEEL_UP:
|
||||
escoria.inputs_manager._on_mousewheel_action(-1)
|
||||
elif event.button_index == BUTTON_WHEEL_DOWN:
|
||||
|
||||
Reference in New Issue
Block a user