[DiscordArchive] You set what, a name, body and icon?
[DiscordArchive] You set what, a name, body and icon?
Archived author: Natrist • Posted: 2025-05-30T21:11:25.790000+00:00
Original source
You set what, a name, body and icon?
Archived author: Kaev • Posted: 2025-05-30T21:12:24.744000+00:00
Original source
yes
Archived author: Peacy • Posted: 2025-05-30T21:13:37.863000+00:00
Original source
yeah
tr(&CGUIMacros::m_macros, index);Archived author: Natrist • Posted: 2025-05-30T21:43:34.922000+00:00
Original source
```C++
void __cdecl CGUIMacros::EditMacro(int index, const char *name, const char *iconPath, const char *body)
{
MACRONODE *macro;
macro = TSHashTable<MACRONODE,HASHKEY_NONE>:
tr(&CGUIMacros::m_macros, index);
if (macro)
{
if (name)
SStrCopy(macro->m_name, name, 64u);
if (iconPath)
SStrCopy(macro->m_text, iconPath, 256u);
if (body)
CGUIMacros::SetMacroBody(macro, body);
CGUIMacros::m_saveMacros = 1;
CGUIMacros::SortMacros();
CGActionBar::UpdateMacro(index);
}
}
```
Archived author: Peacy • Posted: 2025-05-30T21:46:35.978000+00:00
Original source
Thanks! ❤️
Archived author: Natrist • Posted: 2025-05-30T21:49:23.106000+00:00
Original source
Maybe double check the icon path thing because I didn’t really confirm it, but at first glance that’s what it should be… I think.
Archived author: Natrist • Posted: 2025-05-30T21:49:53.854000+00:00
Original source
The thing I don’t get is why it’s set to 256 because file paths are usually 260 wide…
Archived author: Peacy • Posted: 2025-05-30T21:50:15.048000+00:00
Original source
yea, I just get unable to read string
Archived author: Peacy • Posted: 2025-05-30T21:50:19.812000+00:00
Original source
when I try to test it out
Archived author: Natrist • Posted: 2025-05-30T21:50:39.930000+00:00
Original source
Sometimes different devs worked on different systems that tied in together and they implemented things differently. Maybe that’s one such case.