Class cc.MenuItemAtlasFont
- Defined in: CCMenuItem.js
- Extends cc.MenuItemLabel
Constructor Attributes | Constructor Name and Description |
---|---|
Helper class that creates a MenuItemLabel class with a LabelAtlas
|
Method Summary
Class Detail
cc.MenuItemAtlasFont()
Helper class that creates a MenuItemLabel class with a LabelAtlas
Method Detail
-
<static> {cc.MenuItemAtlasFont} cc.MenuItemAtlasFont.create(value, charMapFile, itemWidth, itemHeight, startCharMap, callback, target)create menu item from string with font
// Example var item = cc.MenuItemAtlasFont.create('text to display', 'font.fnt', 12, 32, ' ') //OR var item = cc.MenuItemAtlasFont.create('text to display', 'font.fnt', 12, 32, ' ', game.run, game)
- Parameters:
- {String} value
- the text to display
- {String} charMapFile
- the character map file
- {Number} itemWidth
- {Number} itemHeight
- {String} startCharMap
- a single character
- {function|String|Null} callback Optional, Default: null
- {cc.Node|Null} target Optional
- Returns:
- {cc.MenuItemAtlasFont}
-
{Boolean} initWithString(value, charMapFile, itemWidth, itemHeight, startCharMap, callback, target)
- Parameters:
- {String} value
- {String} charMapFile
- {Number} itemWidth
- {Number} itemHeight
- {String} startCharMap
- a single character
- {function|String|Null} callback
- {cc.Node|Null} target
- Returns:
- {Boolean}