Added support for more imageSource types to the Grid view style.

This commit is contained in:
Leon Styhre 2021-03-21 11:24:34 +01:00
parent a6c3cb9798
commit 3355d6f208
2 changed files with 21 additions and 1 deletions

View file

@ -241,8 +241,16 @@ const std::string GridGameListView::getImagePath(FileData* file)
if (src == ImageSource::IMAGE)
return file->getImagePath();
else if (src == ImageSource::MIXIMAGE)
return file->getMiximagePath();
else if (src == ImageSource::SCREENSHOT)
return file->getScreenshotPath();
else if (src == ImageSource::COVER)
return file->getCoverPath();
else if (src == ImageSource::MARQUEE)
return file->getMarqueePath();
else if (src == ImageSource::BOX3D)
return file->get3DBoxPath();
// If no thumbnail was found, then use the image media type.
if (file->getThumbnailPath() == "")

View file

@ -25,7 +25,11 @@ enum ScrollDirection {
enum ImageSource {
THUMBNAIL,
IMAGE,
MARQUEE
MIXIMAGE,
SCREENSHOT,
COVER,
MARQUEE,
BOX3D
};
struct ImageGridData {
@ -287,8 +291,16 @@ void ImageGridComponent<T>::applyTheme(const std::shared_ptr<ThemeData>& theme,
auto direction = elem->get<std::string>("imageSource");
if (direction == "image")
mImageSource = IMAGE;
else if (direction == "miximage")
mImageSource = MIXIMAGE;
else if (direction == "screenshot")
mImageSource = SCREENSHOT;
else if (direction == "cover")
mImageSource = COVER;
else if (direction == "marquee")
mImageSource = MARQUEE;
else if (direction == "3dbox")
mImageSource = BOX3D;
else
mImageSource = THUMBNAIL;
}