mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-21 21:55:38 +00:00
Made it possible to set negative values for the selectedItemMargins carousel property.
This commit is contained in:
parent
2501a0aa26
commit
6c8985fe3e
|
@ -1261,7 +1261,7 @@ void CarouselComponent<T>::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
|||
if (mType == CarouselType::HORIZONTAL || mType == CarouselType::VERTICAL) {
|
||||
if (elem->has("selectedItemMargins")) {
|
||||
const glm::vec2 selectedItemMargins {
|
||||
glm::clamp(elem->get<glm::vec2>("selectedItemMargins"), 0.0f, 1.0f)};
|
||||
glm::clamp(elem->get<glm::vec2>("selectedItemMargins"), -1.0f, 1.0f)};
|
||||
if (mType == CarouselType::HORIZONTAL)
|
||||
mSelectedItemMargins = selectedItemMargins * Renderer::getScreenWidth();
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue