mirror of https://github.com/axmolengine/axmol.git
47 lines
872 B
C++
47 lines
872 B
C++
#ifndef __GEARCOLOR_H__
|
|
#define __GEARCOLOR_H__
|
|
|
|
#include "FairyGUIMacros.h"
|
|
#include "cocos2d.h"
|
|
#include "GearBase.h"
|
|
|
|
NS_FGUI_BEGIN
|
|
|
|
class GObject;
|
|
class GTweener;
|
|
|
|
class GearColor : public GearBase
|
|
{
|
|
public:
|
|
GearColor(GObject* owner);
|
|
virtual ~GearColor();
|
|
|
|
void apply() override;
|
|
void updateState() override;
|
|
|
|
protected:
|
|
void addStatus(const std::string& pageId, ByteBuffer* buffer) override;
|
|
void init() override;
|
|
|
|
private:
|
|
void onTweenUpdate(GTweener* tweener);
|
|
void onTweenComplete();
|
|
|
|
class GearColorValue
|
|
{
|
|
public:
|
|
axis::Color3B color;
|
|
axis::Color3B outlineColor;
|
|
|
|
GearColorValue();
|
|
GearColorValue(const axis::Color3B& color, const axis::Color3B& outlineColor);
|
|
};
|
|
|
|
std::unordered_map<std::string, GearColorValue> _storage;
|
|
GearColorValue _default;
|
|
};
|
|
|
|
NS_FGUI_END
|
|
|
|
#endif
|