//
// SetupPulsePopup::textChanged from 0x4bdd10 to 0x4bdfaa (666 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'SetupPulsePopup::textChanged @ 0x4bdfb8
//
// 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 SetupPulsePopup::textChanged(SetupPulsePopup *a1, CCTextInputNode *a2)
{
int m_targetGroupID; // r3
int v5; // r2
int v6; // r3
float v7; // s15
float m_fadeInTime; // s15
Slider *m_fadeInSlider; // r0
float v10; // s15
float v11; // s15
float m_holdTime; // s15
float v13; // s15
float m_fadeOutTime; // s15
float v15; // s15
unsigned int v16; // r6
GLubyte v17; // r6
int v18; // r0
size_t v19; // r6
int v20; // r0
char *v21; // [sp+0h] [bp-8h] BYREF
if ( !a1->m_disableTextDelegate )
{
switch ( a2->getTag(a2) )
{
case 4:
CCTextInputNode::getString((CCTextInputNode *)&v21, (int)a2);
a1->m_targetGroupID = atoi(v21);
sub_774008(&v21);
m_targetGroupID = a1->m_targetGroupID;
v5 = 999;
if ( m_targetGroupID < 1 )
m_targetGroupID = 1;
if ( a1->m_pulseTargetType == 1 )
v5 = 9999;
if ( v5 > m_targetGroupID )
a1->m_targetGroupID = m_targetGroupID;
else
a1->m_targetGroupID = v5;
SetupPulsePopup::updateTargetID(a1);
SetupTriggerPopup::updateEditorLabel(a1);
return;
case 5:
CCTextInputNode::getString((CCTextInputNode *)&v21, (int)a2);
a1->m_copyColorID = atoi(v21);
sub_774008(&v21);
v6 = a1->m_copyColorID & ~(a1->m_copyColorID >> 31);
if ( v6 > 999 )
a1->m_copyColorID = 999;
else
a1->m_copyColorID = v6;
SetupPulsePopup::updateCopyColor(a1);
return;
case 8:
CCTextInputNode::getString((CCTextInputNode *)&v21, (int)a2);
v7 = atof(v21);
a1->m_fadeInTime = v7;
sub_774008(&v21);
m_fadeInTime = a1->m_fadeInTime;
if ( m_fadeInTime <= 0.0 )
m_fadeInTime = 0.0;
a1->m_fadeInTime = m_fadeInTime;
SetupPulsePopup::updateFadeInTime(a1);
m_fadeInSlider = a1->m_fadeInSlider;
v10 = a1->m_fadeInTime;
goto LABEL_24;
case 9:
CCTextInputNode::getString((CCTextInputNode *)&v21, (int)a2);
v11 = atof(v21);
a1->m_holdTime = v11;
sub_774008(&v21);
m_holdTime = a1->m_holdTime;
if ( m_holdTime <= 0.0 )
m_holdTime = 0.0;
a1->m_holdTime = m_holdTime;
SetupPulsePopup::updateHoldTime(a1);
m_fadeInSlider = a1->m_holdSlider;
v10 = a1->m_holdTime;
goto LABEL_24;
case 10:
CCTextInputNode::getString((CCTextInputNode *)&v21, (int)a2);
v13 = atof(v21);
a1->m_fadeOutTime = v13;
sub_774008(&v21);
m_fadeOutTime = a1->m_fadeOutTime;
if ( m_fadeOutTime <= 0.0 )
m_fadeOutTime = 0.0;
a1->m_fadeOutTime = m_fadeOutTime;
SetupPulsePopup::updateFadeOutTime(a1);
m_fadeInSlider = a1->m_fadeOutSlider;
v10 = a1->m_fadeOutTime;
LABEL_24:
v15 = v10 / 10.0;
if ( v15 >= 1.0 )
{
v15 = 1.0;
}
else if ( v15 <= 0.0 )
{
v15 = 0.0;
}
Slider::setValue(m_fadeInSlider, v15);
return;
case 11:
case 12:
case 13:
CCTextInputNode::getString((CCTextInputNode *)&v21, (int)a2);
v16 = atoi(v21);
sub_774008(&v21);
v17 = __usat(8u, v16);
v18 = a2->getTag(a2);
switch ( v18 )
{
case 12:
a1->m_currentColor.g = v17;
break;
case 13:
a1->m_currentColor.b = v17;
break;
case 11:
a1->m_currentColor.r = v17;
break;
}
goto LABEL_38;
case 14:
CCTextInputNode::getString((CCTextInputNode *)&v21, (int)a1->m_hexInput);
v19 = strlen(v21);
sub_774008(&v21);
if ( v19 != 6 )
return;
CCTextInputNode::getString((CCTextInputNode *)&v21, (int)a1->m_hexInput);
v20 = ColorSelectPopup::hexToColor((const char **)&v21);
*(_WORD *)&a1->m_currentColor.r = v20;
a1->m_currentColor.b = BYTE2(v20);
sub_774008(&v21);
LABEL_38:
SetupPulsePopup::selectColor(a1, (cocos2d::ccColor3B)*(_DWORD *)&a1->m_currentColor.r);
break;
default:
return;
}
}
}