StrongJoshua / libgdx-inGameConsole

A LibGdx library that allows a developer to add a console (similar to how it is featured in Source games) to their game.
https://www.strongjoshua.net/projects/games/libgdx-ingame-console
Apache License 2.0
132 stars 34 forks source link

Enhancement - hook for open/close console #56

Open aurumvorax opened 4 years ago

aurumvorax commented 4 years ago

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

StrongJoshua commented 4 years ago

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.

aurumvorax commented 4 years ago

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 :)