//
// EditorUI::toggleMode from 0x37e64c to 0x37e6e4 (152 bytes)
//
// 4 xrefs:
// > EditorUI::init @ 0x3a1dc8
// > EditorUI::onPlaytest @ 0x3a33d8
// > EditorUI::keyDown @ 0x3a7066
// > EditorUI::keyDown @ 0x3a72ce
//
// 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 EditorUI::toggleMode(EditorUI *a1, cocos2d::CCObject *a2)
{
int v3; // r0
int m_selectedMode; // r3
cocos2d::CCNode *v5; // r4
void (__fastcall *setSkewY)(cocos2d::CCNode *__hidden, float); // r5
cocos2d::CCSpriteFrameCache *v7; // r0
const char *v8; // r1
cocos2d::CCSpriteFrame *v9; // r0
v3 = a2->getTag(a2);
if ( a1->m_selectedMode != v3 )
{
a1->m_selectedMode = v3;
EditorUI::resetUI(a1);
m_selectedMode = a1->m_selectedMode;
switch ( m_selectedMode )
{
case 1:
v5 = a1->m_deleteModeBtn->getNormalImage(a1->m_deleteModeBtn);
setSkewY = v5->__vftable[1].setSkewY;
v7 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v8 = "edit_deleteSBtn_001.png";
break;
case 2:
v5 = a1->m_buildModeBtn->getNormalImage(a1->m_buildModeBtn);
setSkewY = v5->__vftable[1].setSkewY;
v7 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v8 = "edit_buildSBtn_001.png";
break;
case 3:
v5 = a1->m_editModeBtn->getNormalImage(a1->m_editModeBtn);
setSkewY = v5->__vftable[1].setSkewY;
v7 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v8 = "edit_editSBtn_001.png";
break;
default:
return;
}
v9 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v7, v8);
((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCSpriteFrame *))setSkewY)(v5, v9);
}
}