mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-04-10 19:15:13 +00:00
Fixed a typo for a variable name
This commit is contained in:
parent
4c665f5f1d
commit
157a8c87c0
|
|
@ -938,25 +938,24 @@ template <typename T> void CarouselComponent<T>::render(const glm::mat4& parentT
|
|||
}
|
||||
|
||||
float itemHorizontalOffset {0.0f};
|
||||
float itemVerticallOffset {0.0f};
|
||||
float itemVerticalOffset {0.0f};
|
||||
|
||||
if ((mSelectedItemOffset.x != 0.0f || mSelectedItemOffset.y != 0.0f) &&
|
||||
std::fabs(distance) < 1.0f) {
|
||||
itemHorizontalOffset = (1.0f - std::fabs(distance)) * mSelectedItemOffset.x;
|
||||
itemVerticallOffset = (1.0f - std::fabs(distance)) * mSelectedItemOffset.y;
|
||||
itemVerticalOffset = (1.0f - std::fabs(distance)) * mSelectedItemOffset.y;
|
||||
}
|
||||
|
||||
glm::mat4 itemTrans {carouselTrans};
|
||||
if (singleEntry)
|
||||
itemTrans = glm::translate(carouselTrans, glm::vec3 {xOff + itemHorizontalOffset,
|
||||
yOff + itemVerticallOffset, 0.0f});
|
||||
yOff + itemVerticalOffset, 0.0f});
|
||||
else
|
||||
itemTrans = glm::translate(
|
||||
itemTrans,
|
||||
glm::vec3 {(i * itemSpacing.x) + xOff + itemHorizontalOffset +
|
||||
selectedItemMargins.x,
|
||||
(i * itemSpacing.y) + yOff + itemVerticallOffset + selectedItemMargins.y,
|
||||
0.0f});
|
||||
glm::vec3 {
|
||||
(i * itemSpacing.x) + xOff + itemHorizontalOffset + selectedItemMargins.x,
|
||||
(i * itemSpacing.y) + yOff + itemVerticalOffset + selectedItemMargins.y, 0.0f});
|
||||
|
||||
if (mType == CarouselType::HORIZONTAL_WHEEL)
|
||||
itemTrans = glm::rotate(itemTrans, glm::radians(-90.0f), glm::vec3 {0.0f, 0.0f, 1.0f});
|
||||
|
|
|
|||
Loading…
Reference in a new issue