//
// GameToolbox::addBackButton from 0x580aec to 0x580c08 (284 bytes)
//
// 24 xrefs:
// > CreatorLayer::init @ 0x6ccc40
// > LevelSearchLayer::init @ 0x6d2d54
// > LevelInfoLayer::init @ 0x6dce2c
// > EditLevelLayer::init @ 0x6e14a0
// > LevelBrowserLayer::init @ 0x6eb44c
// > GJGarageLayer::init @ 0x79a228
// > LevelSelectLayer::init @ 0x79e460
// > GJDropDownLayer::init @ 0x7c6930
// > LeaderboardsLayer::init @ 0x81f2e0
// > SecretLayer::init @ 0x906464
// > GauntletSelectLayer::init @ 0x91ce94
// > GauntletLayer::init @ 0x91f944
// > GJShopLayer::init @ 0x92e358
// > SecretLayer2::init @ 0x942e00
// > SecretLayer3::init @ 0x945c84
// > SecretLayer4::init @ 0x94b0f4
// > WorldSelectLayer::init @ 0x96181c
// > LevelAreaLayer::init @ 0xa301e8
// > LevelAreaInnerLayer::init @ 0xa310d0
// > SecretRewardsLayer::init @ 0xa63dd4
// > LevelListLayer::init @ 0xa77300
// > SecretLayer5::init @ 0xa96844
// > SecretLayer6::init @ 0xa97194
// > ??> @ 0x3a8c0
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void GameToolbox::addBackButton(cocos2d::CCLayer *a1, cocos2d::CCMenuItem *a2)
{
cocos2d::CCSprite *v4; // x20
cocos2d::CCNode *v5; // x26
const cocos2d::CCPoint *v6; // x0
void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x22
_BYTE v8[8]; // [xsp+60h] [xbp+60h] BYREF
cocos2d::CCPoint v9; // [xsp+68h] [xbp+68h] BYREF
cocos2d::CCPoint v10; // [xsp+70h] [xbp+70h] BYREF
v4 = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_B_001.png");
a1->addChild(a1, v4);
v5 = a2->getParent(a2);
v6 = a2->getPosition(a2);
cocos2d::CCNode::convertToWorldSpace(v5, v6);
cocos2d::CCNode::convertToNodeSpace(a1, &v10);
setPosition = v4->setPosition;
cocos2d::CCPoint::CCPoint(&v9, 28.0, 10.0);
cocos2d::CCPoint::operator+(&v10, v8, &v9);
setPosition(v4, &v10);
v4->setScale(v4, 0.7);
}