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

Method BugsTest

tests/cpp-tests/Source/MenuTest/MenuTest.cpp:458–470  ·  view source on GitHub ↗

BugsTest

Source from the content-addressed store, hash-verified

456
457// BugsTest
458BugsTest::BugsTest()
459{
460 auto issue1410 = MenuItemFont::create("Issue 1410", AX_CALLBACK_1(BugsTest::issue1410MenuCallback, this));
461 auto issue1410_2 = MenuItemFont::create("Issue 1410 #2", AX_CALLBACK_1(BugsTest::issue1410v2MenuCallback, this));
462 auto back = MenuItemFont::create("Back", AX_CALLBACK_1(BugsTest::backMenuCallback, this));
463
464 auto menu = Menu::create(issue1410, issue1410_2, back, nullptr);
465 addChild(menu);
466 menu->alignItemsVertically();
467
468 auto s = Director::getInstance()->getWinSize();
469 menu->setPosition(Vec2(s.width / 2, s.height / 2));
470}
471
472void BugsTest::issue1410MenuCallback(Object* sender)
473{

Callers

nothing calls this directly

Calls 5

createFunction · 0.85
getInstanceFunction · 0.85
alignItemsVerticallyMethod · 0.80
Vec2Function · 0.50
setPositionMethod · 0.45

Tested by

no test coverage detected