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

Method enableStrikethrough

core/2d/Label.cpp:1570–1587  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1568}
1569
1570void Label::enableStrikethrough()
1571{
1572 if (_strikethroughEnabled)
1573 {
1574 return;
1575 }
1576 _strikethroughEnabled = true;
1577 _contentDirty = true;
1578 if (!_lineDrawNode)
1579 {
1580 _lineDrawNode = DrawNode::create();
1581 _lineDrawNode->setGlobalZOrder(getGlobalZOrder());
1582 _lineDrawNode->setOpacity(_displayedOpacity);
1583 _lineDrawNode->properties.setFactor(_lineDrawNode->properties.getFactor() *
1584 2.0f); // 2.0f: Makes the line smaller
1585 addChild(_lineDrawNode, 100000);
1586 }
1587}
1588
1589void Label::disableEffect()
1590{

Calls 4

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