Procházet zdrojové kódy

Merge pull request #71159 from EricEzaM/minor-input-configuration-fixes

Propagate allowed input types to `event_listener` when setting them on `InputEventConfigurationDialog`
Rémi Verschelde před 2 roky
rodič
revize
9af4628bbe

+ 2 - 2
editor/event_listener_line_edit.cpp

@@ -168,8 +168,8 @@ void EventListenerLineEdit::clear_event() {
 	}
 }
 
-void EventListenerLineEdit::set_allowed_input_types(int input_types) {
-	allowed_input_types = input_types;
+void EventListenerLineEdit::set_allowed_input_types(int p_type_masks) {
+	allowed_input_types = p_type_masks;
 }
 
 int EventListenerLineEdit::get_allowed_input_types() const {

+ 1 - 1
editor/event_listener_line_edit.h

@@ -67,7 +67,7 @@ public:
 	Ref<InputEvent> get_event() const;
 	void clear_event();
 
-	void set_allowed_input_types(int input_types);
+	void set_allowed_input_types(int p_type_masks);
 	int get_allowed_input_types() const;
 
 	void grab_focus();

+ 1 - 0
editor/input_event_configuration_dialog.cpp

@@ -515,6 +515,7 @@ Ref<InputEvent> InputEventConfigurationDialog::get_event() const {
 
 void InputEventConfigurationDialog::set_allowed_input_types(int p_type_masks) {
 	allowed_input_types = p_type_masks;
+	event_listener->set_allowed_input_types(p_type_masks);
 }
 
 InputEventConfigurationDialog::InputEventConfigurationDialog() {