mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 14:15: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"))
|
||||
setRotationDegrees(elem->get<float>("rotation"));
|
||||
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"))
|
||||
|
|
Loading…
Reference in a new issue