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
131 stars 35 forks source link

Console only shows first time #27

Closed bladecoder closed 6 years ago

bladecoder commented 6 years ago

Hi,

I updated from 0.5.3 to 0.7.0 and now the console only shows the first time I push the assigned key.

In my case I have set the key with console.setDisplayKeyID(Keys.F1);

Steps to reproduce it:

  1. Push F1 -> the console shows
  2. Push F1 -> the console hides
  3. Push F1 -> the console doesn't show anymore.

Best Regards.

aitor3ml commented 6 years ago

same thing happens to me

aitor3ml commented 6 years ago

Manual toggle in Stage.keyDown will do the trick until we get an answer.

@Override
public boolean keyDown(int keyCode) {
    if (keyCode == console.getDisplayKeyID()) {
        console.setVisible(!console.isVisible());
        return true;
    }
    // ... rest of the code
StrongJoshua commented 6 years ago

I am currently without a computer, but I will investigate this as soon as I am able.

StrongJoshua commented 6 years ago

This should be fixed in 0.7.1 Please let me know of any other issues should they arise!