Some in-game ESC Menu info/pointers, useful when u want to create own menu. Credits to Gnarmock for main idea I've seen in his AutoTele.
struct D2Menu // size 0x18
{
DWORD dwEntriesNo; //0x00
DWORD dwInterline; //0x04
DWORD dwTextHeight; //0x08
DWORD dwMenuOffset; //0x0C
DWORD dwBarHeight; //0x10
DWORD _1; //0x14 unused?
};
struct D2MenuEntry //size 0x550, array[dwEntriesNo]
{
DWORD dwMenuType; //0x00 //-1 - static text, 0 -selectable, 1- switchbar , 2- with bar
DWORD dwExpansion; //0x04 //if set, shows only in d2exp
DWORD dwYOffset; //0x08 //generated dynamically
char szCellFile[260]; //0x0C DATA\\LOCAL\\UI\\LANG\\%s used only in LoadMenu Func
BOOL (__fastcall* EnableCheck)(D2MenuEntry*); //0x110 if return false, its disabled
BOOL (__fastcall* OnPress)(D2MenuEntry*); //0x114 these all are __thiscall funcs
BOOL (__fastcall* OptionHandle)(D2MenuEntry*); //0x118 called when option value is changed
BOOL (__fastcall* ChangeHandle)(D2MenuEntry*); //0x11C if return true OnPress is called, and option gfx is switched
union {
DWORD dwMaxValue; //0x120
DWORD dwSwitchesNo; //0x120 (max 4)
}
union {
DWORD dwCurrentValue; //0x124
DWORD dwCurrentSwitch;
}
DWORD dwBarType; //0x128
char szSwitchCellFiles[4][260]; //0x12C DATA\\LOCAL\\UI\\LANG\\%s used only in LoadMenu Func
CellFile* ptCellFile; //0x53C
CellFile* ptSwitchCellFile[4]; //0x540
};
D2FUNCPTR(D2CLIENT, InitD2Menu, int __stdcall, (D2Menu * ptD2Menu, D2MenuEntry *ptD2MenuEntry),0x63E90) // it loads cellfiles
DeleteD2Menu(D2MenuEntry*<eax>, D2Menu*<ecx>), 0x63270 //used automatically
D2VARPTR(D2CLIENT, SelectedMenu, int, 0x11C058)
D2VARPTR(D2CLIENT, D2Menu, D2Menu*, 0x11C05C)
D2VARPTR(D2CLIENT, D2MenuEntries, D2MenuEntry*, 0x11C060)
D2FUNCPTR(D2WIN, LoadCellFile, CellFile* __fastcall, (const char* szFile, int Type), -10180) //Non-asm LoadCellFile func