Leeched from ghbsys /jihad.
Underneath a 'basic' menu system with:
- menuitems with multiple custom states like: "Off" "On" or "Head" "Neck" "Spine"
- text menuitems (nonselectable)
- folder style items
- minimal code
A little better screenshot
Changes: version 1.2
- small bugfix contributed by Wieter20
Download the latest D3Dmenu files in the 2nd Post.
In Endscene you put
if (Mmax==0) RebuildMenu();
MenuShow(10,10,m_pFont); // show the menu at loc 10,10 with a specified font
MenuNav();
Somewhere in your code you define your menu like :
char sFPS[20]="xxx fps";
int CH_cheats = 1;
int CH_weap = 1;
int CH_stamina = 0;
int CH_fastammo = 1;
int CH_fasthealth = 0;
int CH_fastrepair = 0;
int CH_fastflag = 1;
int CH_nospread = 1;
int CH_norecoil = 1;
int CH_unlammo = 1;
// none standard options
char *sStamina[] = { "Off","Stealth","Full" };
void RebuildMenu(void)
{
strcpy(Mtitle,"== D3Dmenu by Hans211 ==");
MenuAddItem("[cheats]", Moptfolder, &CH_cheats, 2, MENUFOLDER);
if (CH_cheats) {
MenuAddItem("Stamina" , sStamina , &CH_stamina , 3, MENUITEM);
MenuAddItem("Fast ammo" , Moptonoff , &CH_fastammo , 2, MENUITEM);
MenuAddItem("Fast health" , Moptonoff , &CH_fasthealth, 2, MENUITEM);
MenuAddItem("Fast repair" , Moptonoff , &CH_fastrepair, 2, MENUITEM);
MenuAddItem("Fast flag" , Moptonoff , &CH_fastflag , 2, MENUITEM);
}
MenuAddItem("[Weapons]", Moptfolder, &CH_weap, 2, MENUFOLDER);
if (CH_weap) {
MenuAddItem("No spread" , Moptonoff , &CH_nospread, 2, MENUITEM);
MenuAddItem("No recoil" , Moptonoff , &CH_norecoil, 2, MENUITEM);
MenuAddItem("Unlimited ammo", Moptonoff , &CH_unlammo , 2, MENUITEM);
}
MenuAddItem("Framerate" , (char **)sFPS , 0,0,MENUTEXT);
}
Its just basic but it can be easily enhanced...