//
// EditorUI::selectBuildTab from 0x100033dd0 to 0x100033f23 (339 bytes)
//
// 3 xrefs:
// > EditorUI::setupCreateMenu @ 0x10002a4dd
// > EditorUI::updateCreateMenu @ 0x10002e718
// > EditorUI::onSelectBuildTab @ 0x100033dbd
//
// 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 __fastcall EditorUI::selectBuildTab(EditorUI *a1, int a2)
{
int m_selectedTab; // eax
int v3; // r14d
unsigned int v4; // ecx
int v5; // eax
unsigned int v6; // r14d
EditButtonBar *v7; // r15
unsigned int v8; // r14d
CCMenuItemToggler *v9; // rax
m_selectedTab = a1->m_selectedTab;
if ( m_selectedTab != a2 )
{
v3 = a2;
if ( m_selectedTab == -1 || a1->m_selectedMode == 2 )
{
v4 = sub_100720070(a1->m_createButtonBars) - 1;
v5 = a2;
if ( v4 <= a2 )
v5 = sub_100720070(a1->m_createButtonBars) - 1;
if ( v5 )
{
if ( (unsigned int)sub_100720070(a1->m_createButtonBars) - 1 <= a2 )
v3 = sub_100720070(a1->m_createButtonBars) - 1;
}
else
{
v3 = 0;
}
a1->m_selectedTab = v3;
if ( (unsigned int)sub_100720070(a1->m_createButtonBars) )
{
v6 = 0;
do
{
v7 = (EditButtonBar *)sub_1007200C0(a1->m_createButtonBars, v6);
((void (__fastcall *)(EditButtonBar *, bool))v7->setVisible)(v7, v6 == a1->m_selectedTab);
if ( v6 == a1->m_selectedTab )
a1->m_createButtonBar = v7;
++v6;
}
while ( v6 < (unsigned int)sub_100720070(a1->m_createButtonBars) );
}
if ( (unsigned int)sub_100720070(a1->m_tabsArray) )
{
v8 = 0;
do
{
v9 = (CCMenuItemToggler *)sub_1007200C0(a1->m_tabsArray, v8);
CCMenuItemToggler::toggle(v9, v8++ == a1->m_selectedTab);
}
while ( v8 < (unsigned int)sub_100720070(a1->m_tabsArray) );
}
}
}
}