mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 23:55:38 +00:00
Added clamping of 0.0 to 1.0 to the rotationOrigin property.
This commit is contained in:
parent
496b60fa7d
commit
eced44934e
|
@ -361,7 +361,7 @@ void GuiComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
||||||
if (elem->has("rotation"))
|
if (elem->has("rotation"))
|
||||||
setRotationDegrees(elem->get<float>("rotation"));
|
setRotationDegrees(elem->get<float>("rotation"));
|
||||||
if (elem->has("rotationOrigin"))
|
if (elem->has("rotationOrigin"))
|
||||||
setRotationOrigin(elem->get<glm::vec2>("rotationOrigin"));
|
setRotationOrigin(glm::clamp(elem->get<glm::vec2>("rotationOrigin"), 0.0f, 1.0f));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (properties & ThemeFlags::Z_INDEX && elem->has("zIndex"))
|
if (properties & ThemeFlags::Z_INDEX && elem->has("zIndex"))
|
||||||
|
|
Loading…
Reference in a new issue