I got an issue and can't figure an solution for it, I'am making imagebutton and imagebutton has an option to set imageUp and atm I was getting the drawable like this:
redButton.imageUp = skin.getDrawable("LogoutIcon");
But I want to get drawable from assets folder .png file, that I could make button with more icons not overloading the packed texture size.
So the question, is there a way to make an drawable ? from texture, image ?
As far as I know there currently isn't an elegant way to do this. This is the easiest way I've found so far:
someButtonStyle.imageUp = new TextureRegionDrawable(new TextureRegion(someTexture));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With