Touch cannot traverse OPAQUE windows (2nd attempt)
This commit is contained in:
+2
-1
@@ -61,7 +61,8 @@ bool MenuBody::onTouchEnd(coord_t x, coord_t y)
|
||||
{
|
||||
int index = y / MENUS_LINE_HEIGHT;
|
||||
lines[index].onPress();
|
||||
return false; // = close the menu (inverted so that click outside the menu closes it)
|
||||
getParent()->getParent()->deleteLater();
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
+1
-1
@@ -341,7 +341,7 @@ bool Window::onTouchEnd(coord_t x, coord_t y)
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
return windowFlags & OPAQUE;
|
||||
}
|
||||
|
||||
bool Window::onTouchSlide(coord_t x, coord_t y, coord_t startX, coord_t startY, coord_t slideX, coord_t slideY)
|
||||
|
||||
+1
-1
@@ -297,7 +297,7 @@ class Window {
|
||||
|
||||
void fullPaint(BitmapBuffer * dc);
|
||||
|
||||
bool pointInRect(coord_t x, coord_t y, rect_t & rect)
|
||||
static bool pointInRect(coord_t x, coord_t y, rect_t & rect)
|
||||
{
|
||||
return (x >= rect.x && x < rect.x + rect.w && y >= rect.y && y < rect.y + rect.h);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user