Changing this check:
if (rootView->isHidden())
to:
if (rootView->isHidden() || rootView->getAlpha() <= TouchView::sDefaultMinAlphaForTouches)
provides a suitable workaround for me for now, but uses the default min alpha rather than that view's specific setting. We also don't know at this point if the view being checked if a BaseView or TouchView so getMinAlphaForTouches() can't be called without a dynamic_cast/dynamic_pointer_cast check first, which may be slow?
@benjaminbojko and I found that views which are not set to hidden but have an alpha of 0 could still receive touches. The culprit is here: https://github.com/bluecadet/Cinder-BluecadetViews/blob/da01821eb50e04fc5ec9bb314a15f2ab367b1887/src/bluecadet/touch/TouchManager.cpp#L257
Changing this check:
if (rootView->isHidden())
to:if (rootView->isHidden() || rootView->getAlpha() <= TouchView::sDefaultMinAlphaForTouches)
provides a suitable workaround for me for now, but uses the default min alpha rather than that view's specific setting. We also don't know at this point if the view being checked if a
BaseView
orTouchView
sogetMinAlphaForTouches()
can't be called without adynamic_cast
/dynamic_pointer_cast
check first, which may be slow?