diff --git a/core/src/cz/nic/tablexia/screen/halloffame/HallOfFameScreen.java b/core/src/cz/nic/tablexia/screen/halloffame/HallOfFameScreen.java index 220c010e6db62aa070b8f3a8977b32ab9a34f06b..6c7210ad9bee575b78e31a3979b3c7401fd2e6d1 100644 --- a/core/src/cz/nic/tablexia/screen/halloffame/HallOfFameScreen.java +++ b/core/src/cz/nic/tablexia/screen/halloffame/HallOfFameScreen.java @@ -170,12 +170,9 @@ public class HallOfFameScreen extends AbstractTablexiaScreen<Void> { trophies.addAll(Arrays.asList(UserTrophyDefinition.values())); for (final ITrophyDefinition trophy : trophies) { - // prepare only trophies which user obtains - if (!trophy.hasTrophy(TablexiaSettings.getInstance().getSelectedUser())) { - continue; - } + TrophyHelper.TrophyType trophyType = trophy.hasTrophy(TablexiaSettings.getInstance().getSelectedUser()) ? TrophyHelper.TrophyType.FULL : TrophyHelper.TrophyType.EMPTY; - final TextureRegion texture = getScreenTextureRegion(TrophyHelper.getFullPath(trophy.getTrophyName(), TrophyHelper.TrophyType.FULL)); + final TextureRegion texture = getScreenTextureRegion(TrophyHelper.getFullPath(trophy.getTrophyName(), trophyType)); final Image trophyImage = new Image(texture); trophyImage.addListener(new ClickListener() { diff --git a/core/src/cz/nic/tablexia/util/ui/dialog/ImageDialog.java b/core/src/cz/nic/tablexia/util/ui/dialog/ImageDialog.java index 1cbcf936bec37a066f4882ba60a3ce26ca0d99f5..f1fad997703a3e01f04128cf4e20d3f8d8fc181d 100644 --- a/core/src/cz/nic/tablexia/util/ui/dialog/ImageDialog.java +++ b/core/src/cz/nic/tablexia/util/ui/dialog/ImageDialog.java @@ -33,7 +33,7 @@ public class ImageDialog extends TextDialog { float textureMaxHeight = getHeight()/2; float textureMaxWidth = getWidth()-20;//20 is approx the padding from both sides - float textureMeasureRatio = (float)texture.getRegionWidth() / (float)texture.getRegionWidth(); + float textureMeasureRatio = (float)texture.getRegionHeight() / (float)texture.getRegionWidth(); float textureNewWidth = texture.getRegionWidth() * sizeRatioToOriginalSize; float textureNewHeight = textureNewWidth*textureMeasureRatio; if(textureNewHeight>textureMaxHeight){