//
// SetupTimerControlTriggerPopup::init from 0x594488 to 0x5946aa (546 bytes)
//
// 1 xrefs:
// > SetupTimerControlTriggerPopup::create @ 0x594762
//
// 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 SetupTimerControlTriggerPopup::init(
SetupTimerControlTriggerPopup *a1,
TimerTriggerGameObject *a2,
cocos2d::CCArray *a3)
{
_BOOL4 v4; // r11
cocos2d::CCDirector *v5; // r0
int v6; // s16
cocos2d::CCPoint v8; // [sp+4h] [bp-68h]
cocos2d::CCPoint v9; // [sp+4h] [bp-68h]
_BYTE v10[4]; // [sp+40h] [bp-2Ch] BYREF
cocos2d::CCSize v11; // [sp+44h] [bp-28h] BYREF
cocos2d::CCPoint v12; // [sp+4Ch] [bp-20h] BYREF
cocos2d::CCPoint v13; // [sp+54h] [bp-18h] BYREF
cocos2d::CCPoint v14; // [sp+5Ch] [bp-10h] BYREF
v4 = SetupTriggerPopup::init(a1, a2, a3, 300.0, 240.0, 1);
if ( v4 )
{
SetupTriggerPopup::preSetup(a1);
sub_776584((int)&v14, "Time Control Trigger");
SetupTriggerPopup::addTitle((int)a1);
sub_774008(&v14);
sub_776584((int)&v14, "OK");
SetupTriggerPopup::addCloseButton((unsigned int)a1, (ButtonSprite **)&v14);
sub_774008(&v14);
sub_776584((int)&v13, "Help");
sub_776584((int)&v14, "Starts or stops a timer given by ItemID.");
SetupTriggerPopup::addHelpButton((int)a1, (int)&v13, (int)&v14, 1065353216);
sub_774008(&v14);
sub_774008(&v13);
SetupTriggerPopup::createMultiTriggerItemsDefault(a1);
v5 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v11, v5);
cocos2d::CCPoint::CCPoint(&v12, v11.width * 0.5, v11.height * 0.5);
sub_776584((int)v10, "ItemID");
cocos2d::CCPoint::CCPoint(&v13, 0.0, 50.0);
cocos2d::CCPoint::operator+(&v14, &v12, &v13);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
80,
(int)v10,
&v14,
(cocos2d::CCZone *)0x3F4CCCCD,
1,
Uint,
6,
1,
nullptr,
100.0,
0,
0,
0,
2,
0);
sub_774008(v10);
v6 = (int)a1->getValue(a1, 472);
sub_776584((int)v10, "Start");
cocos2d::CCPoint::CCPoint(&v13, -60.0, -20.0);
cocos2d::CCPoint::operator+(&v14, &v12, &v13);
LODWORD(v8.x) = &v14;
LODWORD(v8.y) = 1;
SetupTriggerPopup::createCustomToggleValueControl(a1, 0, v6 == 0, 1, (std::string)v10, v8, 0, 0);
sub_774008(v10);
sub_776584((int)v10, "Stop");
cocos2d::CCPoint::CCPoint(&v13, 60.0, -20.0);
cocos2d::CCPoint::operator+(&v14, &v12, &v13);
LODWORD(v9.x) = &v14;
LODWORD(v9.y) = 1;
SetupTriggerPopup::createCustomToggleValueControl(a1, 1, v6 == 1, 1, (std::string)v10, v9, 0, 0);
sub_774008(v10);
SetupTriggerPopup::postSetup(a1);
}
return v4;
}