From 6e31f17c3bae454165b62be04ee697e0e3857b16 Mon Sep 17 00:00:00 2001 From: Aloshi Date: Sat, 17 Nov 2012 11:29:20 -0600 Subject: [PATCH] Fixed the default game image size to properly fit within the info column. --- THEMES.md | 2 +- changelog.txt | 3 +++ src/components/GuiGameList.cpp | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/THEMES.md b/THEMES.md index 62172a284..b0016dab9 100644 --- a/THEMES.md +++ b/THEMES.md @@ -87,7 +87,7 @@ Display tags define some "meta" display attributes about your theme. Display tag `` - two values for the position of the game art, in the form of `[x] [y]`, as a percentage. Default is `$infoWidth/2 $headerHeight`. -`` - two values for the dimensions of the game art, in the form of `[width] [height]`, as a percentage of the screen. Default is `$infoWidth/2 0` (width fits within the info column). The image will only be resized if at least one axis is nonzero *and* exceeded by the image's size. You should always leave at least one axis as zero to preserve the aspect ratio. +`` - two values for the dimensions of the game art, in the form of `[width] [height]`, as a percentage of the screen. Default is `$infoWidth 0` (width fits within the info column). The image will only be resized if at least one axis is nonzero *and* exceeded by the image's size. You should always leave at least one axis as zero to preserve the aspect ratio. `` - two values for the origin of the game art, in the form of `[x] [y]`, as a percentage. Default is `0.5 0` (top-center of the image). diff --git a/changelog.txt b/changelog.txt index 405627c5d..2b206f4d3 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,6 @@ +November 17 +-Fixed default game image resizing if none is defined. + November 14 -Added Exit command to the menu. diff --git a/src/components/GuiGameList.cpp b/src/components/GuiGameList.cpp index 8fa6f28f4..7fbb7991a 100644 --- a/src/components/GuiGameList.cpp +++ b/src/components/GuiGameList.cpp @@ -23,7 +23,7 @@ GuiGameList::GuiGameList(bool useDetail) { mList = new GuiList(Renderer::getScreenWidth() * sInfoWidth, Renderer::getDefaultFont(Renderer::LARGE)->getHeight() + 2, Renderer::getDefaultFont(Renderer::MEDIUM)); - mScreenshot = new GuiImage(Renderer::getScreenWidth() * mTheme->getGameImageOffsetX(), Renderer::getScreenHeight() * mTheme->getGameImageOffsetY(), "", Renderer::getScreenWidth() * sInfoWidth * 0.7, 0, false); + mScreenshot = new GuiImage(Renderer::getScreenWidth() * mTheme->getGameImageOffsetX(), Renderer::getScreenHeight() * mTheme->getGameImageOffsetY(), "", mTheme->getGameImageWidth(), mTheme->getGameImageHeight(), false); mScreenshot->setOrigin(mTheme->getGameImageOriginX(), mTheme->getGameImageOriginY()); //addChild(mScreenshot);