mirror of https://github.com/axmolengine/axmol.git
35 lines
1.3 KiB
Plaintext
35 lines
1.3 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();
|
||
|
|
||
|
|
||
|
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();
|
||
|
CCTexture2D* getTexture(void);
|
||
|
void setTexture(CCTexture2D *texture);
|
||
|
};
|
||
|
}// namespace cocos2d
|
||
|
|