*Added the carousel to the GUI.

*Fixed a bunch of bugs in the carousel.
*Changed the filenames for the carousel images to the spelling used everywhere else.
This commit is contained in:
DRayX7 2009-05-30 03:02:41 +00:00
parent c4e10a5cb3
commit 52a1eed0b0
10 changed files with 536 additions and 418 deletions

View File

@ -309,15 +309,17 @@ void CFG_Default(int widescreen) // -1 = non forced Mode
THEME.gameText_g = 0;
THEME.gameText_b = 0;
THEME.pagesize = 9;
THEME.favorite_x = 20;
THEME.favorite_x = 4;
THEME.favorite_y = 13;
THEME.abc_x = 52;
THEME.abc_x = 36;
THEME.abc_y = 13;
THEME.grid_x = 116;
THEME.list_x = 100;
THEME.list_y = 13;
THEME.grid_x = 132;
THEME.grid_y = 13;
THEME.carousel_x = 148;
THEME.carousel_x = 164;
THEME.carousel_y = 13;
THEME.count_x = 84;
THEME.count_x = 68;
THEME.count_y = 13;
THEME.sortBarOffset = 100;
}

View File

@ -108,6 +108,8 @@ struct THEME
short favorite_y;
short abc_x;
short abc_y;
short list_x;
short list_y;
short grid_x;
short grid_y;
short carousel_x;

View File

@ -263,11 +263,14 @@ extern const u32 abcIcon_png_size;
extern const u8 playCountIcon_png[];
extern const u32 playCountIcon_png_size;
extern const u8 arrangeList_png[];
extern const u32 arrangeList_png_size;
extern const u8 arrangeGrid_png[];
extern const u32 arrangeGrid_png_size;
extern const u8 arrangeCarosselle_png[];
extern const u32 arrangeCarosselle_png_size;
extern const u8 arrangeCarousel_png[];
extern const u32 arrangeCarousel_png_size;
extern const u8 favIcon_gray_png[];
extern const u32 favIcon_gray_png_size;
@ -284,8 +287,8 @@ extern const u32 arrangeGrid_gray_png_size;
extern const u8 arrangeList_gray_png[];
extern const u32 arrangeList_gray_png_size;
extern const u8 arrangeCarosselle_gray_png[];
extern const u32 arrangeCarosselle_gray_png_size;
extern const u8 arrangeCarousel_gray_png[];
extern const u32 arrangeCarousel_gray_png_size;
extern const u8 updateRev_png[];
extern const u32 updateRev_png_size;

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1016 B

After

Width:  |  Height:  |  Size: 1016 B

View File

@ -347,6 +347,9 @@ class GuiElement
//!\param center_x x co-ordinate of the center of circle.
//!\param center_y y co-ordinate of the center of circle.
void SetEffect(int e, int speed, f32 circles, int r, f32 startdegree, f32 anglespeedset, int center_x, int center_y);
//!Gets the frequency from the above effect
//!\return element frequency
float GetFrequency();
//!Sets an effect to be enabled on wiimote cursor over
//!\param e Effect to enable
//!\param a Amount of the effect (usage varies on effect)

View File

@ -437,6 +437,12 @@ int GuiElement::GetEffectOnOver()
return effectsOver;
}
float GuiElement::GetFrequency()
{
LOCK(this);
return frequency;
}
void GuiElement::SetEffect(int eff, int speed, f32 circles, int r, f32 startdegree, f32 anglespeedset, int center_x, int center_y) {
if(eff & EFFECT_GOROUND) {

View File

@ -22,7 +22,9 @@
#define RADIUS 780
#define IN_SPEED 175
#define SHIFT_SPEED 100
#define SPEED_STEP 4
#define PAGESIZE 9
#define SAFETY 320
extern const int vol;
@ -33,7 +35,7 @@ GuiGameCarousel::GuiGameCarousel(int w, int h, struct discHdr * l, int gameCnt,
{
width = w;
height = h;
this->gameCnt = gameCnt;
this->gameCnt = (gameCnt < SAFETY) ? gameCnt : SAFETY;
gameList = l;
pagesize = (gameCnt < PAGESIZE) ? gameCnt : PAGESIZE;
listOffset = (offset == 0) ? this->FindMenuItem(-1, 1) : offset;
@ -41,6 +43,8 @@ GuiGameCarousel::GuiGameCarousel(int w, int h, struct discHdr * l, int gameCnt,
selectedItem = selected - offset;
focus = 1; // allow focus
firstPic = 0;
clickedItem = -1;
speed = SHIFT_SPEED;
char imgPath[100];
trigA = new GuiTrigger;
@ -91,9 +95,9 @@ GuiGameCarousel::GuiGameCarousel(int w, int h, struct discHdr * l, int gameCnt,
gameIndex = new int[pagesize];
game = new GuiButton * [pagesize];
coverImg = new GuiImage * [pagesize];
cover = new GuiImageData * [pagesize];
bob = new int[pagesize];
coverImg = new GuiImage * [gameCnt];
cover = new GuiImageData * [gameCnt];
for(int i=0; i<pagesize; i++) {
bob[i]=i;
@ -101,24 +105,22 @@ GuiGameCarousel::GuiGameCarousel(int w, int h, struct discHdr * l, int gameCnt,
char ID[4];
char IDfull[7];
for(int i=0; i < pagesize; i++) {
struct discHdr *header = &gameList[(listOffset+i)%gameCnt];
for(int i=0; i < gameCnt; i++) {
struct discHdr *header = &gameList[i];
snprintf (ID,sizeof(ID),"%c%c%c", header->id[0], header->id[1], header->id[2]);
snprintf (IDfull,sizeof(IDfull),"%c%c%c%c%c%c", header->id[0], header->id[1], header->id[2],header->id[3], header->id[4], header->id[5]);
snprintf(imgPath, sizeof(imgPath), "%s%s.png", CFG.covers_path, IDfull);
//Load full id image
snprintf(imgPath, sizeof(imgPath), "%s%s.png", CFG.covers_path, IDfull); //Load full id image
cover[i] = new GuiImageData(imgPath,0);
if (!cover[i]->GetImage()) {
delete cover[i];
snprintf(imgPath, sizeof(imgPath), "%s%s.png", CFG.covers_path, ID);
//Load short id image
snprintf(imgPath, sizeof(imgPath), "%s%s.png", CFG.covers_path, ID); //Load short id image
cover[i] = new GuiImageData(imgPath, 0);
if (!cover[i]->GetImage()) {
delete cover[i];
snprintf(imgPath, sizeof(imgPath), "%snoimage.png", CFG.covers_path);
//Load no image
snprintf(imgPath, sizeof(imgPath), "%snoimage.png", CFG.covers_path); //Load no image
cover[i] = new GuiImageData(imgPath, nocover_png);
}
}
@ -126,14 +128,18 @@ GuiGameCarousel::GuiGameCarousel(int w, int h, struct discHdr * l, int gameCnt,
coverImg[i] = new GuiImage(cover[i]);
coverImg[i]->SetScale(SCALE);
coverImg[i]->SetWidescreen(CFG.widescreen);
}
for(int i=0; i < pagesize; i++) {
game[i] = new GuiButton(122,244);
game[i]->SetParent(this);
game[i]->SetAlignment(ALIGN_CENTRE,ALIGN_MIDDLE);
game[i]->SetPosition(0,740);
game[i]->SetImage(coverImg[i]);
game[i]->SetImage(coverImg[(listOffset+i) % gameCnt]);
game[i]->SetRumble(false);
game[i]->SetTrigger(trigA);
game[i]->SetSoundClick(btnSoundClick);
game[i]->SetClickable(true);
game[i]->SetEffect(EFFECT_GOROUND, IN_SPEED, 90-(pagesize-2*i-1)*DEG_OFFSET/2, RADIUS, 180, 1, 0, RADIUS);
}
}
@ -157,9 +163,12 @@ GuiGameCarousel::~GuiGameCarousel()
for(int i=0; i<pagesize; i++) {
delete game[i];
}
for(int i=0; i<gameCnt; i++) {
delete coverImg[i];
delete cover[i];
}
delete [] gameIndex;
delete [] bob;
delete [] game;
@ -204,12 +213,10 @@ int GuiGameCarousel::GetOffset()
int GuiGameCarousel::GetClickedOption()
{
int found = -1;
for(int i=0; i<pagesize; i++) {
if(game[bob[i]]->GetState() == STATE_CLICKED) {
game[bob[i]]->SetState(STATE_SELECTED);
found = listOffset+i;
break;
}
if (clickedItem>-1){
game[bob[clickedItem]]->SetState(STATE_SELECTED);
found= (clickedItem+listOffset) % gameCnt;
clickedItem=-1;
}
return found;
}
@ -221,7 +228,7 @@ int GuiGameCarousel::GetSelectedOption()
for(int i=0; i<pagesize; i++) {
if(game[bob[i]]->GetState() == STATE_SELECTED) {
game[bob[i]]->SetState(STATE_SELECTED);
found = listOffset+i;
found = (listOffset+i) % gameCnt;
break;
}
}
@ -296,10 +303,6 @@ void GuiGameCarousel::Update(GuiTrigger * t)
int next = listOffset;
char ID[4];
char IDfull[7];
char imgPath[100];
for(int i=0; i<pagesize; i++) {
if(next >= 0) {
if(game[bob[i]]->GetState() == STATE_DISABLED) {
@ -313,21 +316,25 @@ void GuiGameCarousel::Update(GuiTrigger * t)
game[bob[i]]->SetState(STATE_DISABLED);
}
if(focus) {
if(i != selectedItem && game[bob[i]]->GetState() == STATE_SELECTED)
game[bob[i]]->ResetState();
else if(i == selectedItem && game[bob[i]]->GetState() == STATE_DEFAULT);
game[bob[selectedItem]]->SetState(STATE_SELECTED, t->chan);
}
// if(focus) {
// if(i != selectedItem && game[bob[i]]->GetState() == STATE_SELECTED)
// game[bob[i]]->ResetState();
// else if(i == selectedItem && game[bob[i]]->GetState() == STATE_DEFAULT);
// game[bob[selectedItem]]->SetState(STATE_SELECTED, t->chan);
// }
game[bob[i]]->Update(t);
if(game[bob[i]]->GetState() == STATE_SELECTED) {
selectedItem = i;
}
if(game[bob[i]]->GetState() == STATE_CLICKED) {
clickedItem = i;
}
}
// navigation
if(!focus || game[0]->GetEffect() || gameCnt <= pagesize)
if(!focus || gameCnt <= pagesize || (game[bob[0]]->GetEffect() && game[bob[pagesize-1]]->GetEffect()))
return; // skip navigation
if (t->Left() || btnLeft->GetState() == STATE_CLICKED) {
@ -337,50 +344,31 @@ void GuiGameCarousel::Update(GuiTrigger * t)
buttons |= WPAD_ButtonsHeld(i);
if(!((buttons & WPAD_BUTTON_A) || (buttons & WPAD_BUTTON_MINUS) || t->Left())) {
btnLeft->ResetState();
speed = SHIFT_SPEED;
return;
}
for(int i=0; i<pagesize; i++) {
game[i]->StopEffect();
}
listOffset++;
if (listOffset > (gameCnt-1))
listOffset=0;
firstPic++;
if (firstPic > (pagesize-1))
firstPic=0;
listOffset = (listOffset+1 < gameCnt) ? listOffset+1 : 0;
firstPic = (firstPic+1 < pagesize) ? firstPic+1 : 0;
for (int i=0; i<pagesize; i++) {
bob[i] = (firstPic+i)%pagesize;
}
struct discHdr *header = &gameList[(listOffset + pagesize-1) % gameCnt];
snprintf (ID,sizeof(ID),"%c%c%c", header->id[0], header->id[1], header->id[2]);
snprintf (IDfull,sizeof(IDfull),"%c%c%c%c%c%c", header->id[0], header->id[1], header->id[2],header->id[3], header->id[4], header->id[5]);
delete cover[bob[pagesize-1]];
snprintf(imgPath, sizeof(imgPath), "%s%s.png", CFG.covers_path, IDfull); //Load full id image
cover[bob[pagesize-1]] = new GuiImageData(imgPath,0);
if (!cover[bob[pagesize-1]]->GetImage()) {
delete cover[bob[pagesize-1]];
snprintf(imgPath, sizeof(imgPath), "%s%s.png", CFG.covers_path, ID); //Load short id image
cover[bob[pagesize-1]] = new GuiImageData(imgPath, 0);
if (!cover[bob[pagesize-1]]->GetImage()) {
delete cover[bob[pagesize-1]];
snprintf(imgPath, sizeof(imgPath), "%snoimage.png", CFG.covers_path); //Load no image
cover[bob[pagesize-1]] = new GuiImageData(imgPath, nocover_png);
}
}
delete coverImg[bob[pagesize-1]];
coverImg[bob[pagesize-1]] = new GuiImage(cover[bob[pagesize-1]]);
coverImg[bob[pagesize-1]]->SetScale(SCALE);
coverImg[bob[pagesize-1]]->SetWidescreen(CFG.widescreen);
game[bob[pagesize-1]]->SetImage(coverImg[bob[pagesize-1]]);
game[bob[pagesize-1]]->SetImage(coverImg[(listOffset + pagesize-1) % gameCnt]);
game[bob[pagesize-1]]->SetPosition(0, RADIUS);
for (int i=0; i<pagesize; i++) {
//game[bob[i]]->SetEffect(EFFECT_GOROUND, -125, 7, 780, 256+7*i, 1, 0, 740);
game[bob[i]]->SetEffect(EFFECT_GOROUND, -SHIFT_SPEED, DEG_OFFSET, RADIUS, 270-(pagesize-2*i-3)*DEG_OFFSET/2, 1, 0, RADIUS);
game[bob[i]]->SetEffect(EFFECT_GOROUND, -speed, DEG_OFFSET, RADIUS, 270-(pagesize-2*i-3)*DEG_OFFSET/2, 1, 0, RADIUS);
}
speed+=SPEED_STEP;
}
else if(t->Right() || btnRight->GetState() == STATE_CLICKED) {
@ -390,50 +378,27 @@ void GuiGameCarousel::Update(GuiTrigger * t)
buttons |= WPAD_ButtonsHeld(i);
if(!((buttons & WPAD_BUTTON_A) || (buttons & WPAD_BUTTON_PLUS) || t->Right())) {
btnRight->ResetState();
speed=SHIFT_SPEED;
return;
}
for(int i=0; i<pagesize; i++) {
game[i]->StopEffect();
}
listOffset--;
if (listOffset<0)
listOffset=(gameCnt-1);
firstPic--;
if (firstPic<0)
firstPic=(pagesize-1);
listOffset = (listOffset-1 < 0) ? gameCnt-1 : listOffset-1;
firstPic = (firstPic-1 < 0) ? pagesize-1 : firstPic-1;
for(int i=0; i<pagesize; i++) {
bob[i] = (firstPic+i)%pagesize;
}
struct discHdr *header = &gameList[listOffset];
snprintf (ID,sizeof(ID),"%c%c%c", header->id[0], header->id[1], header->id[2]);
snprintf (IDfull,sizeof(IDfull),"%c%c%c%c%c%c", header->id[0], header->id[1], header->id[2],header->id[3], header->id[4], header->id[5]);
delete cover[bob[0]];
snprintf(imgPath, sizeof(imgPath), "%s%s.png", CFG.covers_path, IDfull); //Load full id image
cover[bob[0]] = new GuiImageData(imgPath,0);
if (!cover[bob[0]]->GetImage()) {
delete cover[bob[0]];
snprintf(imgPath, sizeof(imgPath), "%s%s.png", CFG.covers_path, ID); //Load short id image
cover[bob[0]] = new GuiImageData(imgPath, 0);
if (!cover[bob[0]]->GetImage()) {
delete cover[bob[0]];
snprintf(imgPath, sizeof(imgPath), "%snoimage.png", CFG.covers_path); //Load no image
cover[bob[0]] = new GuiImageData(imgPath, nocover_png);
}
}
delete coverImg[bob[0]];
coverImg[bob[0]] = new GuiImage(cover[bob[0]]);
coverImg[bob[0]]->SetScale(SCALE);
coverImg[bob[0]]->SetWidescreen(CFG.widescreen);
game[bob[0]]->SetImage(coverImg[bob[0]]);
game[bob[0]]->SetImage(coverImg[listOffset]);
game[bob[0]]->SetPosition(0, RADIUS);
for(int i=0; i<pagesize; i++) {
//game[bob[i]]->SetEffect(EFFECT_GOROUND, 125, 7, 780, 242+7*i, 1, 0, 740);
game[bob[i]]->SetEffect(EFFECT_GOROUND, SHIFT_SPEED, DEG_OFFSET, RADIUS, 270-(pagesize-2*i+1)*DEG_OFFSET/2, 1, 0, RADIUS);
game[bob[i]]->SetEffect(EFFECT_GOROUND, speed, DEG_OFFSET, RADIUS, 270-(pagesize-2*i+1)*DEG_OFFSET/2, 1, 0, RADIUS);
}
speed+=SPEED_STEP;
}
if(updateCB)
@ -443,15 +408,37 @@ void GuiGameCarousel::Update(GuiTrigger * t)
void GuiGameCarousel::Reload(struct discHdr * l, int count)
{
for(int i=0; i<pagesize; i++) {
delete game[i];
}
for(int i=0; i<gameCnt; i++) {
delete coverImg[i];
delete cover[i];
}
delete [] gameIndex;
delete [] bob;
delete [] game;
delete [] coverImg;
delete [] cover;
LOCK(this);
gameCnt = count;
gameList = l;
pagesize = (gameCnt < PAGESIZE) ? gameCnt : PAGESIZE;
listOffset = this->FindMenuItem(-1, 1);
selectedItem = 0 + listOffset;
selectedItem = listOffset;
focus = 1;
firstPic = 0;
char imgPath[100];
clickedItem = -1;
speed = SHIFT_SPEED;
gameIndex = new int[pagesize];
game = new GuiButton * [pagesize];
bob = new int[pagesize];
coverImg = new GuiImage * [gameCnt];
cover = new GuiImageData * [gameCnt];
for(int i=0; i<pagesize; i++) {
bob[i]=i;
@ -459,24 +446,23 @@ void GuiGameCarousel::Reload(struct discHdr * l, int count)
char ID[4];
char IDfull[7];
for(int i=0; i < pagesize; i++) {
char imgPath[100];
struct discHdr *header = &gameList[(listOffset+i)%gameCnt];
for(int i=0; i < gameCnt; i++) {
struct discHdr *header = &gameList[i];
snprintf (ID,sizeof(ID),"%c%c%c", header->id[0], header->id[1], header->id[2]);
snprintf (IDfull,sizeof(IDfull),"%c%c%c%c%c%c", header->id[0], header->id[1], header->id[2],header->id[3], header->id[4], header->id[5]);
snprintf(imgPath, sizeof(imgPath), "%s%s.png", CFG.covers_path, IDfull);
//Load full id image
snprintf(imgPath, sizeof(imgPath), "%s%s.png", CFG.covers_path, IDfull); //Load full id image
cover[i] = new GuiImageData(imgPath,0);
if (!cover[i]->GetImage()) {
delete cover[i];
snprintf(imgPath, sizeof(imgPath), "%s%s.png", CFG.covers_path, ID);
//Load short id image
snprintf(imgPath, sizeof(imgPath), "%s%s.png", CFG.covers_path, ID); //Load short id image
cover[i] = new GuiImageData(imgPath, 0);
if (!cover[i]->GetImage()) {
delete cover[i];
snprintf(imgPath, sizeof(imgPath), "%snoimage.png", CFG.covers_path);
//Load no image
snprintf(imgPath, sizeof(imgPath), "%snoimage.png", CFG.covers_path); //Load no image
cover[i] = new GuiImageData(imgPath, nocover_png);
}
}
@ -484,6 +470,9 @@ void GuiGameCarousel::Reload(struct discHdr * l, int count)
coverImg[i] = new GuiImage(cover[i]);
coverImg[i]->SetScale(SCALE);
coverImg[i]->SetWidescreen(CFG.widescreen);
}
for(int i=0; i < pagesize; i++) {
game[i] = new GuiButton(122,244);
game[i]->SetParent(this);
game[i]->SetAlignment(ALIGN_CENTRE,ALIGN_MIDDLE);
@ -492,7 +481,8 @@ void GuiGameCarousel::Reload(struct discHdr * l, int count)
game[i]->SetRumble(false);
game[i]->SetTrigger(trigA);
game[i]->SetSoundClick(btnSoundClick);
game[i]->SetEffect(EFFECT_GOROUND, IN_SPEED, 180-(pagesize-2*i-1)*DEG_OFFSET/2, RADIUS, 180, 1, 0, RADIUS);
game[i]->SetClickable(true);
game[i]->SetEffect(EFFECT_GOROUND, IN_SPEED, 90-(pagesize-2*i-1)*DEG_OFFSET/2, RADIUS, 180, 1, 0, RADIUS);
}
}

View File

@ -26,6 +26,7 @@ class GuiGameCarousel : public GuiElement
int pagesize;
int firstPic;
int speed;
int clickedItem;
struct discHdr * gameList;
int gameCnt;

View File

@ -3026,12 +3026,14 @@ static int MenuDiscList()
GuiImageData imgarrangeGrid(imgPath, arrangeGrid_png);
snprintf(imgPath, sizeof(imgPath), "%sarrangeGrid_gray.png", CFG.theme_path);
GuiImageData imgarrangeGrid_gray(imgPath, arrangeGrid_gray_png);
snprintf(imgPath, sizeof(imgPath), "%sarrangeList.png", CFG.theme_path);
GuiImageData imgarrangeList(imgPath, arrangeList_png);
snprintf(imgPath, sizeof(imgPath), "%sarrangeList_gray.png", CFG.theme_path);
GuiImageData imgarrangeList_gray(imgPath, arrangeList_gray_png);
snprintf(imgPath, sizeof(imgPath), "%sarrangeCarosselle.png", CFG.theme_path);
GuiImageData imgarrangeCarosselle(imgPath, arrangeCarosselle_png);
snprintf(imgPath, sizeof(imgPath), "%sarrangeCarosselle_gray.png", CFG.theme_path);
GuiImageData imgarrangeCarosselle_gray(imgPath, arrangeCarosselle_gray_png);
snprintf(imgPath, sizeof(imgPath), "%sarrangeCarousel.png", CFG.theme_path);
GuiImageData imgarrangeCarousel(imgPath, arrangeCarousel_png);
snprintf(imgPath, sizeof(imgPath), "%sarrangeCarousel_gray.png", CFG.theme_path);
GuiImageData imgarrangeCarousel_gray(imgPath, arrangeCarousel_gray_png);
GuiTrigger trigA;
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
@ -3127,23 +3129,28 @@ static int MenuDiscList()
countBtn.SetAlpha(180);
GuiImage listBtnImg(&imgarrangeList);
listBtnImg.SetWidescreen(CFG.widescreen);
GuiImage listBtnImg_g(&imgarrangeList_gray);
listBtnImg_g.SetWidescreen(CFG.widescreen);
GuiButton listBtn(&listBtnImg_g,&listBtnImg_g, 2, 3, THEME.list_x, THEME.list_y, &trigA, &btnSoundOver, &btnClick,1);
listBtn.SetAlpha(180);
GuiImage gridBtnImg(&imgarrangeGrid);
gridBtnImg.SetWidescreen(CFG.widescreen);
GuiImage gridBtnImg_g(&imgarrangeGrid_gray);
GuiImage listBtnImg_g(&imgarrangeList_gray);
gridBtnImg_g.SetWidescreen(CFG.widescreen);
listBtnImg_g.SetWidescreen(CFG.widescreen);
GuiButton gridBtn(&gridBtnImg_g,&gridBtnImg_g, 2, 3, THEME.grid_x, THEME.grid_y, &trigA, &btnSoundOver, &btnClick,1);
gridBtn.SetAlpha(180);
if (Settings.gameDisplay==grid){gridBtn.SetImage(&listBtnImg_g);
gridBtn.SetImageOver(&listBtnImg_g);}
GuiImage carosselleBtnImg(&imgarrangeCarosselle);
carosselleBtnImg.SetWidescreen(CFG.widescreen);
GuiImage carosselleBtnImg_g(&imgarrangeCarosselle_gray);
carosselleBtnImg_g.SetWidescreen(CFG.widescreen);
GuiButton carosselleBtn(&carosselleBtnImg_g,&carosselleBtnImg_g, 2, 3, THEME.carousel_x, THEME.carousel_y, &trigA, &btnSoundOver, &btnClick,1);
carosselleBtn.SetAlpha(180);
GuiImage carouselBtnImg(&imgarrangeCarousel);
carouselBtnImg.SetWidescreen(CFG.widescreen);
GuiImage carouselBtnImg_g(&imgarrangeCarousel_gray);
carouselBtnImg_g.SetWidescreen(CFG.widescreen);
GuiButton carouselBtn(&carouselBtnImg_g,&carouselBtnImg_g, 2, 3, THEME.carousel_x, THEME.carousel_y, &trigA, &btnSoundOver, &btnClick,1);
carouselBtn.SetAlpha(180);
if (Settings.fave)
{
@ -3160,43 +3167,61 @@ static int MenuDiscList()
countBtn.SetImage(&countBtnImg);
countBtn.SetAlpha(255);
}
if (Settings.gameDisplay==grid)
if (Settings.gameDisplay==list)
{
if(CFG.widescreen)
listBtn.SetImage(&listBtnImg);
listBtn.SetAlpha(255);
}
else if (Settings.gameDisplay==grid)
{
favoriteBtn.SetPosition(THEME.favorite_x-THEME.sortBarOffset, THEME.favorite_y);
abcBtn.SetPosition(THEME.abc_x-THEME.sortBarOffset, THEME.abc_y);
countBtn.SetPosition(THEME.count_x-THEME.sortBarOffset, THEME.count_y);
gridBtn.SetPosition(THEME.grid_x-THEME.sortBarOffset, THEME.grid_y);
carosselleBtn.SetPosition(THEME.carousel_x-THEME.sortBarOffset, THEME.carousel_y);
gridBtn.SetImage(&gridBtnImg);
gridBtn.SetAlpha(255);
}
else
else if (Settings.gameDisplay==carousel)
{
favoriteBtn.SetPosition(THEME.favorite_x-20-THEME.sortBarOffset, THEME.favorite_y);
abcBtn.SetPosition(THEME.abc_x-12-THEME.sortBarOffset, THEME.abc_y);
countBtn.SetPosition(THEME.count_x-4-THEME.sortBarOffset, THEME.count_y);
gridBtn.SetPosition(THEME.grid_x+4-THEME.sortBarOffset, THEME.grid_y);
carosselleBtn.SetPosition(THEME.carousel_x+12-THEME.sortBarOffset, THEME.carousel_y);
carouselBtn.SetImage(&carouselBtnImg);
carouselBtn.SetAlpha(255);
}
}
else // List-Mode
if (Settings.gameDisplay==list)
{
if(CFG.widescreen)
{
favoriteBtn.SetPosition(THEME.favorite_x, THEME.favorite_y);
abcBtn.SetPosition(THEME.abc_x, THEME.abc_y);
countBtn.SetPosition(THEME.count_x, THEME.count_y);
listBtn.SetPosition(THEME.list_x, THEME.list_y);
gridBtn.SetPosition(THEME.grid_x, THEME.grid_y);
carosselleBtn.SetPosition(THEME.carousel_x, THEME.carousel_y);
carouselBtn.SetPosition(THEME.carousel_x, THEME.carousel_y);
}
else
{
favoriteBtn.SetPosition(THEME.favorite_x-20, THEME.favorite_y);
abcBtn.SetPosition(THEME.abc_x-12, THEME.abc_y);
countBtn.SetPosition(THEME.count_x-4, THEME.count_y);
gridBtn.SetPosition(THEME.grid_x+4, THEME.grid_y);
carosselleBtn.SetPosition(THEME.carousel_x+12, THEME.carousel_y);
listBtn.SetPosition(THEME.list_x+4, THEME.list_y);
gridBtn.SetPosition(THEME.grid_x+12, THEME.grid_y);
carouselBtn.SetPosition(THEME.carousel_x+20, THEME.carousel_y);
}
}
else
{
if(CFG.widescreen)
{
favoriteBtn.SetPosition(THEME.favorite_x-THEME.sortBarOffset, THEME.favorite_y);
abcBtn.SetPosition(THEME.abc_x-THEME.sortBarOffset, THEME.abc_y);
countBtn.SetPosition(THEME.count_x-THEME.sortBarOffset, THEME.count_y);
listBtn.SetPosition(THEME.list_x-THEME.sortBarOffset, THEME.list_y);
gridBtn.SetPosition(THEME.grid_x-THEME.sortBarOffset, THEME.grid_y);
carouselBtn.SetPosition(THEME.carousel_x-THEME.sortBarOffset, THEME.carousel_y);
}
else
{
favoriteBtn.SetPosition(THEME.favorite_x-20-THEME.sortBarOffset, THEME.favorite_y);
abcBtn.SetPosition(THEME.abc_x-12-THEME.sortBarOffset, THEME.abc_y);
countBtn.SetPosition(THEME.count_x-4-THEME.sortBarOffset, THEME.count_y);
listBtn.SetPosition(THEME.list_x+4-THEME.sortBarOffset, THEME.list_y);
gridBtn.SetPosition(THEME.grid_x+12-THEME.sortBarOffset, THEME.grid_y);
carouselBtn.SetPosition(THEME.carousel_x+20-THEME.sortBarOffset, THEME.carousel_y);
}
}
@ -3226,19 +3251,23 @@ static int MenuDiscList()
gameGrid.SetPosition(0,20);
gameGrid.SetAlignment(ALIGN_LEFT, ALIGN_CENTRE);
GuiGameCarousel gameCarousel(640, 400, gameList, gameCnt, CFG.theme_path, bg_options_png, startat, offset);
gameCarousel.SetPosition(0,-20);
gameCarousel.SetAlignment(ALIGN_LEFT, ALIGN_CENTRE);
GuiText clockTimeBack("88:88", 40, (GXColor){138, 138, 138, 40});
clockTimeBack.SetAlignment(THEME.clockAlign, ALIGN_TOP);
clockTimeBack.SetPosition(THEME.clock_x, THEME.clock_y);
clockTimeBack.SetFont(fontClock);
if (Settings.gameDisplay==grid){
clockTimeBack.SetPosition(THEME.clock_x, THEME.clock_y+3);}
if (Settings.gameDisplay==grid || Settings.gameDisplay==carousel) {
clockTimeBack.SetPosition(THEME.clock_x, THEME.clock_y+3);
}
GuiText clockTime(theTime, 40, (GXColor){138, 138, 138, 240});
clockTime.SetAlignment(THEME.clockAlign, ALIGN_TOP);
clockTime.SetPosition(THEME.clock_x, THEME.clock_y);
clockTime.SetFont(fontClock);
if (Settings.gameDisplay==grid){
clockTime.SetPosition(THEME.clock_x, THEME.clock_y+3);}
clockTime.SetPosition(THEME.clock_x, THEME.clock_y); clockTime.SetFont(fontClock);
if (Settings.gameDisplay==grid || Settings.gameDisplay==carousel) {
clockTime.SetPosition(THEME.clock_x, THEME.clock_y+3);
}
HaltGui();
GuiWindow w(screenwidth, screenheight);
@ -3264,8 +3293,9 @@ static int MenuDiscList()
w.Append(&favoriteBtn);
w.Append(&abcBtn);
w.Append(&countBtn);
w.Append(&listBtn);
w.Append(&gridBtn);
w.Append(&carosselleBtn);
w.Append(&carouselBtn);
if((Settings.hddinfo == hr12)||(Settings.hddinfo == hr24))
{
@ -3275,6 +3305,7 @@ static int MenuDiscList()
if (Settings.gameDisplay==list){mainWindow->Append(&gameBrowser);}
if (Settings.gameDisplay==grid){mainWindow->Append(&gameGrid);}
if (Settings.gameDisplay==carousel){mainWindow->Append(&gameCarousel);}
mainWindow->Append(&w);
ResumeGui();
@ -3284,23 +3315,6 @@ static int MenuDiscList()
VIDEO_WaitVSync ();
if(carosselleBtn.GetState() == STATE_CLICKED) {
// carosselleBtn.SetEffect(EFFECT_GOROUND, 80, 180, 50, -45, 1);
// countBtn.SetEffect(EFFECT_GOROUND, -80, 180, 50, -45, 1);
// abcBtn.SetEffect(EFFECT_GOROUND, 80, 180, 50, -45, 1);
// favoriteBtn.SetEffect(EFFECT_GOROUND, -80, 360, 50, -45, 1);
// wiiBtn.SetEffect(EFFECT_GOROUND, 80, 180, 150, 180, 1);
// poweroffBtn.SetEffect(EFFECT_GOROUND, -80, 360, 150, 50, 1);
// sdcardBtn.SetEffect(EFFECT_GOROUND, 80, 360, 150, 80, 1);
// poweroffBtn.SetEffect(EFFECT_GOROUND, -80, 360, 60, 180, 1);
// settingsBtn.SetEffect(EFFECT_GOROUND, 80, 360, 200, 180, 1);
// homeBtn.SetEffect(EFFECT_GOROUND, 80, 360, 200, 180, 1);
// installBtn.SetEffect(EFFECT_GOROUND, -80, 360, 60, -90, 1);
// gridBtn.SetEffect(EFFECT_GOROUND, -80, 360, 50, 0, 1);
// DownloadBtn.SetEffect(EFFECT_GOROUND, 100, 720, 300, 0, 1);
// carosselleBtn.ResetState();
}
//CLOCK
time_t rawtime = time(0); //this fixes code dump caused by the clock
if (((Settings.hddinfo == hr12)||(Settings.hddinfo == hr24)) && rawtime != lastrawtime) {
@ -3363,6 +3377,7 @@ static int MenuDiscList()
poweroffBtn.ResetState();
if (Settings.gameDisplay==list){gameBrowser.SetFocus(1);}
else if (Settings.gameDisplay==grid){gameGrid.SetFocus(1);}
else if (Settings.gameDisplay==carousel){gameCarousel.SetFocus(1);}
}
}
@ -3394,6 +3409,7 @@ static int MenuDiscList()
homeBtn.ResetState();
if (Settings.gameDisplay==list){gameBrowser.SetFocus(1);}
else if (Settings.gameDisplay==grid){gameGrid.SetFocus(1);}
else if (Settings.gameDisplay==carousel){gameCarousel.SetFocus(1);}
}
}
@ -3402,6 +3418,7 @@ static int MenuDiscList()
wiiBtn.ResetState();
if (Settings.gameDisplay==list){gameBrowser.SetFocus(1);}
else if (Settings.gameDisplay==grid){gameGrid.SetFocus(1);}
else if (Settings.gameDisplay==carousel){gameCarousel.SetFocus(1);}
}
else if(installBtn.GetState() == STATE_CLICKED)
{
@ -3416,6 +3433,7 @@ static int MenuDiscList()
installBtn.ResetState();
if (Settings.gameDisplay==list){gameBrowser.SetFocus(1);}
else if (Settings.gameDisplay==grid){gameGrid.SetFocus(1);}
else if (Settings.gameDisplay==carousel){gameCarousel.SetFocus(1);}
}
}
@ -3429,6 +3447,9 @@ static int MenuDiscList()
else if (Settings.gameDisplay==grid){
startat = gameGrid.GetSelectedOption();
offset = gameGrid.GetOffset();}
else if (Settings.gameDisplay==carousel){
startat = gameCarousel.GetSelectedOption();
offset = gameCarousel.GetOffset();}
if(isSdInserted()) {
CFG_Load();
}
@ -3492,6 +3513,7 @@ static int MenuDiscList()
DownloadBtn.ResetState();
if (Settings.gameDisplay==list){gameBrowser.SetFocus(1);}
else if (Settings.gameDisplay==grid){gameGrid.SetFocus(1);}
else if (Settings.gameDisplay==carousel){gameCarousel.SetFocus(1);}
}//end download
else if(settingsBtn.GetState() == STATE_CLICKED)
@ -3501,6 +3523,9 @@ static int MenuDiscList()
else if (Settings.gameDisplay==grid){
startat = gameGrid.GetSelectedOption();
offset = gameGrid.GetOffset();}
else if (Settings.gameDisplay==carousel){
startat = gameCarousel.GetSelectedOption();
offset = gameCarousel.GetOffset();}
menu = MENU_SETTINGS;
break;
@ -3517,6 +3542,8 @@ static int MenuDiscList()
gameBrowser.Reload(gameList, gameCnt);}
else if (Settings.gameDisplay==grid){
gameGrid.Reload(gameList, gameCnt);}
else if (Settings.gameDisplay==carousel){
gameCarousel.Reload(gameList, gameCnt);}
gamecntTxt.SetTextf("%s: %i",LANGUAGE.Games, gameCnt);
selectedold = 1;
favoriteBtn.ResetState();
@ -3535,6 +3562,8 @@ static int MenuDiscList()
gameBrowser.Reload(gameList, gameCnt);}
else if (Settings.gameDisplay==grid){
gameGrid.Reload(gameList, gameCnt);}
else if (Settings.gameDisplay==carousel){
gameCarousel.Reload(gameList, gameCnt);}
selectedold = 1;
abcBtn.SetImage(&abcBtnImg);
abcBtn.SetAlpha(255);
@ -3556,6 +3585,8 @@ static int MenuDiscList()
gameBrowser.Reload(gameList, gameCnt);}
else if (Settings.gameDisplay==grid){
gameGrid.Reload(gameList, gameCnt);}
else if (Settings.gameDisplay==carousel){
gameCarousel.Reload(gameList, gameCnt);}
selectedold = 1;
abcBtn.SetImage(&abcBtnImg_g);
abcBtn.SetAlpha(180);
@ -3564,34 +3595,96 @@ static int MenuDiscList()
}
countBtn.ResetState();
} else if(gridBtn.GetState() == STATE_CLICKED) {
if (Settings.gameDisplay==list){
Settings.gameDisplay=grid;
}
else if(listBtn.GetState() == STATE_CLICKED) {
if (Settings.gameDisplay!=list){
if (Settings.gameDisplay==grid) {
mainWindow->Remove(&gameGrid);
gridBtn.SetImage(&gridBtnImg_g);
gridBtn.SetAlpha(180);
}
if (Settings.gameDisplay==carousel) {
mainWindow->Remove(&gameCarousel);
carouselBtn.SetImage(&carouselBtnImg_g);
carouselBtn.SetAlpha(180);
}
Settings.gameDisplay=list;
gameBrowser.Reload(gameList, gameCnt); // initialize before append
mainWindow->Append(&gameBrowser);
listBtn.SetImage(&listBtnImg);
listBtn.SetAlpha(255);
if(CFG.widescreen)
{
favoriteBtn.SetPosition(THEME.favorite_x, THEME.favorite_y);
abcBtn.SetPosition(THEME.abc_x, THEME.abc_y);
countBtn.SetPosition(THEME.count_x, THEME.count_y);
listBtn.SetPosition(THEME.list_x, THEME.list_y);
gridBtn.SetPosition(THEME.grid_x, THEME.grid_y);
carouselBtn.SetPosition(THEME.carousel_x, THEME.carousel_y);
} else {
favoriteBtn.SetPosition(THEME.favorite_x-20, THEME.favorite_y);
abcBtn.SetPosition(THEME.abc_x-12, THEME.abc_y);
countBtn.SetPosition(THEME.count_x-4, THEME.count_y);
listBtn.SetPosition(THEME.list_x+4, THEME.list_y);
gridBtn.SetPosition(THEME.grid_x+12, THEME.grid_y);
carouselBtn.SetPosition(THEME.carousel_x+20, THEME.carousel_y);
}
if((Settings.hddinfo == hr12)||(Settings.hddinfo == hr24)) {
clockTime.SetPosition(THEME.clock_x, THEME.clock_y);
clockTimeBack.SetPosition(THEME.clock_x, THEME.clock_y);
w.Append(&clockTime);
w.Append(&clockTimeBack);
}
w.Append(&favoriteBtn);
w.Append(&abcBtn);
w.Append(&countBtn);
w.Append(&listBtn);
w.Append(&gridBtn);
w.Append(&carouselBtn);
w.Append(&DownloadBtn);
if(isSdInserted()) {
cfg_save_global();
}
}
listBtn.ResetState();
}
else if (gridBtn.GetState() == STATE_CLICKED) {
if (Settings.gameDisplay!=grid){
if (Settings.gameDisplay==list) {
mainWindow->Remove(&gameBrowser);
if (GameIDTxt) w.Remove(GameIDTxt);
if (GameRegionTxt) w.Remove(GameRegionTxt);
w.Remove(&DownloadBtn);
listBtn.SetImage(&listBtnImg_g);
listBtn.SetAlpha(180);
}
if (Settings.gameDisplay==carousel) {
mainWindow->Remove(&gameCarousel);
carouselBtn.SetImage(&carouselBtnImg_g);
carouselBtn.SetAlpha(180);
}
Settings.gameDisplay=grid;
gameGrid.Reload(gameList, gameCnt); // initialize before append
mainWindow->Append(&gameGrid);
if (GameIDTxt)w.Remove(GameIDTxt);
if (GameRegionTxt)w.Remove(GameRegionTxt);
w.Remove(&DownloadBtn);
gridBtn.SetImage(&listBtnImg_g);
gridBtn.SetImageOver(&listBtnImg_g);
gridBtn.SetImage(&gridBtnImg);
gridBtn.SetAlpha(255);
if(CFG.widescreen)
{
favoriteBtn.SetPosition(THEME.favorite_x-THEME.sortBarOffset, THEME.favorite_y);
abcBtn.SetPosition(THEME.abc_x-THEME.sortBarOffset, THEME.abc_y);
countBtn.SetPosition(THEME.count_x-THEME.sortBarOffset, THEME.count_y);
listBtn.SetPosition(THEME.list_x-THEME.sortBarOffset, THEME.list_y);
gridBtn.SetPosition(THEME.grid_x-THEME.sortBarOffset, THEME.grid_y);
carosselleBtn.SetPosition(THEME.carousel_x-THEME.sortBarOffset, THEME.carousel_y);
}
else
{
carouselBtn.SetPosition(THEME.carousel_x-THEME.sortBarOffset, THEME.carousel_y);
} else {
favoriteBtn.SetPosition(THEME.favorite_x-20-THEME.sortBarOffset, THEME.favorite_y);
abcBtn.SetPosition(THEME.abc_x-12-THEME.sortBarOffset, THEME.abc_y);
countBtn.SetPosition(THEME.count_x-4-THEME.sortBarOffset, THEME.count_y);
gridBtn.SetPosition(THEME.grid_x+4-THEME.sortBarOffset, THEME.grid_y);
carosselleBtn.SetPosition(THEME.carousel_x+12-THEME.sortBarOffset, THEME.carousel_y);
listBtn.SetPosition(THEME.list_x+4-THEME.sortBarOffset, THEME.list_y);
gridBtn.SetPosition(THEME.grid_x+12-THEME.sortBarOffset, THEME.grid_y);
carouselBtn.SetPosition(THEME.carousel_x+20-THEME.sortBarOffset, THEME.carousel_y);
}
if((Settings.hddinfo == hr12)||(Settings.hddinfo == hr24)) {
clockTime.SetPosition(THEME.clock_x, THEME.clock_y+3);
@ -3602,67 +3695,83 @@ static int MenuDiscList()
w.Append(&favoriteBtn);
w.Append(&abcBtn);
w.Append(&countBtn);
w.Append(&listBtn);
w.Append(&gridBtn);
w.Append(&carosselleBtn);
} else if (Settings.gameDisplay==grid){
Settings.gameDisplay=list;
w.Append(&carouselBtn);
if(isSdInserted()) {
cfg_save_global();
}
}
gridBtn.ResetState();
}
else if (carouselBtn.GetState() == STATE_CLICKED) {
if (Settings.gameDisplay!=carousel){
if (Settings.gameDisplay==list)
mainWindow->Remove(&gameBrowser);
if (GameIDTxt) w.Remove(GameIDTxt);
if (GameRegionTxt) w.Remove(GameRegionTxt);
w.Remove(&DownloadBtn);
listBtn.SetImage(&listBtnImg_g);
listBtn.SetAlpha(180);
if (Settings.gameDisplay==grid)
mainWindow->Remove(&gameGrid);
gameBrowser.Reload(gameList, gameCnt); // initialize before append
mainWindow->Append(&gameBrowser);
gridBtn.SetImage(&gridBtnImg_g);
gridBtn.SetImageOver(&gridBtnImg_g);
gridBtn.SetAlpha(180);
Settings.gameDisplay=carousel;
gameCarousel.Reload(gameList, gameCnt); // initialize before append
mainWindow->Append(&gameCarousel);
carouselBtn.SetImage(&carouselBtnImg);
carouselBtn.SetAlpha(255);
if(CFG.widescreen)
{
favoriteBtn.SetPosition(THEME.favorite_x, THEME.favorite_y);
abcBtn.SetPosition(THEME.abc_x, THEME.abc_y);
countBtn.SetPosition(THEME.count_x, THEME.count_y);
gridBtn.SetPosition(THEME.grid_x, THEME.grid_y);
carosselleBtn.SetPosition(THEME.carousel_x, THEME.carousel_y);
favoriteBtn.SetPosition(THEME.favorite_x-THEME.sortBarOffset, THEME.favorite_y);
abcBtn.SetPosition(THEME.abc_x-THEME.sortBarOffset, THEME.abc_y);
countBtn.SetPosition(THEME.count_x-THEME.sortBarOffset, THEME.count_y);
listBtn.SetPosition(THEME.list_x-THEME.sortBarOffset, THEME.list_y);
gridBtn.SetPosition(THEME.grid_x-THEME.sortBarOffset, THEME.grid_y);
carouselBtn.SetPosition(THEME.carousel_x-THEME.sortBarOffset, THEME.carousel_y);
} else {
favoriteBtn.SetPosition(THEME.favorite_x-20-THEME.sortBarOffset, THEME.favorite_y);
abcBtn.SetPosition(THEME.abc_x-12-THEME.sortBarOffset, THEME.abc_y);
countBtn.SetPosition(THEME.count_x-4-THEME.sortBarOffset, THEME.count_y);
listBtn.SetPosition(THEME.list_x+4-THEME.sortBarOffset, THEME.list_y);
gridBtn.SetPosition(THEME.grid_x+12-THEME.sortBarOffset, THEME.grid_y);
carouselBtn.SetPosition(THEME.carousel_x+20-THEME.sortBarOffset, THEME.carousel_y);
}
else
{
favoriteBtn.SetPosition(THEME.favorite_x-20, THEME.favorite_y);
abcBtn.SetPosition(THEME.abc_x-12, THEME.abc_y);
countBtn.SetPosition(THEME.count_x-4, THEME.count_y);
gridBtn.SetPosition(THEME.grid_x+4, THEME.grid_y);
carosselleBtn.SetPosition(THEME.carousel_x+12, THEME.carousel_y);
}
if((Settings.hddinfo == hr12)||(Settings.hddinfo == hr24)) {
clockTime.SetPosition(THEME.clock_x, THEME.clock_y);
clockTimeBack.SetPosition(THEME.clock_x, THEME.clock_y);
clockTime.SetPosition(THEME.clock_x, THEME.clock_y+3);
clockTimeBack.SetPosition(THEME.clock_x, THEME.clock_y+3);
w.Append(&clockTime);
w.Append(&clockTimeBack);
}
w.Append(&favoriteBtn);
w.Append(&abcBtn);
w.Append(&countBtn);
w.Append(&listBtn);
w.Append(&gridBtn);
w.Append(&carosselleBtn);
w.Append(&DownloadBtn);
}
w.Append(&carouselBtn);
if(isSdInserted()) {
cfg_save_global();
}
//menu = MENU_DISCLIST;
gridBtn.ResetState();
}
carouselBtn.ResetState();
}
if (Settings.gameDisplay==grid){
int selectimg;
selectimg = gameGrid.GetSelectedOption();
gameSelected = gameGrid.GetClickedOption();
}
selectimg = gameGrid.GetSelectedOption(); gameSelected = gameGrid.GetClickedOption(); }
if (Settings.gameDisplay==carousel){
int selectimg;
selectimg = gameCarousel.GetSelectedOption(); gameSelected = gameCarousel.GetClickedOption(); }
if (Settings.gameDisplay==list) {
//Get selected game under cursor
int selectimg;//, promptnumber;
char ID[4];
char IDfull[7];
selectimg = gameBrowser.GetSelectedOption();
gameSelected = gameBrowser.GetClickedOption();
selectimg = gameBrowser.GetSelectedOption(); gameSelected = gameBrowser.GetClickedOption();
if (gameSelected > 0) //if click occured
@ -4015,6 +4124,7 @@ static int MenuDiscList()
else if(choice == 0)
if (Settings.gameDisplay==list){gameBrowser.SetFocus(1);}
else if (Settings.gameDisplay==grid){gameGrid.SetFocus(1);}
else if (Settings.gameDisplay==carousel){gameCarousel.SetFocus(1);}
}
}
}
@ -4022,6 +4132,7 @@ static int MenuDiscList()
HaltGui();
if (Settings.gameDisplay==list)mainWindow->Remove(&gameBrowser);
else if (Settings.gameDisplay==grid)mainWindow->Remove(&gameGrid);
else if (Settings.gameDisplay==carousel)mainWindow->Remove(&gameCarousel);
mainWindow->Remove(&w);
ResumeGui();
return menu;