Class CCLabelAtlas

#include <Geode/cocos/label_nodes/CCLabelAtlas.h>
classCCLabelAtlas:publiccocos2d::CCAtlasNode,publiccocos2d::CCLabelProtocol{ ... }

CCLabelAtlas is a subclass of CCAtlasNode. It can be as a replacement of CCLabel since it is MUCH faster. CCLabelAtlas versus CCLabel:

  • CCLabelAtlas is MUCH faster than CCLabel
  • CCLabelAtlas “characters” have a fixed height and width
  • CCLabelAtlas “characters” can be anything you want since they are taken from an image file A more flexible class is CCLabelBMFont. It supports variable width characters and it also has a nice editor.
Examples0
Public static methods2
staticcocos2d::CCLabelAtlas*create(,
charconst*charMapFile
,
uintitemWidth
,
uintitemHeight
,
uintstartCharMap
)

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

staticcocos2d::CCLabelAtlas*create(,
charconst*fntFile
)

Since v2.0

creates the CCLabelAtlas with a string and a configuration file

Public member functions6
boolinitWithString(,
charconst*charMapFile
,
uintitemWidth
,
uintitemHeight
,
uintstartCharMap
)

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

boolinitWithString(,
charconst*fntFile
)

Since v2.0

initializes the CCLabelAtlas with a string and a configuration file

boolinitWithString(,,
uintitemWidth
,
uintitemHeight
,
uintstartCharMap
)

initializes the CCLabelAtlas with a string, a texture, the width and height in points of each element and the starting char of the atlas

virtualvoidupdateAtlasValues()
No description provided
virtualvoidsetString()
No description provided
virtualcharconst*getString()
No description provided
Fields0
Protected member functions0
Protected fields2
gd::stringm_sString
;
No description provided
uintm_uMapStartChar
;
No description provided