//
// EditorUI::toggleDuplicateButton from 0x1003e6358 to 0x1003e6484 (300 bytes)
//
// 1 xrefs:
// > EditorUI::updateButtons @ 0x1003e5aa8
//
// 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
//
void __fastcall EditorUI::toggleDuplicateButton(EditorUI *a1)
{
CCMenuItemSpriteExtra *m_copyPasteBtn; // x0
int v3; // w8
__int16 *v4; // x21
__int64 v5; // x20
char v6; // w22
CCMenuItemSpriteExtra *m_copyBtn; // x0
GameManager *v8; // x0
std::size_t size; // x8
CCMenuItemSpriteExtra *m_pasteBtn; // x0
__int16 *v11; // x1
__int64 v12; // x20
if ( a1->m_selectedObject )
{
m_copyPasteBtn = a1->m_copyPasteBtn;
m_copyPasteBtn->m_animationEnabled = 1;
LABEL_4:
v4 = &word_100647392;
v5 = 255;
v6 = 1;
goto LABEL_5;
}
v3 = sub_10024A36C((__int64)a1->m_selectedObjects);
m_copyPasteBtn = a1->m_copyPasteBtn;
m_copyPasteBtn->m_animationEnabled = v3 != 0;
if ( v3 )
goto LABEL_4;
v6 = 0;
v4 = &word_100647395;
v5 = 175;
LABEL_5:
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int16 *))m_copyPasteBtn->setColor)(m_copyPasteBtn, v4);
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))a1->m_copyPasteBtn->setOpacity)(a1->m_copyPasteBtn, v5);
m_copyBtn = a1->m_copyBtn;
m_copyBtn->m_animationEnabled = v6;
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int16 *))m_copyBtn->setColor)(m_copyBtn, v4);
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))a1->m_copyBtn->setOpacity)(a1->m_copyBtn, v5);
v8 = GameManager::sharedState();
size = v8->m_editorClipboard.m_data.m_short.shortStorage.__elems_[22];
if ( (size & 0x8000000000000000LL) != 0 )
size = v8->m_editorClipboard.m_data.m_long.size;
m_pasteBtn = a1->m_pasteBtn;
m_pasteBtn->m_animationEnabled = size != 0;
if ( size )
v11 = &word_100647392;
else
v11 = &word_100647395;
if ( size )
v12 = 255;
else
v12 = 175;
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int16 *))m_pasteBtn->setColor)(m_pasteBtn, v11);
((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))a1->m_pasteBtn->setOpacity)(a1->m_pasteBtn, v12);
}