//
// GJWriteMessagePopup::updateText from 0x4ae718 to 0x4ae84e (310 bytes)
//
// 2 xrefs:
// > GJWriteMessagePopup::updateSubject @ 0x4ae884
// > GJWriteMessagePopup::updateBody @ 0x4ae8c8
//
// 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
//
int __fastcall GJWriteMessagePopup::updateText(GJWriteMessagePopup *a1, char **a2, int a3)
{
TextArea *m_textArea; // r4
char *v7; // r1
cocos2d::ccColor3B v9; // [sp+4h] [bp-18h]
_BYTE v10[4]; // [sp+8h] [bp-14h] BYREF
int v11; // [sp+Ch] [bp-10h] BYREF
int v12; // [sp+10h] [bp-Ch] BYREF
sub_776584((int)v10, (char *)&unk_939830);
if ( a3 )
{
sub_775D40(&a1->m_messageText, a2);
m_textArea = a1->m_messageInput->m_textArea;
v7 = "Message";
}
else
{
sub_775D40(&a1->m_subjectText, a2);
m_textArea = a1->m_subjectInput->m_textArea;
v7 = "Subject";
}
sub_7753D4((int)v10, v7);
if ( *((_DWORD *)*a2 - 3) )
{
if ( a3 == 1 )
{
((void (__fastcall *)(TextArea *, int))m_textArea->setScale)(m_textArea, 1065353216);
m_textArea->m_width = 290.0;
}
sub_776584((int)&v12, *a2);
TextArea::setString((int)m_textArea, &v12);
sub_774008(&v12);
TextArea::colorAllCharactersTo(m_textArea, (cocos2d::ccColor3B)-1);
}
else
{
sub_775C20(&v11);
TextArea::setString((int)m_textArea, &v11);
sub_774008(&v11);
*(_WORD *)&v9.r = -14136;
v9.b = -56;
TextArea::colorAllCharactersTo(m_textArea, v9);
if ( a3 == 1 )
{
((void (__fastcall *)(TextArea *, int))m_textArea->setScale)(m_textArea, 1065353216);
m_textArea->m_width = 290.0;
}
}
GJWriteMessagePopup::updateCharCountLabel(a1, a3);
return sub_774008(v10);
}