//
// EditorUI::deactivateScaleControl from 0x140202dd0 to 0x140202e7a (170 bytes)
//
// 18 xrefs:
// > EditorUI::init @ 0x1401a9e59
// > EditorUI::onDelete @ 0x1401b0392
// > EditorUI::onDelete @ 0x1401b04e2
// > EditorUI::onDeleteSelected @ 0x1401b0b1c
// > EditorUI::onDeleteSelected @ 0x1401b0ddd
// > EditorUI::onDeleteSelected @ 0x1401b0e0c
// > EditorUI::updateSpecialUIElements @ 0x1401b3b8f
// > EditorUI::addObjectsToSmartTemplate @ 0x1401b65bd
// > EditorUI::createSmartObjectsFromTemplate @ 0x1401b721d
// > EditorUI::deleteSmartBlocksFromObjects @ 0x1401b7819
// > EditorUI::createSmartObjectsFromType @ 0x1401b7cdd
// > EditorUI::selectAll @ 0x1401c7fdc
// > EditorUI::selectAllWithDirection @ 0x1401c81ac
// > EditorUI::deselectAll @ 0x1401c8381
// > EditorUI::spriteFromObjectString @ 0x1401f0bdb
// > EditorUI::activateScaleControl @ 0x140202c58
// > EditorUI::activateTransformControl @ 0x1402032e9
// > ??> @ 0x14091af6c
//
// This function is hookable on this platform (idp: pc, 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 11:28:14 +0000
//
__int64 __fastcall EditorUI::deactivateScaleControl(__int64 a1)
{
__int64 v2; // rax
__int64 v3; // rdx
__int64 result; // rax
__int16 v5; // [rsp+30h] [rbp+8h] BYREF
char v6; // [rsp+32h] [rbp+Ah]
if ( (*(unsigned __int8 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 832) + 344LL))(*(_QWORD *)(a1 + 832)) )
{
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 832) + 336LL))(*(_QWORD *)(a1 + 832), 0);
GJScaleControl::finishTouch(*(_QWORD *)(a1 + 832));
GJScaleControl::releaseInputFocus(*(_QWORD **)(a1 + 832));
v2 = *(_QWORD *)(a1 + 832);
*(_DWORD *)(v2 + 584) = 0x40000000;
*(_DWORD *)(v2 + 588) = 1056964608;
}
v3 = *(_QWORD *)(a1 + 832);
v5 = -1;
v6 = -1;
EditorUI::updateEditButtonColor(a1, *(unsigned int *)(v3 + 592), &v5);
result = *(_QWORD *)(a1 + 832);
*(_DWORD *)(result + 592) = 0;
return result;
}