Merge pull request #643 from sethtroll/fiximagecomponent
image component: fix images being off-centered
This commit is contained in:
@@ -118,7 +118,7 @@ public class ImagePanelComponent implements RenderableEntity
|
||||
int imageOffsetX = ((width - imageWidth) / 2) - (SEPARATOR / 2);
|
||||
for (final BufferedImage image : images)
|
||||
{
|
||||
graphics.drawImage(image, imageOffsetX + ((width / images.size()) - image.getWidth()) / 2, y, null);
|
||||
graphics.drawImage(image, imageOffsetX + ((imageWidth / images.size()) - image.getWidth()) / 2, y, null);
|
||||
imageOffsetX += image.getWidth() + SEPARATOR;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user