Widgets not drawing when scrolling with ofxUIScrollableCanvas
chuckleplant opened this issue · 2 comments
chuckleplant commented
Buttons and whatnot disappear when still visible using the scrollable canvas. It can be solved by changing this line in ofxUIScrollableCanvas::draw()
:
if((*it)->isVisible() && (*it)->getRect()->rInside(*sRect))
to
if((*it)->isVisible() && (*it)->getRect()->rIntersects(*sRect))
Maybe this is by design though. In that case, I'd suggest to make this optional.
I understand it does not make sense to draw widgets outside their canvas boundaries, I find my suggestion useful when the canvas fills the screen vertically (for vertical scrolls).
Hope it helps!
rezaali commented
@chuckleplant hey this was by design, I'd added a function to set the scrollable canvas to show over flowing widgets if thats what you want. Just use setShowOverflow(true) on a scrollable canvas.
chuckleplant commented
Great thanks!