//
// CustomizeObjectSettingsPopup::init from 0x463db8 to 0x463fc8 (528 bytes)
//
// 1 xrefs:
// > CustomizeObjectSettingsPopup::create @ 0x46417a
//
// 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
//
bool CustomizeObjectSettingsPopup::init(
CustomizeObjectSettingsPopup *a1,
GameObject *a2,
cocos2d::CCArray *a3,
CustomizeObjectLayer *a4)
{
_BOOL4 v6; // r11
cocos2d::CCDirector *v7; // r0
cocos2d::CCPoint v9; // [sp+4h] [bp-50h]
cocos2d::CCPoint v10; // [sp+4h] [bp-50h]
cocos2d::CCPoint v11; // [sp+4h] [bp-50h]
int v12; // [sp+14h] [bp-40h]
int v13; // [sp+14h] [bp-40h]
int v14; // [sp+18h] [bp-3Ch]
_BYTE v15[4]; // [sp+28h] [bp-2Ch] BYREF
cocos2d::CCSize v16; // [sp+2Ch] [bp-28h] BYREF
cocos2d::CCPoint v17; // [sp+34h] [bp-20h] BYREF
cocos2d::CCPoint v18; // [sp+3Ch] [bp-18h] BYREF
_BYTE v19[8]; // [sp+44h] [bp-10h] BYREF
v6 = SetupTriggerPopup::init(a1, (EffectGameObject *)a2, a3, 320.0, 200.0, 1);
if ( v6 )
{
a1->m_customizeLayer = a4;
SetupTriggerPopup::preSetup(a1);
sub_776584((int)v19, "Settings");
SetupTriggerPopup::addTitle(a1, (std::string)v19);
sub_774008(v19);
sub_776584((int)v19, "OK");
SetupTriggerPopup::addCloseButton(a1, (std::string)v19);
sub_774008(v19);
sub_776584((int)&v18, "Help");
sub_776584((int)v19, "Change if a single color object is treated as base or detail color.");
SetupTriggerPopup::addHelpButton(a1, (std::string)&v18, (std::string)v19, 1.0);
sub_774008(v19);
sub_774008(&v18);
v7 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v16, v7);
cocos2d::CCPoint::CCPoint(&v17, v16.width * 0.5, (float)(v16.height * 0.5) + 10.0);
v14 = (int)a1->getValue(a1, 497);
sub_776584((int)v15, "Default");
cocos2d::CCPoint::CCPoint(&v18, -100.0, 0.0);
cocos2d::CCPoint::operator+(v19, &v17, &v18);
LODWORD(v9.x) = v19;
LODWORD(v9.y) = 1;
((void (__fastcall *)(SetupTriggerPopup *__hidden, int, bool, bool, std::string, cocos2d::CCPoint, bool, int))SetupTriggerPopup::createCustomToggleValueControl)(
a1,
0,
v14 == 0,
1,
(std::string)v15,
v9,
0,
0);
sub_774008(v15);
sub_776584((int)v15, "Base");
cocos2d::CCPoint::CCPoint(&v18, 0.0, 0.0);
cocos2d::CCPoint::operator+(v19, &v17, &v18);
LODWORD(v10.x) = v19;
LODWORD(v10.y) = 1;
SetupTriggerPopup::createCustomToggleValueControl(a1, 1, v14 == 1, 1, (std::string)v15, v10, 0, 0, v12);
sub_774008(v15);
sub_776584((int)v15, "Detail");
cocos2d::CCPoint::CCPoint(&v18, 100.0, 0.0);
cocos2d::CCPoint::operator+(v19, &v17, &v18);
LODWORD(v11.x) = v19;
LODWORD(v11.y) = 1;
SetupTriggerPopup::createCustomToggleValueControl(a1, 2, v14 == 2, 1, (std::string)v15, v11, 0, 0, v13);
sub_774008(v15);
SetupTriggerPopup::postSetup(a1);
}
return v6;
}