2020-08-04 12:31:33 +08:00
|
|
|
#ifndef __PACKAGEITEM_H__
|
|
|
|
#define __PACKAGEITEM_H__
|
|
|
|
|
|
|
|
#include "FairyGUIMacros.h"
|
|
|
|
#include "cocos2d.h"
|
|
|
|
|
|
|
|
NS_FGUI_BEGIN
|
|
|
|
|
|
|
|
class UIPackage;
|
|
|
|
class UIObjectFactory;
|
|
|
|
class GComponent;
|
|
|
|
class BitmapFont;
|
|
|
|
class PixelHitTestData;
|
|
|
|
class ByteBuffer;
|
|
|
|
|
2022-07-11 17:50:21 +08:00
|
|
|
class PackageItem : public axis::Ref
|
2020-08-04 12:31:33 +08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
PackageItem();
|
|
|
|
virtual ~PackageItem();
|
|
|
|
|
|
|
|
void load();
|
|
|
|
PackageItem* getBranch();
|
|
|
|
PackageItem* getHighResolution();
|
|
|
|
|
|
|
|
public:
|
|
|
|
UIPackage* owner;
|
|
|
|
|
|
|
|
PackageItemType type;
|
|
|
|
ObjectType objectType;
|
|
|
|
std::string id;
|
|
|
|
std::string name;
|
|
|
|
int width;
|
|
|
|
int height;
|
|
|
|
std::string file;
|
|
|
|
ByteBuffer* rawData;
|
|
|
|
std::vector<std::string>* branches;
|
|
|
|
std::vector<std::string>* highResolution;
|
|
|
|
|
|
|
|
//atlas
|
2022-07-11 17:50:21 +08:00
|
|
|
axis::Texture2D* texture;
|
2020-08-04 12:31:33 +08:00
|
|
|
|
|
|
|
//image
|
2022-07-11 17:50:21 +08:00
|
|
|
axis::Rect* scale9Grid;
|
2020-08-04 12:31:33 +08:00
|
|
|
bool scaleByTile;
|
|
|
|
int tileGridIndice;
|
2022-07-11 17:50:21 +08:00
|
|
|
axis::SpriteFrame* spriteFrame;
|
2020-08-04 12:31:33 +08:00
|
|
|
PixelHitTestData* pixelHitTestData;
|
|
|
|
|
|
|
|
//movieclip
|
2022-07-11 17:50:21 +08:00
|
|
|
axis::Animation* animation;
|
2020-08-04 12:31:33 +08:00
|
|
|
float delayPerUnit;
|
|
|
|
float repeatDelay;
|
|
|
|
bool swing;
|
|
|
|
|
|
|
|
//component
|
|
|
|
std::function<GComponent*()> extensionCreator;
|
|
|
|
bool translated;
|
|
|
|
|
|
|
|
//font
|
|
|
|
BitmapFont* bitmapFont;
|
|
|
|
|
|
|
|
//skeleton
|
2022-07-11 17:50:21 +08:00
|
|
|
axis::Vec2* skeletonAnchor;
|
2020-08-04 12:31:33 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
NS_FGUI_END
|
|
|
|
|
|
|
|
#endif
|