浏览代码

Allow shortcut input to be JoypadButton.

EricEzaM 2 年之前
父节点
当前提交
2a7e61457a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scene/main/viewport.cpp

+ 1 - 1
scene/main/viewport.cpp

@@ -2799,7 +2799,7 @@ void Viewport::push_unhandled_input(const Ref<InputEvent> &p_event, bool p_local
 	}
 
 	// Shortcut Input.
-	if (Object::cast_to<InputEventKey>(*ev) != nullptr || Object::cast_to<InputEventShortcut>(*ev) != nullptr) {
+	if (Object::cast_to<InputEventKey>(*ev) != nullptr || Object::cast_to<InputEventShortcut>(*ev) != nullptr || Object::cast_to<InputEventJoypadButton>(*ev) != nullptr) {
 		get_tree()->_call_input_pause(shortcut_input_group, SceneTree::CALL_INPUT_TYPE_SHORTCUT_INPUT, ev, this);
 	}