mirror of https://github.com/axmolengine/axmol.git
Scrollbar visibility fix for when auto hide is disabled (#1067)
* Fix for scrollbar visibility when auto-hide is disabled * Set the default opacity to 255 when the scrollbar auto hide is disabled since _opacity is unknown
This commit is contained in:
parent
76b8747874
commit
f3930a15f4
|
@ -151,13 +151,18 @@ void ScrollViewBar::setWidth(float width)
|
|||
|
||||
void ScrollViewBar::setAutoHideEnabled(bool autoHideEnabled)
|
||||
{
|
||||
if (_autoHideEnabled == autoHideEnabled)
|
||||
return;
|
||||
|
||||
_autoHideEnabled = autoHideEnabled;
|
||||
if (!_autoHideEnabled && !_touching && _autoHideRemainingTime <= 0)
|
||||
if (!_autoHideEnabled)
|
||||
{
|
||||
ProtectedNode::setOpacity(_opacity);
|
||||
ProtectedNode::setOpacity(255);
|
||||
}
|
||||
else
|
||||
else if (!_touching && _autoHideRemainingTime <= 0)
|
||||
{
|
||||
ProtectedNode::setOpacity(0);
|
||||
}
|
||||
}
|
||||
|
||||
float ScrollViewBar::getWidth() const
|
||||
|
|
Loading…
Reference in New Issue