Fix connecting a signal with a double click is too difficult

Co-authored-by: Danil Alexeev <dalexeev12@yandex.ru>
This commit is contained in:
Hilderin
2024-08-01 20:03:15 -04:00
committed by Danil Alexeev
parent 691d8bee2b
commit 4e19ab8afe
9 changed files with 147 additions and 98 deletions

View File

@ -308,6 +308,26 @@ bool Input::is_anything_pressed() const {
return false;
}
bool Input::is_anything_pressed_except_mouse() const {
_THREAD_SAFE_METHOD_
if (disable_input) {
return false;
}
if (!keys_pressed.is_empty() || !joy_buttons_pressed.is_empty()) {
return true;
}
for (const KeyValue<StringName, Input::ActionState> &E : action_states) {
if (E.value.cache.pressed) {
return true;
}
}
return false;
}
bool Input::is_key_pressed(Key p_keycode) const {
_THREAD_SAFE_METHOD_