mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-31 04:25:40 +00:00
Added a 'containerScrollGap' property to the text element
This commit is contained in:
parent
f463ee7d7b
commit
4a390fb8e0
|
@ -397,6 +397,7 @@ std::map<std::string, std::map<std::string, ThemeData::ElementPropertyType>>
|
||||||
{"containerScrollSpeed", FLOAT},
|
{"containerScrollSpeed", FLOAT},
|
||||||
{"containerStartDelay", FLOAT},
|
{"containerStartDelay", FLOAT},
|
||||||
{"containerResetDelay", FLOAT},
|
{"containerResetDelay", FLOAT},
|
||||||
|
{"containerScrollGap", FLOAT},
|
||||||
{"fontPath", PATH},
|
{"fontPath", PATH},
|
||||||
{"fontSize", FLOAT},
|
{"fontSize", FLOAT},
|
||||||
{"horizontalAlignment", STRING},
|
{"horizontalAlignment", STRING},
|
||||||
|
|
|
@ -595,6 +595,9 @@ void TextComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
||||||
mScrollDelay =
|
mScrollDelay =
|
||||||
glm::clamp(elem->get<float>("containerStartDelay"), 0.0f, 10.0f) * 1000.0f;
|
glm::clamp(elem->get<float>("containerStartDelay"), 0.0f, 10.0f) * 1000.0f;
|
||||||
}
|
}
|
||||||
|
if (elem->has("containerScrollGap")) {
|
||||||
|
mScrollGap = glm::clamp(elem->get<float>("containerScrollGap"), 0.1f, 5.0f);
|
||||||
|
}
|
||||||
mHorizontalScrolling = true;
|
mHorizontalScrolling = true;
|
||||||
}
|
}
|
||||||
else if (containerType != "vertical") {
|
else if (containerType != "vertical") {
|
||||||
|
|
Loading…
Reference in a new issue