My menu navigation sensitivity

Posts 1–2 of 2 · Page 1 of 1
My menu navigation sensitivity
My up,down,right,left (basic navigation) source for my menu is not sensitive enough. What I mean is when I hit the up arrow I have to hit it like 3 times to go up. Its really annoying. So I changed the if (GetAsyncKeyState(VK_DOWN)&1) to if (GetAsyncKeyState(VK_DOWN)) and now its WAY to sensitive. I touch the up arrow and it goes up like 3 or 4 SUPER FAST. Can anyone please fix this bug or whatever or tell me how to fix it? Dont like releasing things that dont work 100% perfect. Thanks for whoever helps
void D3D9Menu::MenuNav(void)
{
if (GetAsyncKeyState(VK_INSERT)&1) Mvisible=(!Mvisible);
if (!Mvisible) return;

if (GetAsyncKeyState(VK_UP)&1) {
do {
Mpos--;
if (Mpos<0) Mpos=Mmax-1;
} while (MENU[Mpos]->typ==MENUTEXT); // skip textitems
} else if (GetAsyncKeyState(VK_DOWN)&1) {
do {
Mpos++;
if (Mpos==Mmax) Mpos=0;
} while (MENU[Mpos]->typ==MENUTEXT); // skip textitems
} else if (MENU[Mpos]->var) {
int dir=0;
// bugfix: thx to ***-Wieter20
if (GetAsyncKeyState(VK_LEFT )&1 && *MENU[Mpos]->var > 0 ) dir=-1;
if (GetAsyncKeyState(VK_RIGHT)&1 && *MENU[Mpos]->var < (MENU[Mpos]->maxvalue-1)) dir=1;
if (dir) {
*MENU[Mpos]->var += dir;
if (MENU[Mpos]->typ==MENUFOLDER) Mmax=0; // change on menufolder, force a rebuild
}
}
}

ALSO:::: If anyone is a designer or has a 2d sprite thats clean (no names or whatever), can you tell me or msg me if you can make one or post the picture here? Thanks . Dont need the bytes or anything and just 1 image will do. I will slice it to get bytes for header,body,footer.
Try:

Code:
    if (GetAsyncKeyState(VK_UP)&1) {
		do {
			My_Position--;
			if (My_Position<0)  My_Position=Mmax-1;
		} while (MENU[My_Position]->typ==MENUTEXT);	
  } else if (GetAsyncKeyState(VK_DOWN)&1) {
		do {
			My_Position++;
		    if (My_Position==Mmax) My_Position=0;
		} while (MENU[My_Position]->typ==MENUTEXT);		
  } else if (MENU[My_Position]->var) {
		int dir=0;

		if (GetAsyncKeyState(VK_LEFT )&1 && *MENU[My_Position]->var > 0                      ) dir=-1;
		if (GetAsyncKeyState(VK_RIGHT)&1 && *MENU[My_Position]->var < (MENU[My_Position]->maxvalue-1)) dir=1;
		if (dir) {
			*MENU[My_Position]->var += dir;
			if (MENU[My_Position]->typ==MENUFOLDER)	Mmax=0;
		}
Also, goto KarraKa base, & Get the sprite method and give full credits to him for that and i could mabye desing your sprite im good at desinging, my menu coming soon i done a full update!
Posts 1–2 of 2 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us