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

Method LabelIssue10688Test

tests/cpp-tests/Source/LabelTest/LabelTest.cpp:2482–2496  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2480}
2481
2482LabelIssue10688Test::LabelIssue10688Test()
2483{
2484 auto center = VisibleRect::center();
2485
2486 auto label = Label::createWithTTF("Glow MenuItemLabel", "fonts/arial.ttf", 30);
2487 label->setTextColor(Color4B::RED);
2488 label->enableGlow(Color4B::YELLOW);
2489 auto menuItem1 = MenuItemLabel::create(label, [](Object*) {});
2490 menuItem1->setAnchorPoint(Vec2::ANCHOR_MIDDLE_LEFT);
2491 menuItem1->setPosition(center.x - label->getContentSize().width / 2, center.y);
2492
2493 auto menu = Menu::create(menuItem1, NULL);
2494 menu->setPosition(Vec2::ZERO);
2495 this->addChild(menu);
2496}
2497
2498std::string LabelIssue10688Test::title() const
2499{

Callers

nothing calls this directly

Calls 7

createFunction · 0.85
setTextColorMethod · 0.45
enableGlowMethod · 0.45
setAnchorPointMethod · 0.45
setPositionMethod · 0.45
getContentSizeMethod · 0.45
addChildMethod · 0.45

Tested by

no test coverage detected