summaryrefslogtreecommitdiff
path: root/scene/2d/screen_button.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d/screen_button.cpp')
-rw-r--r--scene/2d/screen_button.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/scene/2d/screen_button.cpp b/scene/2d/screen_button.cpp
index 3aacd7091a..20db63b66f 100644
--- a/scene/2d/screen_button.cpp
+++ b/scene/2d/screen_button.cpp
@@ -236,7 +236,7 @@ void TouchScreenButton::_input(const InputEvent& p_event) {
if (p_event.screen_touch.pressed) {
- if (!is_visible())
+ if (!is_visible_in_tree())
return;
if (finger_pressed!=-1)
@@ -307,8 +307,10 @@ Rect2 TouchScreenButton::get_item_rect() const {
if (texture.is_null())
return Rect2(0,0,1,1);
- //if (texture.is_null())
- // return CanvasItem::get_item_rect();
+ /*
+ if (texture.is_null())
+ return CanvasItem::get_item_rect();
+ */
return Rect2(Size2(),texture->get_size());
}