IsControlJustPressed - Doesn't work when SetNuiFocus is true


#1

I’m trying to enable a menu when a button is pressed and I’m trying to use IsControlJustPressed to detect a button being pressed. It works fine when I first press the button, the menu opens. The problem is that I can’t close it again using IsControlJustPressed.
Any way to get it to work?


#2

Either listen for the close key on the NUI side or move all key press logic to the lua side and don’t set SetNuiFocus


#3

Thanks, I’ll try it soon