//
// SelectFontLayer::onChangeFont from 0x14028ed30 to 0x14028edcd (157 bytes)
//
// 3 xrefs:
// > SelectFontLayer::init @ 0x14028e9a5
// > SelectFontLayer::init @ 0x14028ea61
// > ??> @ 0x1406d18b0
//
// 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 SelectFontLayer::onChangeFont(SelectFontLayer *a1, cocos2d::CCObject *a2)
{
int m_fontIndex; // ebx
int v4; // esi
int v5; // esi
cocos2d::CCLabelBMFont *m_fontLabel; // rcx
m_fontIndex = a1->m_editorLayer->m_levelSettings->m_fontIndex;
v4 = 1;
if ( a2->getTag(a2) != 1 )
v4 = -1;
v5 = m_fontIndex + v4;
if ( v5 < 0 )
v5 = 0;
if ( v5 > 59 )
v5 = 59;
if ( v5 != a1->m_font )
{
m_fontLabel = a1->m_fontLabel;
if ( m_fontLabel )
{
m_fontLabel->removeFromParent(m_fontLabel);
a1->m_fontLabel = nullptr;
}
LevelEditorLayer::updateLevelFont(a1->m_editorLayer, v5);
SelectFontLayer::updateFontLabel(a1);
}
}