0
$\begingroup$

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

$\endgroup$
1
$\begingroup$

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
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.