//
// CustomizeObjectLayer::toggleVisible from 0x1400a9200 to 0x1400a93b3 (435 bytes)
//
// 2 xrefs:
// > CustomizeObjectLayer::onSelectMode @ 0x1400a90d8
// > ??> @ 0x1406c780c
//
// 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 CustomizeObjectLayer::toggleVisible(CustomizeObjectLayer *a1)
{
unsigned int v2; // edi
unsigned int i; // esi
struct cocos2d::CCObject *v4; // rax
__int64 v5; // rdx
unsigned int j; // esi
struct cocos2d::CCObject *v7; // rax
__int64 v8; // rdx
struct cocos2d::CCObject *v9; // rax
CCTextInputNode *m_textInput; // rcx
int ActiveMode; // eax
ButtonSprite *ButtonByTag; // rax
v2 = 0;
a1->m_showTextInput = a1->m_selectedMode == 3;
for ( i = 0; i < cocos2d::CCArray::count(a1->m_colorTabNodes); ++i )
{
v4 = cocos2d::CCArray::objectAtIndex(a1->m_colorTabNodes, i);
LOBYTE(v5) = !a1->m_showTextInput;
((void (__fastcall *)(struct cocos2d::CCObject *, __int64))v4->__vftable[4].update)(v4, v5);
}
for ( j = 0; j < cocos2d::CCArray::count(a1->m_detailTabNodes); ++j )
{
v7 = cocos2d::CCArray::objectAtIndex(a1->m_detailTabNodes, j);
LOBYTE(v8) = !a1->m_showTextInput;
((void (__fastcall *)(struct cocos2d::CCObject *, __int64))v7->__vftable[4].update)(v7, v8);
}
if ( a1->m_customColorSelected )
{
if ( cocos2d::CCArray::count(a1->m_textTabNodes) )
{
do
{
v9 = cocos2d::CCArray::objectAtIndex(a1->m_textTabNodes, v2);
((void (__fastcall *)(struct cocos2d::CCObject *, bool))v9->__vftable[4].update)(v9, a1->m_showTextInput);
++v2;
}
while ( v2 < cocos2d::CCArray::count(a1->m_textTabNodes) );
}
m_textInput = a1->m_textInput;
if ( m_textInput )
{
m_textInput->setTouchEnabled(m_textInput, a1->m_showTextInput);
a1->m_textInput->setVisible(a1->m_textInput, a1->m_showTextInput);
}
}
ActiveMode = CustomizeObjectLayer::getActiveMode(a1, 0);
if ( (unsigned int)(ActiveMode - 10) <= 0x3DD )
{
a1->m_disableTextDelegate = 1;
a1->m_customColorChannel = ActiveMode;
CustomizeObjectLayer::updateCustomColorLabels(a1);
ActiveMode = 1008;
a1->m_disableTextDelegate = 0;
}
ButtonByTag = CustomizeObjectLayer::getButtonByTag(a1, ActiveMode);
CustomizeObjectLayer::highlightSelected(a1, ButtonByTag);
}