TextField is passing keys through. How to disable it?

Anything libgdx related goes here!

TextField is passing keys through. How to disable it?

Postby Betalord » Sat Nov 12, 2016 11:43 am

My problem is this:
I have a TextField which I add to my UI stage. Now, I have several InputListeners/gesture detectors etc. multiplexed, but the UI stage is on top.
My problem is this: when I type words into TextField, those key pressed are passed on, so that my other input listeners receive it, which is obviously not something I want. Now my question is, how to disable this behavior? I want keys typed into TextField to stay there and not be passed through.
Betalord
 
Posts: 11
Joined: Wed Oct 26, 2016 1:01 pm

Re: TextField is passing keys through. How to disable it?

Postby Betalord » Sat Nov 12, 2016 11:53 am

Never mind, I figured why keys got "passed" through. I was using "if (Gdx.input.isKeyJustPressed(Input.Keys.N)) ... " in my game loop :)
Betalord
 
Posts: 11
Joined: Wed Oct 26, 2016 1:01 pm


Return to Libgdx

Who is online

Users browsing this forum: Google [Bot] and 1 guest