static
Label * create(
const
std::string& text,
std::string& fontName,
float
fontSize,
Size& dimensions = Size::ZERO,TextHAlignment hAlignment = TextHAlignment::LEFT,
TextVAlignment vAlignment = TextVAlignment::TOP);
Label* createWithTTF(
TTFConfig& ttfConfig,TextHAlignment alignment = TextHAlignment::LEFT,monospace!important; font-weight:bold!important; font-size:1em!important; min-height:inherit!important; color:gray!important; background:none!important">int
lineWidth = 0);
Label* createWithBMFont(
std::string& bmfontFilePath,
TextHAlignment& alignment = TextHAlignment::LEFT,monospace!important; font-size:1em!important; min-height:inherit!important; color:black!important; background:none!important"> lineWidth = 0,
Point& imageOffset = Point::ZERO);
Label * createWithCharMap(
std::string& charMapFile,monospace!important; font-size:1em!important; min-height:inherit!important; color:black!important; background:none!important"> itemWidth,monospace!important; font-size:1em!important; min-height:inherit!important; color:black!important; background:none!important"> itemHeight,monospace!important; font-size:1em!important; min-height:inherit!important; color:black!important; background:none!important"> startCharMap);
virtual
void
enableShadow(
Color3B& shadowColor = Color3B::BLACK,monospace!important; font-size:1em!important; min-height:inherit!important; color:black!important; background:none!important"> Size &offset = Size(2,-2),monospace!important; font-size:1em!important; min-height:inherit!important; color:black!important; background:none!important"> opacity = 0.75f,monospace!important; font-size:1em!important; min-height:inherit!important; color:black!important; background:none!important"> blurRadius = 0);
enableOutline(
Color4B& outlineColor,monospace!important; font-size:1em!important; min-height:inherit!important; color:black!important; background:none!important"> outlineSize = -1);
enableGlow(
Color3B& glowColor);
disableEffect();
enum
class
LabelEffect {
NORMAL,
OUTLINE,0)!important; background:none!important">//文艺标签(有描边)
SHADOW,0)!important; background:none!important">//2B标签 (有阴影)
GLOW
};