mirror of https://github.com/axmolengine/axmol.git
Improve progress timer (#375)
This commit is contained in:
parent
9705ef7f11
commit
382a12f181
|
@ -3,6 +3,7 @@ Copyright (c) 2010 Lam Pham
|
||||||
Copyright (c) 2010-2012 cocos2d-x.org
|
Copyright (c) 2010-2012 cocos2d-x.org
|
||||||
Copyright (c) 2013-2017 Chukong Technologies Inc
|
Copyright (c) 2013-2017 Chukong Technologies Inc
|
||||||
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
|
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
|
||||||
|
Copyright (c) 2021 Bytedance Inc.
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
@ -229,6 +230,14 @@ Vec2 ProgressTimer::vertexFromAlphaPoint(Vec2 alpha)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ProgressTimer::updateDisplayedOpacity(uint8_t parentOpacity)
|
||||||
|
{
|
||||||
|
Node::updateDisplayedOpacity(parentOpacity);
|
||||||
|
|
||||||
|
_sprite->updateDisplayedOpacity(_displayedOpacity);
|
||||||
|
updateProgress();
|
||||||
|
}
|
||||||
|
|
||||||
void ProgressTimer::updateColor()
|
void ProgressTimer::updateColor()
|
||||||
{
|
{
|
||||||
if (!_sprite)
|
if (!_sprite)
|
||||||
|
|
|
@ -3,6 +3,7 @@ Copyright (c) 2010 Lam Pham
|
||||||
Copyright (c) 2010-2012 cocos2d-x.org
|
Copyright (c) 2010-2012 cocos2d-x.org
|
||||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||||
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
|
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
|
||||||
|
Copyright (c) 2021 Bytedance Inc.
|
||||||
|
|
||||||
http://www.cocos2d-x.org
|
http://www.cocos2d-x.org
|
||||||
|
|
||||||
|
@ -176,7 +177,8 @@ protected:
|
||||||
void updateProgress();
|
void updateProgress();
|
||||||
void updateBar();
|
void updateBar();
|
||||||
void updateRadial();
|
void updateRadial();
|
||||||
virtual void updateColor() override;
|
void updateDisplayedOpacity(uint8_t parentOpacity) override;
|
||||||
|
void updateColor() override;
|
||||||
Vec2 boundaryTexCoord(char index);
|
Vec2 boundaryTexCoord(char index);
|
||||||
|
|
||||||
Type _type = Type::RADIAL;
|
Type _type = Type::RADIAL;
|
||||||
|
|
Loading…
Reference in New Issue