mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-29 17:45:38 +00:00
Fixed game list continuing to scroll after you open a menu or start a game.
This commit is contained in:
parent
03995a66bb
commit
c2b970f2cf
|
@ -1,3 +1,6 @@
|
||||||
|
October 14
|
||||||
|
-Fixed game list continuing to scroll when a menu is opened or a game is started.
|
||||||
|
|
||||||
October 13
|
October 13
|
||||||
-Added sound support through SDL_mixer.
|
-Added sound support through SDL_mixer.
|
||||||
-Added new theme tags for defining menu sounds. See THEMES.md for details.
|
-Added new theme tags for defining menu sounds. See THEMES.md for details.
|
||||||
|
|
|
@ -123,6 +123,8 @@ void GuiGameList::onInput(InputManager::InputButton button, bool keyDown)
|
||||||
mFolder = (FolderData*)file;
|
mFolder = (FolderData*)file;
|
||||||
updateList();
|
updateList();
|
||||||
}else{
|
}else{
|
||||||
|
mList->stopScrolling();
|
||||||
|
|
||||||
//wait for the sound to finish or we'll never hear it...
|
//wait for the sound to finish or we'll never hear it...
|
||||||
while(mTheme->getMenuSelectSound()->isPlaying());
|
while(mTheme->getMenuSelectSound()->isPlaying());
|
||||||
|
|
||||||
|
@ -248,6 +250,7 @@ void GuiGameList::updateDetailData()
|
||||||
//these are called when the menu opens/closes
|
//these are called when the menu opens/closes
|
||||||
void GuiGameList::onPause()
|
void GuiGameList::onPause()
|
||||||
{
|
{
|
||||||
|
mList->stopScrolling();
|
||||||
mTheme->getMenuOpenSound()->play();
|
mTheme->getMenuOpenSound()->play();
|
||||||
InputManager::unregisterComponent(this);
|
InputManager::unregisterComponent(this);
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,12 +103,18 @@ void GuiList<listType>::onInput(InputManager::InputButton button, bool keyDown)
|
||||||
}else{
|
}else{
|
||||||
if((button == InputManager::DOWN && mScrollDir > 0) || (button == InputManager::UP && mScrollDir < 0))
|
if((button == InputManager::DOWN && mScrollDir > 0) || (button == InputManager::UP && mScrollDir < 0))
|
||||||
{
|
{
|
||||||
|
stopScrolling();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename listType>
|
||||||
|
void GuiList<listType>::stopScrolling()
|
||||||
|
{
|
||||||
mScrollAccumulator = 0;
|
mScrollAccumulator = 0;
|
||||||
mScrolling = false;
|
mScrolling = false;
|
||||||
mScrollDir = 0;
|
mScrollDir = 0;
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename listType>
|
template <typename listType>
|
||||||
|
|
|
@ -30,6 +30,7 @@ public:
|
||||||
std::string getSelectedName();
|
std::string getSelectedName();
|
||||||
listType getSelectedObject();
|
listType getSelectedObject();
|
||||||
int getSelection();
|
int getSelection();
|
||||||
|
void stopScrolling();
|
||||||
bool isScrolling();
|
bool isScrolling();
|
||||||
|
|
||||||
void setSelectorColor(int selectorColor);
|
void setSelectorColor(int selectorColor);
|
||||||
|
|
Loading…
Reference in a new issue