mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-26 16:15:39 +00:00
Adjusted the game description text scrolling parameters.
This commit is contained in:
parent
b6e29d503c
commit
8b18022752
|
@ -65,7 +65,13 @@ GuiScraperSearch::GuiScraperSearch(
|
||||||
|
|
||||||
// Selected result description and container.
|
// Selected result description and container.
|
||||||
mDescContainer = std::make_shared<ScrollableContainer>(mWindow);
|
mDescContainer = std::make_shared<ScrollableContainer>(mWindow);
|
||||||
mDescContainer->setScrollParameters(1500, 1000, 11, AUTO_WIDTH_MOD);
|
|
||||||
|
// Adjust the game description text scrolling parameters depending on the search type.
|
||||||
|
if (mSearchType == NEVER_AUTO_ACCEPT)
|
||||||
|
mDescContainer->setScrollParameters(1500, 1500, 11, AUTO_WIDTH_MOD);
|
||||||
|
else
|
||||||
|
mDescContainer->setScrollParameters(4000, 1500, 11, AUTO_WIDTH_MOD);
|
||||||
|
|
||||||
mResultDesc = std::make_shared<TextComponent>(mWindow, "Result desc",
|
mResultDesc = std::make_shared<TextComponent>(mWindow, "Result desc",
|
||||||
Font::get(FONT_SIZE_SMALL), 0x777777FF);
|
Font::get(FONT_SIZE_SMALL), 0x777777FF);
|
||||||
mDescContainer->addChild(mResultDesc.get());
|
mDescContainer->addChild(mResultDesc.get());
|
||||||
|
|
|
@ -60,8 +60,9 @@ void ScrollableContainer::setAutoScroll(bool autoScroll)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScrollableContainer::setScrollParameters(float autoScrollResetDelayConstant,
|
void ScrollableContainer::setScrollParameters(float autoScrollDelayConstant,
|
||||||
float autoScrollDelayConstant, int autoScrollSpeedConstant, float autoWidthModConstant)
|
float autoScrollResetDelayConstant, int autoScrollSpeedConstant,
|
||||||
|
float autoWidthModConstant)
|
||||||
{
|
{
|
||||||
mAutoScrollResetDelayConstant = autoScrollResetDelayConstant;
|
mAutoScrollResetDelayConstant = autoScrollResetDelayConstant;
|
||||||
mAutoScrollDelayConstant = autoScrollDelayConstant;
|
mAutoScrollDelayConstant = autoScrollDelayConstant;
|
||||||
|
|
|
@ -10,9 +10,9 @@
|
||||||
#ifndef ES_CORE_COMPONENTS_SCROLLABLE_CONTAINER_H
|
#ifndef ES_CORE_COMPONENTS_SCROLLABLE_CONTAINER_H
|
||||||
#define ES_CORE_COMPONENTS_SCROLLABLE_CONTAINER_H
|
#define ES_CORE_COMPONENTS_SCROLLABLE_CONTAINER_H
|
||||||
|
|
||||||
#define AUTO_SCROLL_RESET_DELAY 3500.0f // Time before resetting to top after we reach the bottom.
|
#define AUTO_SCROLL_DELAY 2400.0f // Time to wait before we start to scroll.
|
||||||
#define AUTO_SCROLL_DELAY 2000.0f // Time to wait before we start to scroll.
|
#define AUTO_SCROLL_RESET_DELAY 4000.0f // Time before resetting to top after we reach the bottom.
|
||||||
#define AUTO_SCROLL_SPEED 38 // Relative scrolling speed (lower is faster).
|
#define AUTO_SCROLL_SPEED 48 // Relative scrolling speed (lower is faster).
|
||||||
#define AUTO_WIDTH_MOD 350.0f // Line width modifier to use to calculate scrolling speed.
|
#define AUTO_WIDTH_MOD 350.0f // Line width modifier to use to calculate scrolling speed.
|
||||||
|
|
||||||
#include "GuiComponent.h"
|
#include "GuiComponent.h"
|
||||||
|
@ -25,7 +25,7 @@ public:
|
||||||
Vector2f getScrollPos() const;
|
Vector2f getScrollPos() const;
|
||||||
void setScrollPos(const Vector2f& pos);
|
void setScrollPos(const Vector2f& pos);
|
||||||
void setAutoScroll(bool autoScroll);
|
void setAutoScroll(bool autoScroll);
|
||||||
void setScrollParameters(float autoScrollResetDelayConstant, float autoScrollDelayConstant,
|
void setScrollParameters(float autoScrollDelayConstant, float autoScrollResetDelayConstant,
|
||||||
int autoScrollSpeedConstant, float autoWidthModConstant) override;
|
int autoScrollSpeedConstant, float autoWidthModConstant) override;
|
||||||
void reset();
|
void reset();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue