mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-04-10 19:15:13 +00:00
Fixed an issue where text elements defined as gamecount using the systemdata property could not scroll horizontally
This commit is contained in:
parent
57a821e717
commit
63e9586d88
|
@ -72,6 +72,8 @@ void SystemView::goToSystem(SystemData* system, bool animate)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset horizontally scrolling text.
|
// Reset horizontally scrolling text.
|
||||||
|
for (auto& text : mSystemElements[mPrimary->getCursor()].gameCountComponents)
|
||||||
|
text->resetComponent();
|
||||||
for (auto& text : mSystemElements[mPrimary->getCursor()].textComponents)
|
for (auto& text : mSystemElements[mPrimary->getCursor()].textComponents)
|
||||||
text->resetComponent();
|
text->resetComponent();
|
||||||
|
|
||||||
|
@ -141,6 +143,9 @@ void SystemView::update(int deltaTime)
|
||||||
{
|
{
|
||||||
mPrimary->update(deltaTime);
|
mPrimary->update(deltaTime);
|
||||||
|
|
||||||
|
for (auto& text : mSystemElements[mPrimary->getCursor()].gameCountComponents)
|
||||||
|
text->update(deltaTime);
|
||||||
|
|
||||||
for (auto& text : mSystemElements[mPrimary->getCursor()].textComponents)
|
for (auto& text : mSystemElements[mPrimary->getCursor()].textComponents)
|
||||||
text->update(deltaTime);
|
text->update(deltaTime);
|
||||||
|
|
||||||
|
@ -226,6 +231,8 @@ std::vector<HelpPrompt> SystemView::getHelpPrompts()
|
||||||
void SystemView::onCursorChanged(const CursorState& state)
|
void SystemView::onCursorChanged(const CursorState& state)
|
||||||
{
|
{
|
||||||
// Reset horizontally scrolling text.
|
// Reset horizontally scrolling text.
|
||||||
|
for (auto& text : mSystemElements[mPrimary->getCursor()].gameCountComponents)
|
||||||
|
text->resetComponent();
|
||||||
for (auto& text : mSystemElements[mPrimary->getCursor()].textComponents)
|
for (auto& text : mSystemElements[mPrimary->getCursor()].textComponents)
|
||||||
text->resetComponent();
|
text->resetComponent();
|
||||||
|
|
||||||
|
@ -615,7 +622,8 @@ void SystemView::populate()
|
||||||
}
|
}
|
||||||
if (element.second.has("systemdata") &&
|
if (element.second.has("systemdata") &&
|
||||||
element.second.get<std::string>("systemdata").substr(0, 9) == "gamecount") {
|
element.second.get<std::string>("systemdata").substr(0, 9) == "gamecount") {
|
||||||
// A container can't be used if systemdata is set to a gamecount value.
|
// A vertical container can't be used if systemdata is set to a gamecount
|
||||||
|
// value. A horizontal container can be used though.
|
||||||
if (element.second.has("systemdata")) {
|
if (element.second.has("systemdata")) {
|
||||||
elements.gameCountComponents.emplace_back(
|
elements.gameCountComponents.emplace_back(
|
||||||
std::make_unique<TextComponent>());
|
std::make_unique<TextComponent>());
|
||||||
|
|
Loading…
Reference in a new issue