mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-19 17:59:16 +01:00
fix bug in game carousel.
This commit is contained in:
parent
32144f46f9
commit
4ea4576e02
File diff suppressed because one or more lines are too long
@ -220,8 +220,13 @@ int GuiGameCarousel::GetClickedOption()
|
||||
{
|
||||
int found = -1;
|
||||
if (clickedItem>-1){
|
||||
if (game[bob[clickedItem+1]]->GetState()==STATE_SELECTED){
|
||||
found= (clickedItem+listOffset+1) % gameCnt;
|
||||
game[bob[clickedItem+1]]->SetState(STATE_SELECTED);
|
||||
game[bob[clickedItem]]->SetState(STATE_SELECTED);}
|
||||
else {
|
||||
game[bob[clickedItem]]->SetState(STATE_SELECTED);
|
||||
found= (clickedItem+listOffset) % gameCnt;
|
||||
found= (clickedItem+listOffset) % gameCnt;}
|
||||
clickedItem=-1;
|
||||
}
|
||||
return found;
|
||||
@ -231,7 +236,7 @@ int GuiGameCarousel::GetClickedOption()
|
||||
int GuiGameCarousel::GetSelectedOption()
|
||||
{
|
||||
int found = -1;
|
||||
for(int i=0; i<pagesize; i++) {
|
||||
for(int i=pagesize-1; i>-1; i--) {
|
||||
if(game[bob[i]]->GetState() == STATE_SELECTED) {
|
||||
game[bob[i]]->SetState(STATE_SELECTED);
|
||||
found = (listOffset+i) % gameCnt;
|
||||
|
Loading…
Reference in New Issue
Block a user