//
// ColorSelectPopup::onUpdateCustomColor from 0x8638a0 to 0x863920 (128 bytes)
//
// 4 xrefs:
// > ??> @ 0x56548
// > ColorSelectPopup::init @ 0x865660
// > ColorSelectPopup::init @ 0x865708
// > ??> @ 0x1541f10
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:55:37 +0000
//
__int64 __fastcall ColorSelectPopup::onUpdateCustomColor(ColorSelectPopup *this, cocos2d::CCObject *a2)
{
int v3; // w0
int v4; // w1
int v5; // w1
if ( *((int *)this + 292) > 999 )
*((_DWORD *)this + 292) = 0;
v3 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)a2 + 64LL))(a2);
v4 = *((_DWORD *)this + 292);
if ( v3 == 1 )
v5 = v4 + 1;
else
v5 = v4 - 1;
if ( v5 < 0 )
v5 = 0;
if ( v5 > 999 )
v5 = 999;
*((_DWORD *)this + 292) = v5;
ColorSelectPopup::updateCustomColorIdx((__int64)this);
SetupTriggerPopup::updateEditorLabel(this);
return ColorSelectPopup::updateTextInputLabel(this);
}