axmol/extensions/fairygui/gears/GearSize.h

38 lines
687 B
C
Raw Normal View History

2020-08-04 12:31:33 +08:00
#ifndef __GEARSIZE_H__
#define __GEARSIZE_H__
#include "FairyGUIMacros.h"
#include "GearBase.h"
#include "cocos2d.h"
NS_FGUI_BEGIN
class GObject;
class GTweener;
class GearSize : public GearBase
{
public:
GearSize(GObject* owner);
virtual ~GearSize();
void apply() override;
void updateState() override;
void updateFromRelations(float dx, float dy) override;
protected:
void addStatus(const std::string& pageId, ByteBuffer* buffer) override;
void init() override;
private:
void onTweenUpdate(GTweener* tweener);
void onTweenComplete();
std::unordered_map<std::string, axis::Vec4> _storage;
axis::Vec4 _default;
2020-08-04 12:31:33 +08:00
};
NS_FGUI_END
#endif