New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImageButton doesn't show an image at center when background props: up, down are set. #7298
Comments
I use ImageButton all the time in the way you describe. Can you provide a skin and simple project that demonstrates the issue? |
@raeleus I can't because it's a commerсial project. But this issue is easy to recreate in empty libgdx project. If you want, I will recreate it. |
Yes, please do. |
It is caused by hight differencies in button background (down) and button foreground (imageDown) size. |
I can't find where it is, but it is probably in |
Issue details
ImageButton doesn't show an image when background props: up, down are set. The only possible way to show an image at center of an ImageButton is do not set background properties.
Reproduction steps/code
Create the style in uiskin.json
Then create a button:
In the end you'll see a button without an image at center, which specified in the default style.
Version of libGDX and/or relevant dependencies
1.12.1
Stacktrace
//Please provide the stacktrace if applicable
Please select the affected platforms
The text was updated successfully, but these errors were encountered: