HUD Button image updating question

How do I force a Button image to update, modify the displayed image do to something that was not a mouse interaction.

In my game somethings are enabled, by solving a puzzle for example. I want to change a button label to reflect the enabled/disable status. Just reseeting the default background does not seem to change the button image until a mouse interaction occurs

I will check this tomorrow. It needs special support, which I will add.


Maybe you can simply use a test-less checkbox. Haven’t chacked it, but maybe, it does exactly what you want.

I added an update() method to the Button class, which simply updates the Button Texture display.

And there’s a new ToggleButtonWidget, that extends Button and keeps pressed, when it’s clicked and gets normal again, when it’s clicked again. It has an additional method called isToggled() and setToggled(boolean).

Hope, this helps you :).