fray icon indicating copy to clipboard operation
fray copied to clipboard

FrayInput: is_just_released function uses input_state.ispressed signal instead of input_state.is_pressed

Open Lukaswbrr opened this issue 1 year ago • 0 comments

In the else statement, input_state uses ispressed instead of is_pressed, causing a error

func is_just_released(input: StringName, device: int = DEVICE_KBM_JOY1) -> bool:
	match _get_input_state(input, device):
		var input_state:
			if Engine.is_in_physics_frame():
				return (
					not input_state.is_pressed
					and input_state.physics_frame == Engine.get_physics_frames()
				)
			else:
				return (
					not input_state.ispressed
					and input_state.process_frame == Engine.get_process_frames()
				)
		null:
			return false

Lukaswbrr avatar Mar 18 '24 17:03 Lukaswbrr