From 4ea4576e028adfb7e68e879ff90f415c2549b577 Mon Sep 17 00:00:00 2001 From: giantpune Date: Sat, 6 Jun 2009 18:10:20 +0000 Subject: [PATCH] fix bug in game carousel. --- gui.pnproj | 2 +- source/libwiigui/gui_gamecarousel.cpp | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gui.pnproj b/gui.pnproj index d27620f0..4bb8b13c 100644 --- a/gui.pnproj +++ b/gui.pnproj @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/source/libwiigui/gui_gamecarousel.cpp b/source/libwiigui/gui_gamecarousel.cpp index e2928cf8..c313e7ac 100644 --- a/source/libwiigui/gui_gamecarousel.cpp +++ b/source/libwiigui/gui_gamecarousel.cpp @@ -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-1; i--) { if(game[bob[i]]->GetState() == STATE_SELECTED) { game[bob[i]]->SetState(STATE_SELECTED); found = (listOffset+i) % gameCnt;