axmol/extensions/fairygui/gears/GearColor.h

47 lines
864 B
C
Raw Normal View History

2020-08-04 12:31:33 +08:00
#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:
2022-08-08 18:02:17 +08:00
ax::Color3B color;
ax::Color3B outlineColor;
2020-08-04 12:31:33 +08:00
GearColorValue();
2022-08-08 18:02:17 +08:00
GearColorValue(const ax::Color3B& color, const ax::Color3B& outlineColor);
2020-08-04 12:31:33 +08:00
};
std::unordered_map<std::string, GearColorValue> _storage;
GearColorValue _default;
};
NS_FGUI_END
#endif