Пример #1
0
bool InputEvent::is_action_pressed(const StringName &p_action) const {

	bool pressed;
	bool valid = InputMap::get_singleton()->event_get_action_status(Ref<InputEvent>((InputEvent *)this), p_action, &pressed);
	return valid && pressed && !is_echo();
}
Пример #2
0
bool InputEvent::is_action_pressed(const String& p_action) const {

	return is_action(p_action) && is_pressed() && !is_echo();
}