You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
712 B
22 lines
712 B
6 months ago
|
class_name DialogicNode_Input
|
||
|
extends Control
|
||
|
|
||
|
## A node that handles mouse input. This allows limiting mouse input to a
|
||
|
## specific region and avoiding conflicts with other UI elements.
|
||
|
## If no Input node is used, the input subsystem will handle mouse input instead.
|
||
|
|
||
|
func _ready():
|
||
|
add_to_group('dialogic_input')
|
||
|
gui_input.connect(_on_gui_input)
|
||
|
|
||
|
|
||
|
func _input(event: InputEvent) -> void:
|
||
|
if Input.is_action_pressed(ProjectSettings.get_setting('dialogic/text/input_action', 'dialogic_default_action')):
|
||
|
mouse_filter = Control.MOUSE_FILTER_STOP
|
||
|
else:
|
||
|
mouse_filter = Control.MOUSE_FILTER_IGNORE
|
||
|
|
||
|
|
||
|
func _on_gui_input(event:InputEvent) -> void:
|
||
|
DialogicUtil.autoload().Inputs.handle_node_gui_input(event)
|