mirror of https://github.com/axmolengine/axmol.git
Fixed #4566: Constructor added for LayerGradient
This commit is contained in:
parent
54e43a9da5
commit
63772f7d72
|
@ -630,6 +630,19 @@ std::string LayerColor::getDescription() const
|
||||||
//
|
//
|
||||||
// LayerGradient
|
// LayerGradient
|
||||||
//
|
//
|
||||||
|
LayerGradient::LayerGradient()
|
||||||
|
: _startColor(Color4B(0, 0, 0, 255))
|
||||||
|
, _endColor(Color4B(0, 0, 0, 255))
|
||||||
|
, _startOpacity(255)
|
||||||
|
, _endOpacity(255)
|
||||||
|
, _alongVector(Point(0, -1))
|
||||||
|
, _compressedInterpolation(true)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
LayerGradient::~LayerGradient() {
|
||||||
|
|
||||||
|
}
|
||||||
LayerGradient* LayerGradient::create(const Color4B& start, const Color4B& end)
|
LayerGradient* LayerGradient::create(const Color4B& start, const Color4B& end)
|
||||||
{
|
{
|
||||||
LayerGradient * layer = new LayerGradient();
|
LayerGradient * layer = new LayerGradient();
|
||||||
|
|
|
@ -392,6 +392,10 @@ public:
|
||||||
|
|
||||||
virtual std::string getDescription() const override;
|
virtual std::string getDescription() const override;
|
||||||
|
|
||||||
|
CC_CONSTRUCTOR_ACCESS:
|
||||||
|
LayerGradient();
|
||||||
|
virtual ~LayerGradient();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void updateColor() override;
|
virtual void updateColor() override;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue