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

Method createResetButton

tests/cpp-tests/Source/Box2DTest/Box2dTest.cpp:247–256  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245}
246
247void Box2DTest::createResetButton()
248{
249 auto reset = MenuItemImage::create("Images/r1.png", "Images/r2.png",
250 [&](Object* sender) { getTestSuite()->restartCurrTest(); });
251
252 auto menu = Menu::create(reset, nullptr);
253
254 menu->setPosition(VisibleRect::bottom().x, VisibleRect::bottom().y + 30);
255 this->addChild(menu, -1);
256}
257
258void Box2DTest::addNewSpriteAtPosition(Vec2 p)
259{

Callers 1

initMethod · 0.95

Calls 4

createFunction · 0.85
restartCurrTestMethod · 0.80
setPositionMethod · 0.45
addChildMethod · 0.45

Tested by

no test coverage detected