소스 검색

Modified the event_is_action_pressed() function within the window focus section since it was not using the event parameter.

BuildTools 1 년 전
부모
커밋
f3f2dad37e
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      tutorials/inputs/controllers_gamepads_joysticks.rst

+ 1 - 1
tutorials/inputs/controllers_gamepads_joysticks.rst

@@ -251,7 +251,7 @@ with the following script and use it to check all your inputs:
 
     func event_is_action_pressed(event: InputEvent, action: StringName) -> bool:
         if focused:
-            return Input.is_action_pressed(action)
+            return event.is_action_pressed(action)
 
         return false