mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 22:25:38 +00:00
Removed some deprecated code from CarouselComponent.
This commit is contained in:
parent
d12be86043
commit
f9779ded9a
|
@ -1132,17 +1132,11 @@ void CarouselComponent<T>::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TEMPORARY: Support for itemType is for backward compatiblity due to property name changes.
|
if (mGamelistView && properties && elem->has("imageType")) {
|
||||||
if (mGamelistView && properties && (elem->has("imageType") || elem->has("itemType"))) {
|
|
||||||
const std::vector<std::string> supportedImageTypes {
|
const std::vector<std::string> supportedImageTypes {
|
||||||
"marquee", "cover", "backcover", "3dbox", "physicalmedia",
|
"marquee", "cover", "backcover", "3dbox", "physicalmedia",
|
||||||
"screenshot", "titlescreen", "miximage", "fanart", "none"};
|
"screenshot", "titlescreen", "miximage", "fanart", "none"};
|
||||||
std::string imageTypesString;
|
std::string imageTypesString {elem->get<std::string>("imageType")};
|
||||||
|
|
||||||
if (elem->has("imageType"))
|
|
||||||
imageTypesString = elem->get<std::string>("imageType");
|
|
||||||
else
|
|
||||||
imageTypesString = elem->get<std::string>("itemType");
|
|
||||||
|
|
||||||
for (auto& character : imageTypesString) {
|
for (auto& character : imageTypesString) {
|
||||||
if (std::isspace(character))
|
if (std::isspace(character))
|
||||||
|
@ -1275,24 +1269,6 @@ void CarouselComponent<T>::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
||||||
if (elem->has("itemScale"))
|
if (elem->has("itemScale"))
|
||||||
mItemScale = glm::clamp(elem->get<float>("itemScale"), 0.2f, 3.0f);
|
mItemScale = glm::clamp(elem->get<float>("itemScale"), 0.2f, 3.0f);
|
||||||
|
|
||||||
if (elem->has("itemInterpolation")) {
|
|
||||||
// TEMPORARY: Backward compatiblity due to property name changes.
|
|
||||||
const std::string& itemInterpolation {elem->get<std::string>("itemInterpolation")};
|
|
||||||
if (itemInterpolation == "linear") {
|
|
||||||
mLinearInterpolation = true;
|
|
||||||
}
|
|
||||||
else if (itemInterpolation == "nearest") {
|
|
||||||
mLinearInterpolation = false;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
mLinearInterpolation = true;
|
|
||||||
LOG(LogWarning) << "CarouselComponent: Invalid theme configuration, property "
|
|
||||||
"\"itemInterpolation\" for element \""
|
|
||||||
<< element.substr(9) << "\" defined as \"" << itemInterpolation
|
|
||||||
<< "\"";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (elem->has("imageBrightness"))
|
if (elem->has("imageBrightness"))
|
||||||
mImageBrightness = glm::clamp(elem->get<float>("imageBrightness"), -2.0f, 2.0f);
|
mImageBrightness = glm::clamp(elem->get<float>("imageBrightness"), -2.0f, 2.0f);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue