//
// UIOptionsLayer::toggleUIGroup from 0x1002e3e2c to 0x1002e3f5c (304 bytes)
//
// 2 xrefs:
// > UIOptionsLayer::init @ 0x1002e3b30
// > UIOptionsLayer::ccTouchBegan @ 0x1002e4588
//
// 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 UIOptionsLayer::toggleUIGroup(UIOptionsLayer *a1, int a2)
{
const std::string::value_type *v4; // x1
cocos2d::CCLabelBMFont *m_nameLabel; // x0
std::string *v6; // x1
std::string v7; // [xsp+8h] [xbp-28h] BYREF
if ( a1->m_activeUIGroup == a2 )
return;
sub_100009900(&v7, "P1 Move");
switch ( a2 )
{
case 2:
v4 = "P2 Move";
LABEL_8:
std::string::assign(&v7, v4);
break;
case 3:
v4 = "P1 Jump";
goto LABEL_8;
case 4:
v4 = "P2 Jump";
goto LABEL_8;
}
m_nameLabel = a1->m_nameLabel;
if ( m_nameLabel )
{
if ( (v7.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v6 = &v7;
else
v6 = (std::string *)v7.__r_.__value_.__r.__words[0];
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))m_nameLabel->setString)(m_nameLabel, v6);
}
a1->m_activeUIGroup = a2;
((void (__fastcall *)(UIOptionsLayer *, __int64, bool))a1->toggleGroup)(a1, 1, a2 == 1);
((void (__fastcall *)(UIOptionsLayer *, __int64, bool))a1->toggleGroup)(a1, 2, a2 == 2);
((void (__fastcall *)(UIOptionsLayer *, __int64, bool))a1->toggleGroup)(a1, 3, a2 == 3);
((void (__fastcall *)(UIOptionsLayer *, __int64, bool))a1->toggleGroup)(a1, 4, a2 == 4);
if ( SHIBYTE(v7.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v7.__r_.__value_.__l.__data_);
}