Merge pull request #115266 from Nintorch/fix-joypad-editor-tooltips
Fix editor tooltips disappearing with joypad button presses
This commit is contained in:
+2
-12
@@ -316,24 +316,14 @@ bool Input::is_anything_pressed() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Input::is_anything_pressed_except_mouse() const {
|
||||
bool Input::is_any_key_pressed() 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;
|
||||
return !keys_pressed.is_empty();
|
||||
}
|
||||
|
||||
bool Input::is_key_pressed(Key p_keycode) const {
|
||||
|
||||
+1
-1
@@ -340,7 +340,7 @@ public:
|
||||
static Input *get_singleton();
|
||||
|
||||
bool is_anything_pressed() const;
|
||||
bool is_anything_pressed_except_mouse() const;
|
||||
bool is_any_key_pressed() const;
|
||||
bool is_key_pressed(Key p_keycode) const;
|
||||
bool is_physical_key_pressed(Key p_keycode) const;
|
||||
bool is_key_label_pressed(Key p_keycode) const;
|
||||
|
||||
@@ -4681,7 +4681,7 @@ void EditorHelpBitTooltip::_notification(int p_what) {
|
||||
if (Input::get_singleton()->is_action_just_pressed(SNAME("ui_cancel"), true)) {
|
||||
queue_free();
|
||||
get_parent_viewport()->set_input_as_handled();
|
||||
} else if (Input::get_singleton()->is_anything_pressed_except_mouse()) {
|
||||
} else if (Input::get_singleton()->is_any_key_pressed()) {
|
||||
queue_free();
|
||||
} else if (!Input::get_singleton()->get_mouse_button_mask().is_empty()) {
|
||||
if (!_is_mouse_inside_tooltip) {
|
||||
|
||||
Reference in New Issue
Block a user