//
// EditorUI::activateScaleControl from 0x70ee40 to 0x70efa4 (356 bytes)
//
// 1 xrefs:
// > EditorUI::handleEditorAction @ 0x6f22d8
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:57:43 +0000
//
void __fastcall EditorUI::activateScaleControl(cocos2d::CCArray **this, cocos2d::CCObject *a2)
{
EditorSFXManager *v4; // r0
EditorSFXManager *v5; // r0
int v6; // r0
int v7; // r5
int v8; // r8
const char *v9; // r0
char *v10; // r0
_BYTE *v11; // r1
int v12; // r9
int v13; // r7
void (__fastcall *v14)(int, _BYTE *); // r10
int v15; // r5
void (__fastcall *v16)(int, _DWORD); // r7
float v17; // r0
_BYTE v18[8]; // [sp+4h] [bp-14h] BYREF
_BYTE v19[8]; // [sp+Ch] [bp-Ch] BYREF
v4 = (EditorSFXManager *)cocos2d::CCArray::count(*(this + 167));
if ( v4 || *(this + 249) )
{
v5 = (EditorSFXManager *)EditorSFXManager::sharedState(v4);
EditorSFXManager::playAction(v5, 189);
EditorUI::deactivateTransformControl((EditorUI *)this);
if ( !(*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 148) + 176))(*(this + 148))
|| (v6 = (*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)a2 + 32))(a2),
v7 = *((_DWORD *)*(this + 148) + 106),
v8 = v6,
EditorUI::deactivateScaleControl((EditorUI *)this),
v8 != v7) )
{
if ( !(*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 148) + 176))(*(this + 148)) || *((_BYTE *)this + 588) )
{
v9 = (const char *)(*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)a2 + 32))(a2);
EditorUI::updateEditButtonColor((int)this, v9, 10921638);
*((_BYTE *)this + 588) = 0;
if ( cocos2d::CCArray::count(*(this + 167)) )
{
EditorUI::getGroupCenter((EditorUI *)v19, (cocos2d::CCArray *)this, *(this + 167), 0);
v10 = (char *)(this + 145);
v11 = v19;
}
else
{
v11 = (_BYTE *)(*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 249) + 96))(*(this + 249));
v10 = (char *)(this + 145);
}
cocos2d::CCPoint::operator=(v10, v11);
v12 = (int)*(this + 148);
*(_DWORD *)(v12 + 424) = (*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)a2 + 32))(a2);
v13 = (int)*(this + 148);
v14 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v13 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, 0.0, 40.0);
cocos2d::CCPoint::operator+(v19, this + 145, v18);
v14(v13, v19);
v15 = (int)*(this + 148);
v16 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v15 + 80);
v17 = COERCE_FLOAT((*(int (__fastcall **)(_DWORD))(**((_DWORD **)*(this + 236) + 609) + 84))(*((_DWORD *)*(this + 236) + 609)));
v16(v15, 1.0 / v17);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 148) + 172))(*(this + 148), 1);
(*((void (__fastcall **)(cocos2d::CCArray **))*this + 169))(this);
}
}
}
}