//
// ColorSelectPopup::textChanged from 0x3dcff8 to 0x3dd1e0 (488 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'ColorSelectPopup::textChanged @ 0x3dd1f0
//
// 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 ColorSelectPopup::textChanged(ColorSelectPopup *a1, CCTextInputNode *a2)
{
int v4; // r3
int v5; // r3
double v6; // d8
const char *v7; // r1
cocos2d::CCString *v8; // r0
float v9; // s15
unsigned int v10; // r6
GLubyte v11; // r6
int v12; // r0
size_t v13; // r6
int v14; // r0
char *v15; // [sp+0h] [bp-8h] BYREF
if ( !a1->m_disableTextDelegate )
{
switch ( a2->getTag(a2) )
{
case 3:
CCTextInputNode::getString((CCTextInputNode *)&v15, (int)a2);
a1->m_colorID = atoi(v15);
sub_774008(&v15);
v4 = a1->m_colorID & ~(a1->m_colorID >> 31);
if ( v4 > 999 )
a1->m_colorID = 999;
else
a1->m_colorID = v4;
ColorSelectPopup::updateCustomColorIdx(a1);
SetupTriggerPopup::updateEditorLabel(a1);
break;
case 4:
CCTextInputNode::getString((CCTextInputNode *)&v15, (int)a2);
a1->m_copyColorID = atoi(v15);
sub_774008(&v15);
v5 = a1->m_copyColorID & ~(a1->m_copyColorID >> 31);
if ( v5 > 999 )
a1->m_copyColorID = 999;
else
a1->m_copyColorID = v5;
ColorSelectPopup::updateCopyColor(a1);
break;
case 5:
CCTextInputNode::getString((CCTextInputNode *)&v15, (int)a2);
v6 = atof(v15);
sub_774008(&v15);
*(float *)&v6 = v6;
v8 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%.02f", v7, *(float *)&v6);
a1->m_fadeTime = cocos2d::CCString::floatValue(v8);
ColorSelectPopup::updateDuration(a1);
v9 = a1->m_fadeTime / 10.0;
if ( v9 >= 1.0 )
{
v9 = 1.0;
}
else if ( v9 <= 0.0 )
{
v9 = 0.0;
}
Slider::setValue(a1->m_fadeTimeSlider, v9);
break;
case 8:
case 9:
case 10:
CCTextInputNode::getString((CCTextInputNode *)&v15, (int)a2);
v10 = atoi(v15);
sub_774008(&v15);
v11 = __usat(8u, v10);
v12 = a2->getTag(a2);
switch ( v12 )
{
case 9:
a1->m_currentColor.g = v11;
break;
case 10:
a1->m_currentColor.b = v11;
break;
case 8:
a1->m_currentColor.r = v11;
break;
}
goto LABEL_25;
case 11:
CCTextInputNode::getString((CCTextInputNode *)&v15, (int)a1->m_hexInput);
v13 = strlen(v15);
sub_774008(&v15);
if ( v13 == 6 )
{
CCTextInputNode::getString((CCTextInputNode *)&v15, (int)a1->m_hexInput);
v14 = ColorSelectPopup::hexToColor((const char **)&v15);
*(_WORD *)&a1->m_currentColor.r = v14;
a1->m_currentColor.b = BYTE2(v14);
sub_774008(&v15);
LABEL_25:
ColorSelectPopup::selectColor(a1, (cocos2d::ccColor3B)*(_DWORD *)&a1->m_currentColor.r);
}
break;
default:
return;
}
}
}