//
// CCMenuItemToggler::create from 0x2e6cbc to 0x2e6d5c (160 bytes)
//
// 39 xrefs:
// > GameToolbox::createToggleButton @ 0x2ec010
// > LevelCell::loadFromLevel @ 0x3337aa
// > GJRequestCell::loadFromScore @ 0x339574
// > GJMessageCell::loadFromMessage @ 0x339daa
// > EditorUI::setupCreateMenu @ 0x39bd86
// > PauseLayer::createToggleButton @ 0x3a7d0c
// > MoreSearchLayer::createToggleButton @ 0x3af688
// > ShareLevelSettingsLayer::init @ 0x3b9d90
// > ShareLevelSettingsLayer::init @ 0x3b9f94
// > LevelBrowserLayer::init @ 0x3bc92c
// > ColorSelectPopup::init @ 0x3db4fc
// > GJGarageLayer::setupIconSelect @ 0x4067ea
// > GJGarageLayer::setupIconSelect @ 0x40683a
// > GJGarageLayer::setupIconSelect @ 0x40688a
// > GJGarageLayer::setupIconSelect @ 0x4068da
// > GJGarageLayer::setupIconSelect @ 0x40692a
// > GJGarageLayer::setupIconSelect @ 0x40697a
// > GJGarageLayer::setupIconSelect @ 0x4069ca
// > GJGarageLayer::setupIconSelect @ 0x406a7a
// > GJGarageLayer::setupIconSelect @ 0x406aca
// > GJGarageLayer::setupIconSelect @ 0x406b1a
// > GJGarageLayer::setupIconSelect @ 0x406b6a
// > OptionsLayer::createToggleButton @ 0x422868
// > VideoOptionsLayer::createToggleButton @ 0x4248fa
// > SupportLayer::createToggleButton @ 0x42cce0
// > ShareCommentLayer::init @ 0x432020
// > LeaderboardsLayer::setupTabs @ 0x451a0e
// > LeaderboardsLayer::setupTabs @ 0x451a8c
// > LeaderboardsLayer::setupTabs @ 0x451b0a
// > LeaderboardsLayer::setupTabs @ 0x451b88
// > CustomizeObjectLayer::createToggleButton @ 0x46160a
// > AccountLayer::createToggleButton @ 0x4667ec
// > GJAccountSettingsLayer::createToggleButton @ 0x4abc08
// > MessagesProfilePage::init @ 0x4c16ea
// > sub_4C275C @ 0x4c2c48
// > CollisionBlockPopup::createToggleButton @ 0x4cd494
// > ColorSelectLiveOverlay::createToggleButton @ 0x4ce29c
// > CharacterColorPage::init @ 0x565d2c
// > LevelSettingsLayer::createToggleButton @ 0x570248
//
// 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
//
CCMenuItemToggler *CCMenuItemToggler::create(
cocos2d::CCNode *a1,
cocos2d::CCNode *a2,
cocos2d::CCObject *a3,
cocos2d::SEL_MenuHandler a4)
{
CCMenuItemToggler *v7; // r4
CCMenuItemToggler_vtbl *v8; // r3
int *v9; // r0
unsigned int varg_r3; // [sp+24h] [bp+18h]
v7 = (CCMenuItemToggler *)operator new(0x138u);
cocos2d::CCNodeRGBA::CCNodeRGBA(v7);
v7->m_fSizeMult = 0.0;
v7->m_bSelected = 0;
v7->m_bEnabled = 0;
v7->m_pListener = nullptr;
v7->m_pfnSelector.ptr = nullptr;
v7->m_pfnSelector.adj = 0;
v7->m_nScriptTapHandler = 0;
v7->m_offButton = nullptr;
v7->m_onButton = nullptr;
v7->m_toggled = 0;
v7->m_notClickable = 0;
v7->cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (CCMenuItemToggler_vtbl *)&off_A3D8A8;
v7->cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCRGBAProtocol::__vftable = (cocos2d::CCRGBAProtocol_vtbl *)&off_A3DAC0;
if ( CCMenuItemToggler::init(v7, a1, a2, a3, (cocos2d::SEL_MenuHandler)__PAIR64__(a4.adj, varg_r3)) )
{
cocos2d::CCObject::autorelease(v7);
}
else
{
v8 = v7->cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v9 = (int *)v7;
v7 = nullptr;
v8->~CCMenuItemToggler_0((CCMenuItemToggler *)v9);
}
return v7;
}