MCPcopy Create free account
hub / github.com/axmolengine/axmol / enableUnderline

Method enableUnderline

core/2d/Label.cpp:1551–1568  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1549}
1550
1551void Label::enableUnderline()
1552{
1553 if (_underlineEnabled)
1554 {
1555 return;
1556 }
1557 _underlineEnabled = true;
1558 _contentDirty = true;
1559 if (!_lineDrawNode)
1560 {
1561 _lineDrawNode = DrawNode::create();
1562 _lineDrawNode->setGlobalZOrder(getGlobalZOrder());
1563 _lineDrawNode->setOpacity(_displayedOpacity);
1564 _lineDrawNode->properties.setFactor(_lineDrawNode->properties.getFactor() *
1565 2.0f); // 2.0f: Makes the line smaller
1566 addChild(_lineDrawNode, 100000);
1567 }
1568}
1569
1570void Label::enableStrikethrough()
1571{

Callers 10

formatTextMethod · 0.80
handleTextRendererMethod · 0.80
LabelUnderlineMethod · 0.80
LabelIssue15214Method · 0.80

Calls 4

createFunction · 0.85
getGlobalZOrderFunction · 0.85
setGlobalZOrderMethod · 0.45
setOpacityMethod · 0.45

Tested by 5

LabelUnderlineMethod · 0.64
LabelIssue15214Method · 0.64