libgdx-inGameConsole icon indicating copy to clipboard operation
libgdx-inGameConsole copied to clipboard

Enhancement - hook for open/close console

Open aurumvorax opened this issue 5 years ago • 2 comments

Basically, I'd like to pause my game while the console is open. Can we perhaps get an empty protected method in CommandExecutor that gets called when the console is opened or closed? If this is of interest, I could create a PR

aurumvorax avatar Sep 14 '20 06:09 aurumvorax

You could hack this by creating your input multiplexer on top of the Console's one, then on receiving the open/close key event, first pause the game, then let the event propagate to the console. I haven't tested this, and it would be a bit hacky, but could be a good interim solution. However, I'm not opposed to a hook of sorts for console events.

StrongJoshua avatar Sep 20 '20 19:09 StrongJoshua

That's what I've done so far, but I'll come up with a PR for a cleaner way at some point. Just wanted to check before I started on the work :)

aurumvorax avatar Sep 20 '20 21:09 aurumvorax