Class cc.LabelBMFont#ctor
- Defined in: CCLabelBMFont.js
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
cc.LabelBMFont#ctor(str, fntFile, width, alignment, imageOffset)
creates a bitmap font atlas with an initial string and the FNT file
|
Class Detail
cc.LabelBMFont#ctor(str, fntFile, width, alignment, imageOffset)
creates a bitmap font atlas with an initial string and the FNT file
// Example 01
var label1 = new cc.LabelBMFont("Test case", "test.fnt");
// Example 02
var label2 = new cc.LabelBMFont("test case", "test.fnt", 200, cc.TEXT_ALIGNMENT_LEFT);
// Example 03
var label3 = new cc.LabelBMFont("This is a \n test case", "test.fnt", 200, cc.TEXT_ALIGNMENT_LEFT, cc.p(0,0));
- Parameters:
- {String} str
- {String} fntFile
- {Number} width Optional, Default: -1
- {Number} alignment Optional, Default: cc.TEXT_ALIGNMENT_LEFT
- {cc.Point} imageOffset Optional, Default: cc.p(0,0)