Block all input while console is opened (45858)

I’ve created a console GUI, but the problem is that when I type some text into it, my character moves and everything too. Is there a way to block the input to everything except the console while it is opened?

1 Answer

1

public static class InputManager {
public staic bool BlockInput;
}

  • When the console is open, set InputManager.BlockInput to true;
  • In your game loop, check is BlockInput is true, if so do not read input.

Do I actually have to create an Input Manager for this to work? It would be nice if I could do this in the Input class.

as in instantiate? no.