1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-17 14:11:06 +00:00

InputEventJoypadMotion: Add missing is_pressed() method.

This commit is contained in:
Andreas Haas
2017-08-12 13:03:44 +02:00
parent 23f6d3fa69
commit 5052cb2b91
2 changed files with 6 additions and 0 deletions

View File

@@ -595,6 +595,11 @@ float InputEventJoypadMotion::get_axis_value() const {
return axis_value;
}
bool InputEventJoypadMotion::is_pressed() const {
return Math::abs(axis_value) > 0.5f;
}
bool InputEventJoypadMotion::action_match(const Ref<InputEvent> &p_event) const {
Ref<InputEventJoypadMotion> jm = p_event;