Fix TouchScreenButton error spam
(cherry picked from commit db19cc60fb
)
This commit is contained in:
parent
8235005c99
commit
73248ccf89
|
@ -187,7 +187,7 @@ String TouchScreenButton::get_action() const {
|
||||||
void TouchScreenButton::_input(const Ref<InputEvent> &p_event) {
|
void TouchScreenButton::_input(const Ref<InputEvent> &p_event) {
|
||||||
ERR_FAIL_COND(p_event.is_null());
|
ERR_FAIL_COND(p_event.is_null());
|
||||||
|
|
||||||
if (!get_tree()) {
|
if (!is_visible_in_tree()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -195,8 +195,6 @@ void TouchScreenButton::_input(const Ref<InputEvent> &p_event) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ERR_FAIL_COND(!is_visible_in_tree());
|
|
||||||
|
|
||||||
const InputEventScreenTouch *st = Object::cast_to<InputEventScreenTouch>(*p_event);
|
const InputEventScreenTouch *st = Object::cast_to<InputEventScreenTouch>(*p_event);
|
||||||
|
|
||||||
if (passby_press) {
|
if (passby_press) {
|
||||||
|
|
Loading…
Reference in New Issue