mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 14:15:38 +00:00
The OptionListComponent key repeat parameters are now configurable.
This commit is contained in:
parent
67489b0500
commit
9c20498339
|
@ -101,7 +101,7 @@ GuiGamelistOptions::GuiGamelistOptions(Window* window, SystemData* system)
|
||||||
|
|
||||||
// Enable key repeat so that the left or right button can be held to cycle through
|
// Enable key repeat so that the left or right button can be held to cycle through
|
||||||
// the letters.
|
// the letters.
|
||||||
mJumpToLetterList->setKeyRepeat(true);
|
mJumpToLetterList->setKeyRepeat(true, 650, 200);
|
||||||
|
|
||||||
// Populate the quick selector.
|
// Populate the quick selector.
|
||||||
for (unsigned int i = 0; i < mFirstLetterIndex.size(); i++) {
|
for (unsigned int i = 0; i < mFirstLetterIndex.size(); i++) {
|
||||||
|
@ -139,7 +139,7 @@ GuiGamelistOptions::GuiGamelistOptions(Window* window, SystemData* system)
|
||||||
|
|
||||||
// Enable key repeat so that the left or right button can be held to cycle through
|
// Enable key repeat so that the left or right button can be held to cycle through
|
||||||
// the sort options.
|
// the sort options.
|
||||||
mListSort->setKeyRepeat(true);
|
mListSort->setKeyRepeat(true, 650, 400);
|
||||||
|
|
||||||
// Don't show the sort type option if the gamelist type is recent/last played.
|
// Don't show the sort type option if the gamelist type is recent/last played.
|
||||||
if (system->getName() != "recent")
|
if (system->getName() != "recent")
|
||||||
|
|
|
@ -247,7 +247,15 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
void setOverrideMultiText(const std::string& text) { mOverrideMultiText = text; }
|
void setOverrideMultiText(const std::string& text) { mOverrideMultiText = text; }
|
||||||
void setKeyRepeat(bool state) { mKeyRepeat = state; }
|
|
||||||
|
void setKeyRepeat(bool state,
|
||||||
|
int delay = OPTIONLIST_REPEAT_START_DELAY,
|
||||||
|
int speed = OPTIONLIST_REPEAT_SPEED)
|
||||||
|
{
|
||||||
|
mKeyRepeat = state;
|
||||||
|
mKeyRepeatStartDelay = delay;
|
||||||
|
mKeyRepeatSpeed = speed;
|
||||||
|
}
|
||||||
|
|
||||||
void update(int deltaTime) override
|
void update(int deltaTime) override
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue