//
// SetupShaderEffectPopup::setupColorChange from 0x556b08 to 0x556e64 (860 bytes)
//
// 1 xrefs:
// > SetupShaderEffectPopup::init @ 0x557250
//
// 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 SetupShaderEffectPopup::setupColorChange(SetupShaderEffectPopup *a1)
{
cocos2d::CCDirector *v2; // r0
cocos2d::CCPoint v3; // r1
cocos2d::CCSprite *v4; // r0
CCMenuItemSpriteExtra *v5; // r5
cocos2d::CCMenu *m_buttonMenu; // r9
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8
cocos2d::CCFloat *v8; // [sp+4h] [bp-40h]
cocos2d::CCSize v9; // [sp+14h] [bp-30h] BYREF
cocos2d::CCPoint v10; // [sp+1Ch] [bp-28h] BYREF
cocos2d::CCPoint v11; // [sp+24h] [bp-20h] BYREF
cocos2d::CCPoint v12; // [sp+2Ch] [bp-18h] BYREF
cocos2d::CCPoint v13; // [sp+34h] [bp-10h] BYREF
sub_776584((int)&v13, "Setup Brightness Contrast");
SetupTriggerPopup::addTitle((int)a1);
sub_774008(&v13);
sub_776584((int)&v12, "Help");
sub_776584(
(int)&v13,
"Edits colors on the screen.\n"
"CR, CG, and CB define how much red, green, and blue to tint with respectively.\n"
"BR, BG, and BB define the brightness of red, green, and blue.");
SetupTriggerPopup::addHelpButton((int)a1, (int)&v12, (int)&v13, 1065353216);
sub_774008(&v13);
sub_774008(&v12);
v2 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v9, v2);
cocos2d::CCPoint::CCPoint(&v10, v9.width * 0.5, (float)(v9.height * 0.5) + 90.0);
sub_776584((int)&v11, "FadeTime:");
cocos2d::CCPoint::CCPoint(&v12, 0.0, 0.0);
cocos2d::CCPoint::operator+(&v13, &v10, &v12);
SetupTriggerPopup::createValueControl(
(unsigned int)a1,
10,
(int)&v11,
&v13,
(cocos2d::CCZone *)0x3F333333,
nullptr,
0.0);
sub_774008(&v11);
sub_776584((int)&v11, "CR:");
cocos2d::CCPoint::CCPoint(&v12, -130.0, -50.0);
cocos2d::CCPoint::operator+(&v13, &v10, &v12);
SetupTriggerPopup::createValueControl(
(unsigned int)a1,
176,
(int)&v11,
&v13,
(cocos2d::CCZone *)0x3F19999A,
(cocos2d::CCFloat *)0xC0000000,
2.0);
sub_774008(&v11);
sub_776584((int)&v11, "CG:");
cocos2d::CCPoint::CCPoint(&v12, 0.0, -50.0);
cocos2d::CCPoint::operator+(&v13, &v10, &v12);
SetupTriggerPopup::createValueControl(
(unsigned int)a1,
191,
(int)&v11,
&v13,
(cocos2d::CCZone *)0x3F19999A,
(cocos2d::CCFloat *)0xC0000000,
2.0);
sub_774008(&v11);
sub_776584((int)&v11, "CB:");
cocos2d::CCPoint::CCPoint(&v12, 130.0, -50.0);
cocos2d::CCPoint::operator+(&v13, &v10, &v12);
SetupTriggerPopup::createValueControl(
(unsigned int)a1,
175,
(int)&v11,
&v13,
(cocos2d::CCZone *)0x3F19999A,
(cocos2d::CCFloat *)0xC0000000,
2.0);
sub_774008(&v11);
sub_776584((int)&v11, "BR:");
cocos2d::CCPoint::CCPoint(&v12, -130.0, -100.0);
cocos2d::CCPoint::operator+(&v13, &v10, &v12);
SetupTriggerPopup::createValueControl(
(unsigned int)a1,
179,
(int)&v11,
&v13,
(cocos2d::CCZone *)0x3F19999A,
(cocos2d::CCFloat *)0xC0000000,
2.0);
sub_774008(&v11);
sub_776584((int)&v11, "BG:");
cocos2d::CCPoint::CCPoint(&v12, 0.0, -100.0);
cocos2d::CCPoint::operator+(&v13, &v10, &v12);
SetupTriggerPopup::createValueControl(
(unsigned int)a1,
180,
(int)&v11,
&v13,
(cocos2d::CCZone *)0x3F19999A,
(cocos2d::CCFloat *)0xC0000000,
2.0);
sub_774008(&v11);
sub_776584((int)&v11, "BB:");
cocos2d::CCPoint::CCPoint(&v12, 130.0, -100.0);
cocos2d::CCPoint::operator+(&v13, &v10, &v12);
SetupTriggerPopup::createValueControl(
(unsigned int)a1,
189,
(int)&v11,
&v13,
(cocos2d::CCZone *)0x3F19999A,
(cocos2d::CCFloat *)0xC0000000,
2.0);
sub_774008(&v11);
cocos2d::CCPoint::CCPoint(&v12, 0.0, -145.0);
cocos2d::CCPoint::operator+(&v13, &v10, &v12);
LODWORD(v3.x) = &v13;
v3.y = 0.7;
SetupTriggerPopup::createEasingControls(a1, v3, 0.0, 0, (int)v8);
v4 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_resetBtn_001.png");
LODWORD(v13.x) = SetupShaderEffectPopup::onResetColors;
v13.y = 0.0;
v5 = CCMenuItemSpriteExtra::create(
v4,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(SetupShaderEffectPopup::onResetColors, (unsigned int)a1));
a1->m_buttonMenu->addChild(a1->m_buttonMenu, v5);
m_buttonMenu = a1->m_buttonMenu;
setPosition = v5->setPosition;
cocos2d::CCPoint::CCPoint(
&v11,
(float)((float)(a1->m_width * 0.5) + (float)(v9.width * 0.5)) - 50.0,
(float)((float)(a1->m_height * 0.5) + (float)(v9.height * 0.5)) - 20.0);
cocos2d::CCNode::convertToNodeSpace(&v12, m_buttonMenu, &v11);
setPosition(v5, &v12);
}