Solved how to lock navigation keys when d3d menu is hidden

Hexui Undetected CSGO Cheats PUBG Accounts

madskills

Newbie
Oct 28, 2012
4
212
0
how to lock navigation keys when d3d menu is hidden?
below is the code im using for key navigation.
TIA :)


{
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);

} else if (GetAsyncKeyState(VK_DOWN)&1) {
do {
Mpos++;
if (Mpos==Mmax) Mpos=0;
} while (MENU[Mpos]->typ==MENUTEXT);

} else if (MENU[Mpos]->var) {
int dir=0;

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;
if (MENU[Mpos]->typ==MENUCAT) Mmax=0;
}
}
}
C++:
 

c5

Kim Kong Trasher
Dank Tier VIP
Dank Tier Donator
Jul 19, 2012
1,183
19,938
76
Yes, I understood your question. You might want to check whether your variable Mvisible is working correctly since on the 3rd line you have a statement pretty much saying: "If menu is NOT visible, skip everything below in the function and return from it". So it seems okay from here

it's just a simple if statement, learn how to code
 
Last edited by a moderator:

AlexSleyore

Coder
Full Member
Nobleman
Oct 29, 2012
100
613
1
I would assume that depends on the game.. there is more then likely a built in Lock Keys address that gets set when you bring up the escape menu, you could look for that.
 

c5

Kim Kong Trasher
Dank Tier VIP
Dank Tier Donator
Jul 19, 2012
1,183
19,938
76
It should lock the navigation keys, since line3 returns from the function if the menu is hidden
 

AlexSleyore

Coder
Full Member
Nobleman
Oct 29, 2012
100
613
1
It should lock the navigation keys, since line3 returns from the function if the menu is hidden
and thats why I misread and though he wanted to lock the games movements (so you dont walk around like a dip turning stuff on and off..) but yeah your right on your reading.
 

madskills

Newbie
Oct 28, 2012
4
212
0
maybe i ll re phrase my question :D
.Every time the menu is hidden when i toggle arrow keys , items in the menu turns on/off.
now my question is
how to lock navigation keys (on the menu itself) when d3d menu is hidden.
 

madskills

Newbie
Oct 28, 2012
4
212
0
tried to reverse show/hide state . it did lock arrow keys when menu shown
weird thing when i turn it back , some of the menu items still can be toggled when menu is hidden :confused:


@siM
tried ur suggestion menu blinking still same problem
 
Community Mods