mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-12-18 16:01:58 +01:00
*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:
parent
c4e10a5cb3
commit
52a1eed0b0
12
source/cfg.c
12
source/cfg.c
@ -309,15 +309,17 @@ void CFG_Default(int widescreen) // -1 = non forced Mode
|
|||||||
THEME.gameText_g = 0;
|
THEME.gameText_g = 0;
|
||||||
THEME.gameText_b = 0;
|
THEME.gameText_b = 0;
|
||||||
THEME.pagesize = 9;
|
THEME.pagesize = 9;
|
||||||
THEME.favorite_x = 20;
|
THEME.favorite_x = 4;
|
||||||
THEME.favorite_y = 13;
|
THEME.favorite_y = 13;
|
||||||
THEME.abc_x = 52;
|
THEME.abc_x = 36;
|
||||||
THEME.abc_y = 13;
|
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.grid_y = 13;
|
||||||
THEME.carousel_x = 148;
|
THEME.carousel_x = 164;
|
||||||
THEME.carousel_y = 13;
|
THEME.carousel_y = 13;
|
||||||
THEME.count_x = 84;
|
THEME.count_x = 68;
|
||||||
THEME.count_y = 13;
|
THEME.count_y = 13;
|
||||||
THEME.sortBarOffset = 100;
|
THEME.sortBarOffset = 100;
|
||||||
}
|
}
|
||||||
|
@ -108,6 +108,8 @@ struct THEME
|
|||||||
short favorite_y;
|
short favorite_y;
|
||||||
short abc_x;
|
short abc_x;
|
||||||
short abc_y;
|
short abc_y;
|
||||||
|
short list_x;
|
||||||
|
short list_y;
|
||||||
short grid_x;
|
short grid_x;
|
||||||
short grid_y;
|
short grid_y;
|
||||||
short carousel_x;
|
short carousel_x;
|
||||||
|
@ -263,11 +263,14 @@ extern const u32 abcIcon_png_size;
|
|||||||
extern const u8 playCountIcon_png[];
|
extern const u8 playCountIcon_png[];
|
||||||
extern const u32 playCountIcon_png_size;
|
extern const u32 playCountIcon_png_size;
|
||||||
|
|
||||||
|
extern const u8 arrangeList_png[];
|
||||||
|
extern const u32 arrangeList_png_size;
|
||||||
|
|
||||||
extern const u8 arrangeGrid_png[];
|
extern const u8 arrangeGrid_png[];
|
||||||
extern const u32 arrangeGrid_png_size;
|
extern const u32 arrangeGrid_png_size;
|
||||||
|
|
||||||
extern const u8 arrangeCarosselle_png[];
|
extern const u8 arrangeCarousel_png[];
|
||||||
extern const u32 arrangeCarosselle_png_size;
|
extern const u32 arrangeCarousel_png_size;
|
||||||
|
|
||||||
extern const u8 favIcon_gray_png[];
|
extern const u8 favIcon_gray_png[];
|
||||||
extern const u32 favIcon_gray_png_size;
|
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 u8 arrangeList_gray_png[];
|
||||||
extern const u32 arrangeList_gray_png_size;
|
extern const u32 arrangeList_gray_png_size;
|
||||||
|
|
||||||
extern const u8 arrangeCarosselle_gray_png[];
|
extern const u8 arrangeCarousel_gray_png[];
|
||||||
extern const u32 arrangeCarosselle_gray_png_size;
|
extern const u32 arrangeCarousel_gray_png_size;
|
||||||
|
|
||||||
extern const u8 updateRev_png[];
|
extern const u8 updateRev_png[];
|
||||||
extern const u32 updateRev_png_size;
|
extern const u32 updateRev_png_size;
|
||||||
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1016 B After Width: | Height: | Size: 1016 B |
@ -347,6 +347,9 @@ class GuiElement
|
|||||||
//!\param center_x x co-ordinate of the center of circle.
|
//!\param center_x x co-ordinate of the center of circle.
|
||||||
//!\param center_y y 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);
|
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
|
//!Sets an effect to be enabled on wiimote cursor over
|
||||||
//!\param e Effect to enable
|
//!\param e Effect to enable
|
||||||
//!\param a Amount of the effect (usage varies on effect)
|
//!\param a Amount of the effect (usage varies on effect)
|
||||||
|
@ -437,6 +437,12 @@ int GuiElement::GetEffectOnOver()
|
|||||||
return effectsOver;
|
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) {
|
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) {
|
if(eff & EFFECT_GOROUND) {
|
||||||
|
@ -22,7 +22,9 @@
|
|||||||
#define RADIUS 780
|
#define RADIUS 780
|
||||||
#define IN_SPEED 175
|
#define IN_SPEED 175
|
||||||
#define SHIFT_SPEED 100
|
#define SHIFT_SPEED 100
|
||||||
|
#define SPEED_STEP 4
|
||||||
#define PAGESIZE 9
|
#define PAGESIZE 9
|
||||||
|
#define SAFETY 320
|
||||||
|
|
||||||
extern const int vol;
|
extern const int vol;
|
||||||
|
|
||||||
@ -33,7 +35,7 @@ GuiGameCarousel::GuiGameCarousel(int w, int h, struct discHdr * l, int gameCnt,
|
|||||||
{
|
{
|
||||||
width = w;
|
width = w;
|
||||||
height = h;
|
height = h;
|
||||||
this->gameCnt = gameCnt;
|
this->gameCnt = (gameCnt < SAFETY) ? gameCnt : SAFETY;
|
||||||
gameList = l;
|
gameList = l;
|
||||||
pagesize = (gameCnt < PAGESIZE) ? gameCnt : PAGESIZE;
|
pagesize = (gameCnt < PAGESIZE) ? gameCnt : PAGESIZE;
|
||||||
listOffset = (offset == 0) ? this->FindMenuItem(-1, 1) : offset;
|
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;
|
selectedItem = selected - offset;
|
||||||
focus = 1; // allow focus
|
focus = 1; // allow focus
|
||||||
firstPic = 0;
|
firstPic = 0;
|
||||||
|
clickedItem = -1;
|
||||||
|
speed = SHIFT_SPEED;
|
||||||
char imgPath[100];
|
char imgPath[100];
|
||||||
|
|
||||||
trigA = new GuiTrigger;
|
trigA = new GuiTrigger;
|
||||||
@ -91,9 +95,9 @@ GuiGameCarousel::GuiGameCarousel(int w, int h, struct discHdr * l, int gameCnt,
|
|||||||
|
|
||||||
gameIndex = new int[pagesize];
|
gameIndex = new int[pagesize];
|
||||||
game = new GuiButton * [pagesize];
|
game = new GuiButton * [pagesize];
|
||||||
coverImg = new GuiImage * [pagesize];
|
|
||||||
cover = new GuiImageData * [pagesize];
|
|
||||||
bob = new int[pagesize];
|
bob = new int[pagesize];
|
||||||
|
coverImg = new GuiImage * [gameCnt];
|
||||||
|
cover = new GuiImageData * [gameCnt];
|
||||||
|
|
||||||
for(int i=0; i<pagesize; i++) {
|
for(int i=0; i<pagesize; i++) {
|
||||||
bob[i]=i;
|
bob[i]=i;
|
||||||
@ -101,24 +105,22 @@ GuiGameCarousel::GuiGameCarousel(int w, int h, struct discHdr * l, int gameCnt,
|
|||||||
|
|
||||||
char ID[4];
|
char ID[4];
|
||||||
char IDfull[7];
|
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 (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 (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);
|
snprintf(imgPath, sizeof(imgPath), "%s%s.png", CFG.covers_path, IDfull); //Load full id image
|
||||||
//Load full id image
|
|
||||||
cover[i] = new GuiImageData(imgPath,0);
|
cover[i] = new GuiImageData(imgPath,0);
|
||||||
if (!cover[i]->GetImage()) {
|
if (!cover[i]->GetImage()) {
|
||||||
delete cover[i];
|
delete cover[i];
|
||||||
snprintf(imgPath, sizeof(imgPath), "%s%s.png", CFG.covers_path, ID);
|
snprintf(imgPath, sizeof(imgPath), "%s%s.png", CFG.covers_path, ID); //Load short id image
|
||||||
//Load short id image
|
|
||||||
cover[i] = new GuiImageData(imgPath, 0);
|
cover[i] = new GuiImageData(imgPath, 0);
|
||||||
if (!cover[i]->GetImage()) {
|
if (!cover[i]->GetImage()) {
|
||||||
delete cover[i];
|
delete cover[i];
|
||||||
snprintf(imgPath, sizeof(imgPath), "%snoimage.png", CFG.covers_path);
|
snprintf(imgPath, sizeof(imgPath), "%snoimage.png", CFG.covers_path); //Load no image
|
||||||
//Load no image
|
|
||||||
cover[i] = new GuiImageData(imgPath, nocover_png);
|
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] = new GuiImage(cover[i]);
|
||||||
coverImg[i]->SetScale(SCALE);
|
coverImg[i]->SetScale(SCALE);
|
||||||
coverImg[i]->SetWidescreen(CFG.widescreen);
|
coverImg[i]->SetWidescreen(CFG.widescreen);
|
||||||
|
}
|
||||||
|
|
||||||
|
for(int i=0; i < pagesize; i++) {
|
||||||
game[i] = new GuiButton(122,244);
|
game[i] = new GuiButton(122,244);
|
||||||
game[i]->SetParent(this);
|
game[i]->SetParent(this);
|
||||||
game[i]->SetAlignment(ALIGN_CENTRE,ALIGN_MIDDLE);
|
game[i]->SetAlignment(ALIGN_CENTRE,ALIGN_MIDDLE);
|
||||||
game[i]->SetPosition(0,740);
|
game[i]->SetPosition(0,740);
|
||||||
game[i]->SetImage(coverImg[i]);
|
game[i]->SetImage(coverImg[(listOffset+i) % gameCnt]);
|
||||||
game[i]->SetRumble(false);
|
game[i]->SetRumble(false);
|
||||||
game[i]->SetTrigger(trigA);
|
game[i]->SetTrigger(trigA);
|
||||||
game[i]->SetSoundClick(btnSoundClick);
|
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);
|
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++) {
|
for(int i=0; i<pagesize; i++) {
|
||||||
delete game[i];
|
delete game[i];
|
||||||
|
}
|
||||||
|
for(int i=0; i<gameCnt; i++) {
|
||||||
delete coverImg[i];
|
delete coverImg[i];
|
||||||
delete cover[i];
|
delete cover[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
delete [] gameIndex;
|
delete [] gameIndex;
|
||||||
delete [] bob;
|
delete [] bob;
|
||||||
delete [] game;
|
delete [] game;
|
||||||
@ -204,12 +213,10 @@ int GuiGameCarousel::GetOffset()
|
|||||||
int GuiGameCarousel::GetClickedOption()
|
int GuiGameCarousel::GetClickedOption()
|
||||||
{
|
{
|
||||||
int found = -1;
|
int found = -1;
|
||||||
for(int i=0; i<pagesize; i++) {
|
if (clickedItem>-1){
|
||||||
if(game[bob[i]]->GetState() == STATE_CLICKED) {
|
game[bob[clickedItem]]->SetState(STATE_SELECTED);
|
||||||
game[bob[i]]->SetState(STATE_SELECTED);
|
found= (clickedItem+listOffset) % gameCnt;
|
||||||
found = listOffset+i;
|
clickedItem=-1;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return found;
|
return found;
|
||||||
}
|
}
|
||||||
@ -221,7 +228,7 @@ int GuiGameCarousel::GetSelectedOption()
|
|||||||
for(int i=0; i<pagesize; i++) {
|
for(int i=0; i<pagesize; i++) {
|
||||||
if(game[bob[i]]->GetState() == STATE_SELECTED) {
|
if(game[bob[i]]->GetState() == STATE_SELECTED) {
|
||||||
game[bob[i]]->SetState(STATE_SELECTED);
|
game[bob[i]]->SetState(STATE_SELECTED);
|
||||||
found = listOffset+i;
|
found = (listOffset+i) % gameCnt;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -296,10 +303,6 @@ void GuiGameCarousel::Update(GuiTrigger * t)
|
|||||||
|
|
||||||
int next = listOffset;
|
int next = listOffset;
|
||||||
|
|
||||||
char ID[4];
|
|
||||||
char IDfull[7];
|
|
||||||
char imgPath[100];
|
|
||||||
|
|
||||||
for(int i=0; i<pagesize; i++) {
|
for(int i=0; i<pagesize; i++) {
|
||||||
if(next >= 0) {
|
if(next >= 0) {
|
||||||
if(game[bob[i]]->GetState() == STATE_DISABLED) {
|
if(game[bob[i]]->GetState() == STATE_DISABLED) {
|
||||||
@ -313,21 +316,25 @@ void GuiGameCarousel::Update(GuiTrigger * t)
|
|||||||
game[bob[i]]->SetState(STATE_DISABLED);
|
game[bob[i]]->SetState(STATE_DISABLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(focus) {
|
// if(focus) {
|
||||||
if(i != selectedItem && game[bob[i]]->GetState() == STATE_SELECTED)
|
// if(i != selectedItem && game[bob[i]]->GetState() == STATE_SELECTED)
|
||||||
game[bob[i]]->ResetState();
|
// game[bob[i]]->ResetState();
|
||||||
else if(i == selectedItem && game[bob[i]]->GetState() == STATE_DEFAULT);
|
// else if(i == selectedItem && game[bob[i]]->GetState() == STATE_DEFAULT);
|
||||||
game[bob[selectedItem]]->SetState(STATE_SELECTED, t->chan);
|
// game[bob[selectedItem]]->SetState(STATE_SELECTED, t->chan);
|
||||||
}
|
// }
|
||||||
game[bob[i]]->Update(t);
|
game[bob[i]]->Update(t);
|
||||||
|
|
||||||
if(game[bob[i]]->GetState() == STATE_SELECTED) {
|
if(game[bob[i]]->GetState() == STATE_SELECTED) {
|
||||||
selectedItem = i;
|
selectedItem = i;
|
||||||
}
|
}
|
||||||
|
if(game[bob[i]]->GetState() == STATE_CLICKED) {
|
||||||
|
clickedItem = i;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// navigation
|
// navigation
|
||||||
if(!focus || game[0]->GetEffect() || gameCnt <= pagesize)
|
if(!focus || gameCnt <= pagesize || (game[bob[0]]->GetEffect() && game[bob[pagesize-1]]->GetEffect()))
|
||||||
return; // skip navigation
|
return; // skip navigation
|
||||||
|
|
||||||
if (t->Left() || btnLeft->GetState() == STATE_CLICKED) {
|
if (t->Left() || btnLeft->GetState() == STATE_CLICKED) {
|
||||||
@ -337,50 +344,31 @@ void GuiGameCarousel::Update(GuiTrigger * t)
|
|||||||
buttons |= WPAD_ButtonsHeld(i);
|
buttons |= WPAD_ButtonsHeld(i);
|
||||||
if(!((buttons & WPAD_BUTTON_A) || (buttons & WPAD_BUTTON_MINUS) || t->Left())) {
|
if(!((buttons & WPAD_BUTTON_A) || (buttons & WPAD_BUTTON_MINUS) || t->Left())) {
|
||||||
btnLeft->ResetState();
|
btnLeft->ResetState();
|
||||||
|
speed = SHIFT_SPEED;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int i=0; i<pagesize; i++) {
|
for(int i=0; i<pagesize; i++) {
|
||||||
game[i]->StopEffect();
|
game[i]->StopEffect();
|
||||||
}
|
}
|
||||||
listOffset++;
|
|
||||||
if (listOffset > (gameCnt-1))
|
listOffset = (listOffset+1 < gameCnt) ? listOffset+1 : 0;
|
||||||
listOffset=0;
|
firstPic = (firstPic+1 < pagesize) ? firstPic+1 : 0;
|
||||||
firstPic++;
|
|
||||||
if (firstPic > (pagesize-1))
|
|
||||||
firstPic=0;
|
|
||||||
|
|
||||||
for (int i=0; i<pagesize; i++) {
|
for (int i=0; i<pagesize; i++) {
|
||||||
bob[i] = (firstPic+i)%pagesize;
|
bob[i] = (firstPic+i)%pagesize;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct discHdr *header = &gameList[(listOffset + pagesize-1) % gameCnt];
|
game[bob[pagesize-1]]->SetImage(coverImg[(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]]->SetPosition(0, RADIUS);
|
game[bob[pagesize-1]]->SetPosition(0, RADIUS);
|
||||||
|
|
||||||
|
|
||||||
for (int i=0; i<pagesize; i++) {
|
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, -speed, DEG_OFFSET, RADIUS, 270-(pagesize-2*i-3)*DEG_OFFSET/2, 1, 0, RADIUS);
|
||||||
game[bob[i]]->SetEffect(EFFECT_GOROUND, -SHIFT_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) {
|
else if(t->Right() || btnRight->GetState() == STATE_CLICKED) {
|
||||||
@ -390,50 +378,27 @@ void GuiGameCarousel::Update(GuiTrigger * t)
|
|||||||
buttons |= WPAD_ButtonsHeld(i);
|
buttons |= WPAD_ButtonsHeld(i);
|
||||||
if(!((buttons & WPAD_BUTTON_A) || (buttons & WPAD_BUTTON_PLUS) || t->Right())) {
|
if(!((buttons & WPAD_BUTTON_A) || (buttons & WPAD_BUTTON_PLUS) || t->Right())) {
|
||||||
btnRight->ResetState();
|
btnRight->ResetState();
|
||||||
|
speed=SHIFT_SPEED;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int i=0; i<pagesize; i++) {
|
for(int i=0; i<pagesize; i++) {
|
||||||
game[i]->StopEffect();
|
game[i]->StopEffect();
|
||||||
}
|
}
|
||||||
listOffset--;
|
listOffset = (listOffset-1 < 0) ? gameCnt-1 : listOffset-1;
|
||||||
if (listOffset<0)
|
firstPic = (firstPic-1 < 0) ? pagesize-1 : firstPic-1;
|
||||||
listOffset=(gameCnt-1);
|
|
||||||
firstPic--;
|
|
||||||
if (firstPic<0)
|
|
||||||
firstPic=(pagesize-1);
|
|
||||||
|
|
||||||
for(int i=0; i<pagesize; i++) {
|
for(int i=0; i<pagesize; i++) {
|
||||||
bob[i] = (firstPic+i)%pagesize;
|
bob[i] = (firstPic+i)%pagesize;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct discHdr *header = &gameList[listOffset];
|
game[bob[0]]->SetImage(coverImg[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]]->SetPosition(0, RADIUS);
|
game[bob[0]]->SetPosition(0, RADIUS);
|
||||||
|
|
||||||
for(int i=0; i<pagesize; i++) {
|
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, speed, DEG_OFFSET, RADIUS, 270-(pagesize-2*i+1)*DEG_OFFSET/2, 1, 0, RADIUS);
|
||||||
game[bob[i]]->SetEffect(EFFECT_GOROUND, SHIFT_SPEED, DEG_OFFSET, RADIUS, 270-(pagesize-2*i+1)*DEG_OFFSET/2, 1, 0, RADIUS);
|
|
||||||
}
|
}
|
||||||
|
speed+=SPEED_STEP;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(updateCB)
|
if(updateCB)
|
||||||
@ -443,15 +408,37 @@ void GuiGameCarousel::Update(GuiTrigger * t)
|
|||||||
|
|
||||||
void GuiGameCarousel::Reload(struct discHdr * l, int count)
|
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);
|
LOCK(this);
|
||||||
|
|
||||||
gameCnt = count;
|
gameCnt = count;
|
||||||
gameList = l;
|
gameList = l;
|
||||||
pagesize = (gameCnt < PAGESIZE) ? gameCnt : PAGESIZE;
|
pagesize = (gameCnt < PAGESIZE) ? gameCnt : PAGESIZE;
|
||||||
listOffset = this->FindMenuItem(-1, 1);
|
listOffset = this->FindMenuItem(-1, 1);
|
||||||
selectedItem = 0 + listOffset;
|
selectedItem = listOffset;
|
||||||
focus = 1;
|
focus = 1;
|
||||||
firstPic = 0;
|
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++) {
|
for(int i=0; i<pagesize; i++) {
|
||||||
bob[i]=i;
|
bob[i]=i;
|
||||||
@ -459,24 +446,23 @@ void GuiGameCarousel::Reload(struct discHdr * l, int count)
|
|||||||
|
|
||||||
char ID[4];
|
char ID[4];
|
||||||
char IDfull[7];
|
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 (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 (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);
|
snprintf(imgPath, sizeof(imgPath), "%s%s.png", CFG.covers_path, IDfull); //Load full id image
|
||||||
//Load full id image
|
|
||||||
cover[i] = new GuiImageData(imgPath,0);
|
cover[i] = new GuiImageData(imgPath,0);
|
||||||
if (!cover[i]->GetImage()) {
|
if (!cover[i]->GetImage()) {
|
||||||
delete cover[i];
|
delete cover[i];
|
||||||
snprintf(imgPath, sizeof(imgPath), "%s%s.png", CFG.covers_path, ID);
|
snprintf(imgPath, sizeof(imgPath), "%s%s.png", CFG.covers_path, ID); //Load short id image
|
||||||
//Load short id image
|
|
||||||
cover[i] = new GuiImageData(imgPath, 0);
|
cover[i] = new GuiImageData(imgPath, 0);
|
||||||
if (!cover[i]->GetImage()) {
|
if (!cover[i]->GetImage()) {
|
||||||
delete cover[i];
|
delete cover[i];
|
||||||
snprintf(imgPath, sizeof(imgPath), "%snoimage.png", CFG.covers_path);
|
snprintf(imgPath, sizeof(imgPath), "%snoimage.png", CFG.covers_path); //Load no image
|
||||||
//Load no image
|
|
||||||
cover[i] = new GuiImageData(imgPath, nocover_png);
|
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] = new GuiImage(cover[i]);
|
||||||
coverImg[i]->SetScale(SCALE);
|
coverImg[i]->SetScale(SCALE);
|
||||||
coverImg[i]->SetWidescreen(CFG.widescreen);
|
coverImg[i]->SetWidescreen(CFG.widescreen);
|
||||||
|
}
|
||||||
|
|
||||||
|
for(int i=0; i < pagesize; i++) {
|
||||||
game[i] = new GuiButton(122,244);
|
game[i] = new GuiButton(122,244);
|
||||||
game[i]->SetParent(this);
|
game[i]->SetParent(this);
|
||||||
game[i]->SetAlignment(ALIGN_CENTRE,ALIGN_MIDDLE);
|
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]->SetRumble(false);
|
||||||
game[i]->SetTrigger(trigA);
|
game[i]->SetTrigger(trigA);
|
||||||
game[i]->SetSoundClick(btnSoundClick);
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ class GuiGameCarousel : public GuiElement
|
|||||||
int pagesize;
|
int pagesize;
|
||||||
int firstPic;
|
int firstPic;
|
||||||
int speed;
|
int speed;
|
||||||
|
int clickedItem;
|
||||||
|
|
||||||
struct discHdr * gameList;
|
struct discHdr * gameList;
|
||||||
int gameCnt;
|
int gameCnt;
|
||||||
|
325
source/menu.cpp
325
source/menu.cpp
@ -3026,12 +3026,14 @@ static int MenuDiscList()
|
|||||||
GuiImageData imgarrangeGrid(imgPath, arrangeGrid_png);
|
GuiImageData imgarrangeGrid(imgPath, arrangeGrid_png);
|
||||||
snprintf(imgPath, sizeof(imgPath), "%sarrangeGrid_gray.png", CFG.theme_path);
|
snprintf(imgPath, sizeof(imgPath), "%sarrangeGrid_gray.png", CFG.theme_path);
|
||||||
GuiImageData imgarrangeGrid_gray(imgPath, arrangeGrid_gray_png);
|
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);
|
snprintf(imgPath, sizeof(imgPath), "%sarrangeList_gray.png", CFG.theme_path);
|
||||||
GuiImageData imgarrangeList_gray(imgPath, arrangeList_gray_png);
|
GuiImageData imgarrangeList_gray(imgPath, arrangeList_gray_png);
|
||||||
snprintf(imgPath, sizeof(imgPath), "%sarrangeCarosselle.png", CFG.theme_path);
|
snprintf(imgPath, sizeof(imgPath), "%sarrangeCarousel.png", CFG.theme_path);
|
||||||
GuiImageData imgarrangeCarosselle(imgPath, arrangeCarosselle_png);
|
GuiImageData imgarrangeCarousel(imgPath, arrangeCarousel_png);
|
||||||
snprintf(imgPath, sizeof(imgPath), "%sarrangeCarosselle_gray.png", CFG.theme_path);
|
snprintf(imgPath, sizeof(imgPath), "%sarrangeCarousel_gray.png", CFG.theme_path);
|
||||||
GuiImageData imgarrangeCarosselle_gray(imgPath, arrangeCarosselle_gray_png);
|
GuiImageData imgarrangeCarousel_gray(imgPath, arrangeCarousel_gray_png);
|
||||||
|
|
||||||
GuiTrigger trigA;
|
GuiTrigger trigA;
|
||||||
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
||||||
@ -3127,23 +3129,28 @@ static int MenuDiscList()
|
|||||||
countBtn.SetAlpha(180);
|
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);
|
GuiImage gridBtnImg(&imgarrangeGrid);
|
||||||
gridBtnImg.SetWidescreen(CFG.widescreen);
|
gridBtnImg.SetWidescreen(CFG.widescreen);
|
||||||
GuiImage gridBtnImg_g(&imgarrangeGrid_gray);
|
GuiImage gridBtnImg_g(&imgarrangeGrid_gray);
|
||||||
GuiImage listBtnImg_g(&imgarrangeList_gray);
|
|
||||||
gridBtnImg_g.SetWidescreen(CFG.widescreen);
|
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);
|
GuiButton gridBtn(&gridBtnImg_g,&gridBtnImg_g, 2, 3, THEME.grid_x, THEME.grid_y, &trigA, &btnSoundOver, &btnClick,1);
|
||||||
gridBtn.SetAlpha(180);
|
gridBtn.SetAlpha(180);
|
||||||
if (Settings.gameDisplay==grid){gridBtn.SetImage(&listBtnImg_g);
|
|
||||||
gridBtn.SetImageOver(&listBtnImg_g);}
|
|
||||||
|
|
||||||
GuiImage carosselleBtnImg(&imgarrangeCarosselle);
|
|
||||||
carosselleBtnImg.SetWidescreen(CFG.widescreen);
|
GuiImage carouselBtnImg(&imgarrangeCarousel);
|
||||||
GuiImage carosselleBtnImg_g(&imgarrangeCarosselle_gray);
|
carouselBtnImg.SetWidescreen(CFG.widescreen);
|
||||||
carosselleBtnImg_g.SetWidescreen(CFG.widescreen);
|
GuiImage carouselBtnImg_g(&imgarrangeCarousel_gray);
|
||||||
GuiButton carosselleBtn(&carosselleBtnImg_g,&carosselleBtnImg_g, 2, 3, THEME.carousel_x, THEME.carousel_y, &trigA, &btnSoundOver, &btnClick,1);
|
carouselBtnImg_g.SetWidescreen(CFG.widescreen);
|
||||||
carosselleBtn.SetAlpha(180);
|
GuiButton carouselBtn(&carouselBtnImg_g,&carouselBtnImg_g, 2, 3, THEME.carousel_x, THEME.carousel_y, &trigA, &btnSoundOver, &btnClick,1);
|
||||||
|
carouselBtn.SetAlpha(180);
|
||||||
|
|
||||||
if (Settings.fave)
|
if (Settings.fave)
|
||||||
{
|
{
|
||||||
@ -3160,43 +3167,61 @@ static int MenuDiscList()
|
|||||||
countBtn.SetImage(&countBtnImg);
|
countBtn.SetImage(&countBtnImg);
|
||||||
countBtn.SetAlpha(255);
|
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);
|
gridBtn.SetImage(&gridBtnImg);
|
||||||
abcBtn.SetPosition(THEME.abc_x-THEME.sortBarOffset, THEME.abc_y);
|
gridBtn.SetAlpha(255);
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
else
|
else if (Settings.gameDisplay==carousel)
|
||||||
{
|
{
|
||||||
favoriteBtn.SetPosition(THEME.favorite_x-20-THEME.sortBarOffset, THEME.favorite_y);
|
carouselBtn.SetImage(&carouselBtnImg);
|
||||||
abcBtn.SetPosition(THEME.abc_x-12-THEME.sortBarOffset, THEME.abc_y);
|
carouselBtn.SetAlpha(255);
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
if (Settings.gameDisplay==list)
|
||||||
}
|
|
||||||
else // List-Mode
|
|
||||||
{
|
{
|
||||||
if(CFG.widescreen)
|
if(CFG.widescreen)
|
||||||
{
|
{
|
||||||
favoriteBtn.SetPosition(THEME.favorite_x, THEME.favorite_y);
|
favoriteBtn.SetPosition(THEME.favorite_x, THEME.favorite_y);
|
||||||
abcBtn.SetPosition(THEME.abc_x, THEME.abc_y);
|
abcBtn.SetPosition(THEME.abc_x, THEME.abc_y);
|
||||||
countBtn.SetPosition(THEME.count_x, THEME.count_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);
|
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
|
else
|
||||||
{
|
{
|
||||||
favoriteBtn.SetPosition(THEME.favorite_x-20, THEME.favorite_y);
|
favoriteBtn.SetPosition(THEME.favorite_x-20, THEME.favorite_y);
|
||||||
abcBtn.SetPosition(THEME.abc_x-12, THEME.abc_y);
|
abcBtn.SetPosition(THEME.abc_x-12, THEME.abc_y);
|
||||||
countBtn.SetPosition(THEME.count_x-4, THEME.count_y);
|
countBtn.SetPosition(THEME.count_x-4, THEME.count_y);
|
||||||
gridBtn.SetPosition(THEME.grid_x+4, THEME.grid_y);
|
listBtn.SetPosition(THEME.list_x+4, THEME.list_y);
|
||||||
carosselleBtn.SetPosition(THEME.carousel_x+12, THEME.carousel_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.SetPosition(0,20);
|
||||||
gameGrid.SetAlignment(ALIGN_LEFT, ALIGN_CENTRE);
|
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});
|
GuiText clockTimeBack("88:88", 40, (GXColor){138, 138, 138, 40});
|
||||||
clockTimeBack.SetAlignment(THEME.clockAlign, ALIGN_TOP);
|
clockTimeBack.SetAlignment(THEME.clockAlign, ALIGN_TOP);
|
||||||
clockTimeBack.SetPosition(THEME.clock_x, THEME.clock_y);
|
clockTimeBack.SetPosition(THEME.clock_x, THEME.clock_y);
|
||||||
clockTimeBack.SetFont(fontClock);
|
clockTimeBack.SetFont(fontClock);
|
||||||
if (Settings.gameDisplay==grid){
|
if (Settings.gameDisplay==grid || Settings.gameDisplay==carousel) {
|
||||||
clockTimeBack.SetPosition(THEME.clock_x, THEME.clock_y+3);}
|
clockTimeBack.SetPosition(THEME.clock_x, THEME.clock_y+3);
|
||||||
|
}
|
||||||
GuiText clockTime(theTime, 40, (GXColor){138, 138, 138, 240});
|
GuiText clockTime(theTime, 40, (GXColor){138, 138, 138, 240});
|
||||||
clockTime.SetAlignment(THEME.clockAlign, ALIGN_TOP);
|
clockTime.SetAlignment(THEME.clockAlign, ALIGN_TOP);
|
||||||
clockTime.SetPosition(THEME.clock_x, THEME.clock_y);
|
clockTime.SetPosition(THEME.clock_x, THEME.clock_y);
clockTime.SetFont(fontClock);
|
||||||
clockTime.SetFont(fontClock);
|
if (Settings.gameDisplay==grid || Settings.gameDisplay==carousel) {
|
||||||
if (Settings.gameDisplay==grid){
|
clockTime.SetPosition(THEME.clock_x, THEME.clock_y+3);
|
||||||
clockTime.SetPosition(THEME.clock_x, THEME.clock_y+3);}
|
}
|
||||||
|
|
||||||
HaltGui();
|
HaltGui();
|
||||||
GuiWindow w(screenwidth, screenheight);
|
GuiWindow w(screenwidth, screenheight);
|
||||||
@ -3264,8 +3293,9 @@ static int MenuDiscList()
|
|||||||
w.Append(&favoriteBtn);
|
w.Append(&favoriteBtn);
|
||||||
w.Append(&abcBtn);
|
w.Append(&abcBtn);
|
||||||
w.Append(&countBtn);
|
w.Append(&countBtn);
|
||||||
|
w.Append(&listBtn);
|
||||||
w.Append(&gridBtn);
|
w.Append(&gridBtn);
|
||||||
w.Append(&carosselleBtn);
|
w.Append(&carouselBtn);
|
||||||
|
|
||||||
if((Settings.hddinfo == hr12)||(Settings.hddinfo == hr24))
|
if((Settings.hddinfo == hr12)||(Settings.hddinfo == hr24))
|
||||||
{
|
{
|
||||||
@ -3275,6 +3305,7 @@ static int MenuDiscList()
|
|||||||
|
|
||||||
if (Settings.gameDisplay==list){mainWindow->Append(&gameBrowser);}
|
if (Settings.gameDisplay==list){mainWindow->Append(&gameBrowser);}
|
||||||
if (Settings.gameDisplay==grid){mainWindow->Append(&gameGrid);}
|
if (Settings.gameDisplay==grid){mainWindow->Append(&gameGrid);}
|
||||||
|
if (Settings.gameDisplay==carousel){mainWindow->Append(&gameCarousel);}
|
||||||
mainWindow->Append(&w);
|
mainWindow->Append(&w);
|
||||||
|
|
||||||
ResumeGui();
|
ResumeGui();
|
||||||
@ -3284,23 +3315,6 @@ static int MenuDiscList()
|
|||||||
|
|
||||||
VIDEO_WaitVSync ();
|
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
|
//CLOCK
|
||||||
time_t rawtime = time(0); //this fixes code dump caused by the clock
|
time_t rawtime = time(0); //this fixes code dump caused by the clock
|
||||||
if (((Settings.hddinfo == hr12)||(Settings.hddinfo == hr24)) && rawtime != lastrawtime) {
|
if (((Settings.hddinfo == hr12)||(Settings.hddinfo == hr24)) && rawtime != lastrawtime) {
|
||||||
@ -3363,6 +3377,7 @@ static int MenuDiscList()
|
|||||||
poweroffBtn.ResetState();
|
poweroffBtn.ResetState();
|
||||||
if (Settings.gameDisplay==list){gameBrowser.SetFocus(1);}
|
if (Settings.gameDisplay==list){gameBrowser.SetFocus(1);}
|
||||||
else if (Settings.gameDisplay==grid){gameGrid.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();
|
homeBtn.ResetState();
|
||||||
if (Settings.gameDisplay==list){gameBrowser.SetFocus(1);}
|
if (Settings.gameDisplay==list){gameBrowser.SetFocus(1);}
|
||||||
else if (Settings.gameDisplay==grid){gameGrid.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();
|
wiiBtn.ResetState();
|
||||||
if (Settings.gameDisplay==list){gameBrowser.SetFocus(1);}
|
if (Settings.gameDisplay==list){gameBrowser.SetFocus(1);}
|
||||||
else if (Settings.gameDisplay==grid){gameGrid.SetFocus(1);}
|
else if (Settings.gameDisplay==grid){gameGrid.SetFocus(1);}
|
||||||
|
else if (Settings.gameDisplay==carousel){gameCarousel.SetFocus(1);}
|
||||||
}
|
}
|
||||||
else if(installBtn.GetState() == STATE_CLICKED)
|
else if(installBtn.GetState() == STATE_CLICKED)
|
||||||
{
|
{
|
||||||
@ -3416,6 +3433,7 @@ static int MenuDiscList()
|
|||||||
installBtn.ResetState();
|
installBtn.ResetState();
|
||||||
if (Settings.gameDisplay==list){gameBrowser.SetFocus(1);}
|
if (Settings.gameDisplay==list){gameBrowser.SetFocus(1);}
|
||||||
else if (Settings.gameDisplay==grid){gameGrid.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){
|
else if (Settings.gameDisplay==grid){
|
||||||
startat = gameGrid.GetSelectedOption();
|
startat = gameGrid.GetSelectedOption();
|
||||||
offset = gameGrid.GetOffset();}
|
offset = gameGrid.GetOffset();}
|
||||||
|
else if (Settings.gameDisplay==carousel){
|
||||||
|
startat = gameCarousel.GetSelectedOption();
|
||||||
|
offset = gameCarousel.GetOffset();}
|
||||||
if(isSdInserted()) {
|
if(isSdInserted()) {
|
||||||
CFG_Load();
|
CFG_Load();
|
||||||
}
|
}
|
||||||
@ -3492,6 +3513,7 @@ static int MenuDiscList()
|
|||||||
DownloadBtn.ResetState();
|
DownloadBtn.ResetState();
|
||||||
if (Settings.gameDisplay==list){gameBrowser.SetFocus(1);}
|
if (Settings.gameDisplay==list){gameBrowser.SetFocus(1);}
|
||||||
else if (Settings.gameDisplay==grid){gameGrid.SetFocus(1);}
|
else if (Settings.gameDisplay==grid){gameGrid.SetFocus(1);}
|
||||||
|
else if (Settings.gameDisplay==carousel){gameCarousel.SetFocus(1);}
|
||||||
}//end download
|
}//end download
|
||||||
|
|
||||||
else if(settingsBtn.GetState() == STATE_CLICKED)
|
else if(settingsBtn.GetState() == STATE_CLICKED)
|
||||||
@ -3501,6 +3523,9 @@ static int MenuDiscList()
|
|||||||
else if (Settings.gameDisplay==grid){
|
else if (Settings.gameDisplay==grid){
|
||||||
startat = gameGrid.GetSelectedOption();
|
startat = gameGrid.GetSelectedOption();
|
||||||
offset = gameGrid.GetOffset();}
|
offset = gameGrid.GetOffset();}
|
||||||
|
else if (Settings.gameDisplay==carousel){
|
||||||
|
startat = gameCarousel.GetSelectedOption();
|
||||||
|
offset = gameCarousel.GetOffset();}
|
||||||
menu = MENU_SETTINGS;
|
menu = MENU_SETTINGS;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -3517,6 +3542,8 @@ static int MenuDiscList()
|
|||||||
gameBrowser.Reload(gameList, gameCnt);}
|
gameBrowser.Reload(gameList, gameCnt);}
|
||||||
else if (Settings.gameDisplay==grid){
|
else if (Settings.gameDisplay==grid){
|
||||||
gameGrid.Reload(gameList, gameCnt);}
|
gameGrid.Reload(gameList, gameCnt);}
|
||||||
|
else if (Settings.gameDisplay==carousel){
|
||||||
|
gameCarousel.Reload(gameList, gameCnt);}
|
||||||
gamecntTxt.SetTextf("%s: %i",LANGUAGE.Games, gameCnt);
|
gamecntTxt.SetTextf("%s: %i",LANGUAGE.Games, gameCnt);
|
||||||
selectedold = 1;
|
selectedold = 1;
|
||||||
favoriteBtn.ResetState();
|
favoriteBtn.ResetState();
|
||||||
@ -3535,6 +3562,8 @@ static int MenuDiscList()
|
|||||||
gameBrowser.Reload(gameList, gameCnt);}
|
gameBrowser.Reload(gameList, gameCnt);}
|
||||||
else if (Settings.gameDisplay==grid){
|
else if (Settings.gameDisplay==grid){
|
||||||
gameGrid.Reload(gameList, gameCnt);}
|
gameGrid.Reload(gameList, gameCnt);}
|
||||||
|
else if (Settings.gameDisplay==carousel){
|
||||||
|
gameCarousel.Reload(gameList, gameCnt);}
|
||||||
selectedold = 1;
|
selectedold = 1;
|
||||||
abcBtn.SetImage(&abcBtnImg);
|
abcBtn.SetImage(&abcBtnImg);
|
||||||
abcBtn.SetAlpha(255);
|
abcBtn.SetAlpha(255);
|
||||||
@ -3556,6 +3585,8 @@ static int MenuDiscList()
|
|||||||
gameBrowser.Reload(gameList, gameCnt);}
|
gameBrowser.Reload(gameList, gameCnt);}
|
||||||
else if (Settings.gameDisplay==grid){
|
else if (Settings.gameDisplay==grid){
|
||||||
gameGrid.Reload(gameList, gameCnt);}
|
gameGrid.Reload(gameList, gameCnt);}
|
||||||
|
else if (Settings.gameDisplay==carousel){
|
||||||
|
gameCarousel.Reload(gameList, gameCnt);}
|
||||||
selectedold = 1;
|
selectedold = 1;
|
||||||
abcBtn.SetImage(&abcBtnImg_g);
|
abcBtn.SetImage(&abcBtnImg_g);
|
||||||
abcBtn.SetAlpha(180);
|
abcBtn.SetAlpha(180);
|
||||||
@ -3564,34 +3595,96 @@ static int MenuDiscList()
|
|||||||
}
|
}
|
||||||
countBtn.ResetState();
|
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);
|
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
|
gameGrid.Reload(gameList, gameCnt); // initialize before append
|
||||||
mainWindow->Append(&gameGrid);
|
mainWindow->Append(&gameGrid);
|
||||||
|
gridBtn.SetImage(&gridBtnImg);
|
||||||
if (GameIDTxt)w.Remove(GameIDTxt);
|
gridBtn.SetAlpha(255);
|
||||||
if (GameRegionTxt)w.Remove(GameRegionTxt);
|
|
||||||
w.Remove(&DownloadBtn);
|
|
||||||
|
|
||||||
gridBtn.SetImage(&listBtnImg_g);
|
|
||||||
gridBtn.SetImageOver(&listBtnImg_g);
|
|
||||||
if(CFG.widescreen)
|
if(CFG.widescreen)
|
||||||
{
|
{
|
||||||
favoriteBtn.SetPosition(THEME.favorite_x-THEME.sortBarOffset, THEME.favorite_y);
|
favoriteBtn.SetPosition(THEME.favorite_x-THEME.sortBarOffset, THEME.favorite_y);
|
||||||
abcBtn.SetPosition(THEME.abc_x-THEME.sortBarOffset, THEME.abc_y);
|
abcBtn.SetPosition(THEME.abc_x-THEME.sortBarOffset, THEME.abc_y);
|
||||||
countBtn.SetPosition(THEME.count_x-THEME.sortBarOffset, THEME.count_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);
|
gridBtn.SetPosition(THEME.grid_x-THEME.sortBarOffset, THEME.grid_y);
|
||||||
carosselleBtn.SetPosition(THEME.carousel_x-THEME.sortBarOffset, THEME.carousel_y);
|
carouselBtn.SetPosition(THEME.carousel_x-THEME.sortBarOffset, THEME.carousel_y);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
favoriteBtn.SetPosition(THEME.favorite_x-20-THEME.sortBarOffset, THEME.favorite_y);
|
favoriteBtn.SetPosition(THEME.favorite_x-20-THEME.sortBarOffset, THEME.favorite_y);
|
||||||
abcBtn.SetPosition(THEME.abc_x-12-THEME.sortBarOffset, THEME.abc_y);
|
abcBtn.SetPosition(THEME.abc_x-12-THEME.sortBarOffset, THEME.abc_y);
|
||||||
countBtn.SetPosition(THEME.count_x-4-THEME.sortBarOffset, THEME.count_y);
|
countBtn.SetPosition(THEME.count_x-4-THEME.sortBarOffset, THEME.count_y);
|
||||||
gridBtn.SetPosition(THEME.grid_x+4-THEME.sortBarOffset, THEME.grid_y);
|
listBtn.SetPosition(THEME.list_x+4-THEME.sortBarOffset, THEME.list_y);
|
||||||
carosselleBtn.SetPosition(THEME.carousel_x+12-THEME.sortBarOffset, THEME.carousel_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)) {
|
if((Settings.hddinfo == hr12)||(Settings.hddinfo == hr24)) {
|
||||||
clockTime.SetPosition(THEME.clock_x, THEME.clock_y+3);
|
clockTime.SetPosition(THEME.clock_x, THEME.clock_y+3);
|
||||||
@ -3602,67 +3695,83 @@ static int MenuDiscList()
|
|||||||
w.Append(&favoriteBtn);
|
w.Append(&favoriteBtn);
|
||||||
w.Append(&abcBtn);
|
w.Append(&abcBtn);
|
||||||
w.Append(&countBtn);
|
w.Append(&countBtn);
|
||||||
|
w.Append(&listBtn);
|
||||||
w.Append(&gridBtn);
|
w.Append(&gridBtn);
|
||||||
w.Append(&carosselleBtn);
|
w.Append(&carouselBtn);
|
||||||
|
if(isSdInserted()) {
|
||||||
} else if (Settings.gameDisplay==grid){
|
cfg_save_global();
|
||||||
Settings.gameDisplay=list;
|
}
|
||||||
|
}
|
||||||
|
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);
|
mainWindow->Remove(&gameGrid);
|
||||||
gameBrowser.Reload(gameList, gameCnt); // initialize before append
|
|
||||||
mainWindow->Append(&gameBrowser);
|
|
||||||
gridBtn.SetImage(&gridBtnImg_g);
|
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)
|
if(CFG.widescreen)
|
||||||
{
|
{
|
||||||
favoriteBtn.SetPosition(THEME.favorite_x, THEME.favorite_y);
|
favoriteBtn.SetPosition(THEME.favorite_x-THEME.sortBarOffset, THEME.favorite_y);
|
||||||
abcBtn.SetPosition(THEME.abc_x, THEME.abc_y);
|
abcBtn.SetPosition(THEME.abc_x-THEME.sortBarOffset, THEME.abc_y);
|
||||||
countBtn.SetPosition(THEME.count_x, THEME.count_y);
|
countBtn.SetPosition(THEME.count_x-THEME.sortBarOffset, THEME.count_y);
|
||||||
gridBtn.SetPosition(THEME.grid_x, THEME.grid_y);
|
listBtn.SetPosition(THEME.list_x-THEME.sortBarOffset, THEME.list_y);
|
||||||
carosselleBtn.SetPosition(THEME.carousel_x, THEME.carousel_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)) {
|
if((Settings.hddinfo == hr12)||(Settings.hddinfo == hr24)) {
|
||||||
clockTime.SetPosition(THEME.clock_x, THEME.clock_y);
|
clockTime.SetPosition(THEME.clock_x, THEME.clock_y+3);
|
||||||
clockTimeBack.SetPosition(THEME.clock_x, THEME.clock_y);
|
clockTimeBack.SetPosition(THEME.clock_x, THEME.clock_y+3);
|
||||||
w.Append(&clockTime);
|
w.Append(&clockTime);
|
||||||
w.Append(&clockTimeBack);
|
w.Append(&clockTimeBack);
|
||||||
}
|
}
|
||||||
w.Append(&favoriteBtn);
|
w.Append(&favoriteBtn);
|
||||||
w.Append(&abcBtn);
|
w.Append(&abcBtn);
|
||||||
w.Append(&countBtn);
|
w.Append(&countBtn);
|
||||||
|
w.Append(&listBtn);
|
||||||
w.Append(&gridBtn);
|
w.Append(&gridBtn);
|
||||||
w.Append(&carosselleBtn);
|
w.Append(&carouselBtn);
|
||||||
w.Append(&DownloadBtn);
|
|
||||||
}
|
|
||||||
if(isSdInserted()) {
|
if(isSdInserted()) {
|
||||||
cfg_save_global();
|
cfg_save_global();
|
||||||
}
|
}
|
||||||
//menu = MENU_DISCLIST;
|
}
|
||||||
gridBtn.ResetState();
|
carouselBtn.ResetState();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Settings.gameDisplay==grid){
|
if (Settings.gameDisplay==grid){
|
||||||
int selectimg;
|
int selectimg;
|
||||||
selectimg = gameGrid.GetSelectedOption();
|
selectimg = gameGrid.GetSelectedOption();
gameSelected = gameGrid.GetClickedOption();
}
|
||||||
gameSelected = gameGrid.GetClickedOption();
|
|
||||||
}
|
if (Settings.gameDisplay==carousel){
|
||||||
|
int selectimg;
|
||||||
|
selectimg = gameCarousel.GetSelectedOption();
gameSelected = gameCarousel.GetClickedOption();
}
|
||||||
|
|
||||||
if (Settings.gameDisplay==list) {
|
if (Settings.gameDisplay==list) {
|
||||||
//Get selected game under cursor
|
//Get selected game under cursor
|
||||||
int selectimg;//, promptnumber;
|
int selectimg;//, promptnumber;
|
||||||
char ID[4];
|
char ID[4];
|
||||||
char IDfull[7];
|
char IDfull[7];
|
||||||
selectimg = gameBrowser.GetSelectedOption();
|
selectimg = gameBrowser.GetSelectedOption();
gameSelected = gameBrowser.GetClickedOption();
|
||||||
gameSelected = gameBrowser.GetClickedOption();
|
|
||||||
|
|
||||||
|
|
||||||
if (gameSelected > 0) //if click occured
|
if (gameSelected > 0) //if click occured
|
||||||
@ -4015,6 +4124,7 @@ static int MenuDiscList()
|
|||||||
else if(choice == 0)
|
else if(choice == 0)
|
||||||
if (Settings.gameDisplay==list){gameBrowser.SetFocus(1);}
|
if (Settings.gameDisplay==list){gameBrowser.SetFocus(1);}
|
||||||
else if (Settings.gameDisplay==grid){gameGrid.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();
|
HaltGui();
|
||||||
if (Settings.gameDisplay==list)mainWindow->Remove(&gameBrowser);
|
if (Settings.gameDisplay==list)mainWindow->Remove(&gameBrowser);
|
||||||
else if (Settings.gameDisplay==grid)mainWindow->Remove(&gameGrid);
|
else if (Settings.gameDisplay==grid)mainWindow->Remove(&gameGrid);
|
||||||
|
else if (Settings.gameDisplay==carousel)mainWindow->Remove(&gameCarousel);
|
||||||
mainWindow->Remove(&w);
|
mainWindow->Remove(&w);
|
||||||
ResumeGui();
|
ResumeGui();
|
||||||
return menu;
|
return menu;
|
||||||
|
Loading…
Reference in New Issue
Block a user