You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-05 17:15:09 +00:00
Added helper methods to InputEvent
This commit is contained in:
@@ -173,6 +173,16 @@ bool InputEvent::is_action(const String& p_action) const {
|
||||
return InputMap::get_singleton()->event_is_action(*this,p_action);
|
||||
}
|
||||
|
||||
bool InputEvent::is_action_pressed(const String& p_action) const {
|
||||
|
||||
return is_action(p_action) && is_pressed() && !is_echo();
|
||||
}
|
||||
|
||||
bool InputEvent::is_action_released(const String& p_action) const {
|
||||
|
||||
return is_action(p_action) && !is_pressed();
|
||||
}
|
||||
|
||||
uint32_t InputEventKey::get_scancode_with_modifiers() const {
|
||||
|
||||
uint32_t sc=scancode;
|
||||
|
||||
Reference in New Issue
Block a user