//
// UIOptionsLayer::valueDidChange from 0x1402a31e0 to 0x1402a395c (1916 bytes)
//
// 3 xrefs:
// > ??> @ 0x1405785d0
// > ??> @ 0x1406d1fdc
// > ??> @ 0x1406d1fe8
//
// 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
//
// Hidden C++ exception states: #wind=1
void UIOptionsLayer::valueDidChange(UIOptionsLayer *a1, int a2, float a3)
{
__int64 v4; // rdx
GameManager *v5; // rcx
GJUINode *v6; // rbx
cocos2d::CCSprite *v7; // rcx
cocos2d::CCSprite *v8; // rcx
cocos2d::CCSprite *v9; // rcx
cocos2d::CCSprite *v10; // rcx
int v11; // edi
GJUINode *v12; // rbx
cocos2d::CCSprite *m_secondSprite; // rcx
GJUINode *v14; // rbx
GJUINode *m_uiNode3; // rbx
GJUINode *m_uiNode4; // rbx
GJUINode *m_uiNode1; // rcx
GJUINode *m_uiNode2; // rcx
GJUINode *v19; // rbx
_BOOL8 v20; // rdx
UIOptionsLayer *v21; // rax
void *v22; // [rsp+58h] [rbp+20h]
v4 = (unsigned int)(a2 + 28);
v5 = (GameManager *)0x140000000LL;
switch ( (int)v4 )
{
case 0:
a1->m_uiNode2->m_split = a3 != 0.0;
GJUINode::updateButtonFrames(a1->m_uiNode2);
return;
case 1:
a1->m_uiNode1->m_split = a3 != 0.0;
GJUINode::updateButtonFrames(a1->m_uiNode1);
return;
case 2:
if ( !qword_1406C2ED8 )
{
v22 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)v22);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
}
GameManager::toggleGameVariable(v5, "0113");
return;
case 3:
a1->m_uiNode2->m_snap = a3 != 0.0;
return;
case 4:
a1->m_uiNode1->m_snap = a3 != 0.0;
return;
case 5:
a1->onClose(a1, nullptr);
v21 = UIOptionsLayer::create(!a1->m_dual);
v21->show(v21);
return;
case 6:
a1->m_uiNode2->m_deadzone = a3;
return;
case 7:
a1->m_uiNode1->m_deadzone = a3;
return;
case 8:
m_uiNode2 = a1->m_uiNode2;
m_uiNode2->m_radius = fmaxf(0.0, a3);
GJUINode::updateButtonPositions(m_uiNode2);
return;
case 9:
m_uiNode1 = a1->m_uiNode1;
m_uiNode1->m_radius = fmaxf(0.0, a3);
GJUINode::updateButtonPositions(m_uiNode1);
return;
case 10:
LOBYTE(v4) = a3 != 0.0;
v19 = a1->m_uiNode2;
if ( v19->m_secondSprite )
goto LABEL_35;
return;
case 11:
LOBYTE(v4) = a3 != 0.0;
v19 = a1->m_uiNode1;
if ( v19->m_secondSprite )
{
LABEL_35:
v19->m_modeB = v4;
LOBYTE(v4) = v4 ^ 1;
v19->m_firstSprite->setVisible(v19->m_firstSprite, v4);
LOBYTE(v20) = !v19->m_modeB;
v19->m_secondSprite->setVisible(v19->m_secondSprite, v20);
GJUINode::updateButtonFrames(v19);
}
return;
case 12:
v11 = (int)(float)(a3 * 255.0);
m_uiNode4 = a1->m_uiNode4;
m_uiNode4->m_firstSprite->setOpacity(&m_uiNode4->m_firstSprite->cocos2d::CCRGBAProtocol, v11);
m_secondSprite = m_uiNode4->m_secondSprite;
if ( m_secondSprite )
goto LABEL_29;
return;
case 13:
v11 = (int)(float)(a3 * 255.0);
m_uiNode3 = a1->m_uiNode3;
m_uiNode3->m_firstSprite->setOpacity(&m_uiNode3->m_firstSprite->cocos2d::CCRGBAProtocol, v11);
m_secondSprite = m_uiNode3->m_secondSprite;
if ( m_secondSprite )
goto LABEL_29;
return;
case 14:
v11 = (int)(float)(a3 * 255.0);
v14 = a1->m_uiNode2;
v14->m_firstSprite->setOpacity(&v14->m_firstSprite->cocos2d::CCRGBAProtocol, v11);
m_secondSprite = v14->m_secondSprite;
if ( m_secondSprite )
goto LABEL_29;
return;
case 15:
v11 = (int)(float)(a3 * 255.0);
v12 = a1->m_uiNode1;
v12->m_firstSprite->setOpacity(&v12->m_firstSprite->cocos2d::CCRGBAProtocol, v11);
m_secondSprite = v12->m_secondSprite;
if ( m_secondSprite )
LABEL_29:
m_secondSprite->setOpacity(&m_secondSprite->cocos2d::CCRGBAProtocol, v11);
return;
case 16:
v6 = a1->m_uiNode4;
((void (__fastcall *)(cocos2d::CCSprite *))v6->m_firstSprite->setScale_0)(v6->m_firstSprite);
v10 = v6->m_secondSprite;
if ( v10 )
((void (__fastcall *)(cocos2d::CCSprite *))v10->setScale_0)(v10);
goto LABEL_21;
case 17:
v6 = a1->m_uiNode3;
((void (__fastcall *)(cocos2d::CCSprite *))v6->m_firstSprite->setScale_0)(v6->m_firstSprite);
v9 = v6->m_secondSprite;
if ( v9 )
((void (__fastcall *)(cocos2d::CCSprite *))v9->setScale_0)(v9);
goto LABEL_21;
case 18:
v6 = a1->m_uiNode2;
((void (__fastcall *)(cocos2d::CCSprite *))v6->m_firstSprite->setScale_0)(v6->m_firstSprite);
v8 = v6->m_secondSprite;
if ( v8 )
((void (__fastcall *)(cocos2d::CCSprite *))v8->setScale_0)(v8);
goto LABEL_21;
case 19:
v6 = a1->m_uiNode1;
((void (__fastcall *)(cocos2d::CCSprite *))v6->m_firstSprite->setScale_0)(v6->m_firstSprite);
v7 = v6->m_secondSprite;
if ( v7 )
((void (__fastcall *)(cocos2d::CCSprite *))v7->setScale_0)(v7);
LABEL_21:
GJUINode::updateButtonPositions(v6);
break;
case 20:
GJUINode::updateHeight(a1->m_uiNode4, a3);
break;
case 21:
GJUINode::updateHeight(a1->m_uiNode3, a3);
break;
case 22:
GJUINode::updateHeight(a1->m_uiNode2, a3);
break;
case 23:
GJUINode::updateHeight(a1->m_uiNode1, a3);
break;
case 24:
GJUINode::updateWidth(a1->m_uiNode4, a3);
break;
case 25:
GJUINode::updateWidth(a1->m_uiNode3, a3);
break;
case 26:
GJUINode::updateWidth(a1->m_uiNode2, a3);
break;
case 27:
GJUINode::updateWidth(a1->m_uiNode1, a3);
break;
default:
return;
}
}