I would like to tweak the BGUI, so the text_input widget would swap the color from highlighted to inactive after it has been deactivated by the mouse.

I realized that the color changes to inactive after pressing the enter key, but not after klicking with the mouse somewhere else on the screen.

Could you help me with that, please?

Thanks in advance. Eugene


1 Answer 1


I couldn't fix the BGUI to solve the problem, but I found a workaround for this.

Set a Left Mouse Button Sensor and connect it to a python controller that activates a callback function.

if not own['sys'].layout.input._active == 1:
        own['sys'].layout.input.text = own['sys'].layout.input.text

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .