i condensed the navigation to this, and it no longer lags-
Code:
int MenuSelection=0;
bool Menu = false;
/////////HOW MANY HACKS IN YOUR MENU GOES HERE//////////
int itemsinmenu = 2;
//Hack Variables
bool f[14];
if(GetAsyncKeyState(VK_INSERT)&1){
Menu =! Menu;
}
if(Menu && ((GetAsyncKeyState(VK_UP)&1))){
if(MenuSelection > 0)
MenuSelection--;
}
if(Menu && ((GetAsyncKeyState(VK_DOWN)&1))){
if(MenuSelection < itemsinmenu-1)
MenuSelection++;
}
if(Menu && ((GetAsyncKeyState(VK_RIGHT)&1))){
if(Menu){
f[MenuSelection] = !f[MenuSelection];
}
}
if(Menu && ((GetAsyncKeyState(VK_LEFT)&1))){
if(Menu){
f[MenuSelection] = !f[MenuSelection];
}
}
And then i wrote a little function to add items to the menu-
Code:
void addopt(int y,bool *var, char *txt,LPDIRECT3DDEVICE9 pDevice)
{
if(*var)
{
DrawText(31,y,Green,txt,pDevice);
DrawText(260,y,Green,"On",pDevice);
}
else
{
DrawText(31,y,Red,txt ,pDevice);
DrawText(258,y,Green,"Off",pDevice);
}
You'll have to figure out the rest. If you cant, then you shouldn't be making a hack.