//
// ColorSelectPopup::sliderChanged from 0x100727780 to 0x100727991 (529 bytes)
//
// 2 xrefs:
// > ColorSelectPopup::init @ 0x1007253f6
// > ColorSelectPopup::init @ 0x1007255d1
//
// 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 ColorSelectPopup::sliderChanged(ColorSelectPopup *a1, cocos2d::CCObject *a2)
{
EffectGameObject *m_gameObject; // rax
cocos2d::CCString *v4; // rax
float v5; // xmm0_4
double v6; // xmm1_8
EffectGameObject *v7; // rax
float *p_m_opacity; // rax
cocos2d::CCLabelBMFont *m_opacityLabel; // r14
double m_opacity; // xmm0_8
cocos2d::CCString *v11; // rax
const char *CString; // rax
cocos2d::CCArray *m_gameObjects; // rdi
unsigned int v14; // r14d
cocos2d::CCArray *v15; // rdi
unsigned int v16; // r14d
ColorAction *m_colorAction; // rax
char v18; // [rsp+0h] [rbp-20h]
char v19; // [rsp+0h] [rbp-20h]
float Value; // [rsp+Ch] [rbp-14h]
Value = SliderThumb::getValue((SliderThumb *)a2);
if ( ((unsigned int (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2) == 1 )
{
a1->m_fadeTime = Value * 10.0;
m_gameObject = a1->m_gameObject;
if ( m_gameObject )
{
m_gameObject->m_duration = Value * 10.0;
}
else
{
m_gameObjects = a1->m_gameObjects;
if ( m_gameObjects && (unsigned int)sub_100720070((__int64)m_gameObjects) )
{
v14 = 0;
do
*(float *)(sub_1007200C0((__int64)a1->m_gameObjects, v14++) + 1452) = a1->m_fadeTime;
while ( v14 < (unsigned int)sub_100720070((__int64)a1->m_gameObjects) );
}
}
ColorSelectPopup::updateDurLabel(a1);
return;
}
if ( ((unsigned int (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2) != 2 )
return;
v4 = (cocos2d::CCString *)sub_1007AB580("%.02f", v18);
v5 = cocos2d::CCString::floatValue(v4);
a1->m_opacity = v5;
v6 = 0.0;
if ( v5 > 0.02 )
{
if ( v5 < 0.98000002 )
goto LABEL_10;
*(_QWORD *)&v6 = 1065353216;
}
a1->m_opacity = *(float *)&v6;
v5 = *(float *)&v6;
LABEL_10:
v7 = a1->m_gameObject;
if ( v7 )
{
p_m_opacity = &v7->m_opacity;
LABEL_12:
*p_m_opacity = v5;
goto LABEL_13;
}
v15 = a1->m_gameObjects;
if ( v15 )
{
if ( (unsigned int)sub_100720070((__int64)v15) )
{
v16 = 0;
do
*(float *)(sub_1007200C0((__int64)a1->m_gameObjects, v16++) + 1456) = a1->m_opacity;
while ( v16 < (unsigned int)sub_100720070((__int64)a1->m_gameObjects) );
}
goto LABEL_13;
}
m_colorAction = a1->m_colorAction;
if ( m_colorAction )
{
p_m_opacity = &m_colorAction->m_fromOpacity;
goto LABEL_12;
}
LABEL_13:
m_opacityLabel = a1->m_opacityLabel;
if ( m_opacityLabel )
{
m_opacity = a1->m_opacity;
v11 = (cocos2d::CCString *)sub_1007AB580("Opacity: %.02f", v19);
CString = cocos2d::CCString::getCString(v11);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, const char *, double, double))m_opacityLabel->setString)(
m_opacityLabel,
CString,
m_opacity,
v6);
}
}