axmol/tools/tolua++/CCLabelAtlas.pkg

37 lines
1.4 KiB
Plaintext

#include "CCAtlasNode.h"
namespace cocos2d{
class CCLabelAtlas : public CCAtlasNode, public CCLabelProtocol
{
public:
CCLabelAtlas();
/** creates the CCLabelAtlas with a string, a char map file(the atlas), the width and height of each element and the starting char of the atlas */
static CCLabelAtlas * labelWithString(const char *label, const char *charMapFile, int itemWidth, int itemHeight, char startCharMap);
/** initializes the CCLabelAtlas with a string, a char map file(the atlas), the width and height of each element and the starting char of the atlas */
bool initWithString(const char *label, const char *charMapFile, int itemWidth, int itemHeight, char startCharMap);
// super methods
void updateAtlasValues();
void setString(const char *label);
const char* getString(void);
void draw();
CCLabelProtocol* convertToLabelProtocol();
static CCAtlasNode * atlasWithTileFile(const char* tile,int tileWidth, int tileHeight, int itemsToRender);
/** initializes an CCAtlasNode with an Atlas file the width and height of each item and the quantity of items to render*/
bool initWithTileFile(const char* tile, int tileWidth, int tileHeight, int itemsToRender);
void updateAtlasValues();
void draw();
CCRGBAProtocol* convertToRGBAProtocol();
CCTexture2D* getTexture(void);
void setTexture(CCTexture2D *texture);
};
}// namespace cocos2d