Probably fixed the code dump from pressing down during the synopsis and it doesn't fill the page.

This commit is contained in:
giantpune 2009-07-17 06:42:01 +00:00
parent e91ee15ba8
commit d202fc34a6
4 changed files with 23 additions and 11 deletions

View File

@ -390,6 +390,20 @@ void GuiButton::Update(GuiTrigger * t)
} }
} }
} }
#else
if(state == STATE_SELECTED && (stateChan == t->chan || stateChan == -1))
this->ResetState();
if(effectTarget == effectTargetOver && effectAmount == effectAmountOver)
{
// initiate effects (in reverse)
effects = effectsOver;
effectAmount = -effectAmountOver;
effectTarget = 100;
}
#endif #endif
// button triggers // button triggers

View File

@ -40,6 +40,7 @@ GuiGameCarousel::GuiGameCarousel(int w, int h, struct discHdr * l, int count, co
listOffset = (offset == 0) ? this->FindMenuItem(-1, 1) : offset; listOffset = (offset == 0) ? this->FindMenuItem(-1, 1) : offset;
selectable = true; selectable = true;
selectedItem = selected - offset; selectedItem = selected - offset;
if (selectedItem==0)selectedItem=(pagesize+1)/2;
focus = 1; // allow focus focus = 1; // allow focus
firstPic = 0; firstPic = 0;
clickedItem = -1; clickedItem = -1;

View File

@ -243,6 +243,8 @@ int autoSelectDol(const char *id)
if (strcmp(id,"RM269") == 0) return 492; if (strcmp(id,"RM269") == 0) return 492;
if (strcmp(id,"RKM5D") == 0) return 290; if (strcmp(id,"RKM5D") == 0) return 290;
if (strcmp(id,"RJ864") == 0) return 8; if (strcmp(id,"RJ864") == 0) return 8;
if (strcmp(id,"RM269") == 0) return 517;
if (strcmp(id,"RMLH4") == 0) return 54;
//if (strcmp(id,"") == 0) return ; //blank line for more dols //if (strcmp(id,"") == 0) return ; //blank line for more dols
return -1; return -1;

View File

@ -662,8 +662,6 @@ int showGameInfo(char *ID)
{ {
VIDEO_WaitVSync(); VIDEO_WaitVSync();
//u32 buttonshold = ButtonsHold();
if(shutdown == 1) if(shutdown == 1)
{ {
wiilight(0); wiilight(0);
@ -680,12 +678,8 @@ int showGameInfo(char *ID)
else if (page==2) else if (page==2)
{ {
HaltGui(); HaltGui();
//backBtn.SetClickable(true);
gameinfoWindow2.SetVisible(false); gameinfoWindow2.SetVisible(false);
gameinfoWindow.SetVisible(true); gameinfoWindow.SetVisible(true);
//gameinfoWindow.Append(&backBtn);
//gameinfoWindow.Append(&nextBtn);
//gameinfoWindow.Append(&homeBtn);
mainWindow->Remove(&gameinfoWindow2); mainWindow->Remove(&gameinfoWindow2);
ResumeGui(); ResumeGui();
page=1; page=1;
@ -733,21 +727,22 @@ int showGameInfo(char *ID)
if (!((ButtonsHold() & WPAD_BUTTON_UP)||(ButtonsHold() & PAD_BUTTON_UP))) if (!((ButtonsHold() & WPAD_BUTTON_UP)||(ButtonsHold() & PAD_BUTTON_UP)))
upBtn.ResetState(); upBtn.ResetState();
} }
else if ((dnBtn.GetState()==STATE_CLICKED||dnBtn.GetState()==STATE_HELD) && page==2) else if ((dnBtn.GetState()==STATE_CLICKED||dnBtn.GetState()==STATE_HELD) && page==2
&&synopsisTxt->GetTotalLines()>pagesize
&&synopsisTxt->GetFirstLine()<synopsisTxt->GetTotalLines()-pagesize)
{ {
int l=0; int l=0;
if(synopsisTxt->GetTotalLines()>pagesize) if(synopsisTxt->GetTotalLines()>pagesize)
l=synopsisTxt->GetFirstLine()+1; l=synopsisTxt->GetFirstLine()+1;
if (l>synopsisTxt->GetTotalLines()+1-pagesize) if (l>(synopsisTxt->GetTotalLines()+1)-pagesize)
l=synopsisTxt->GetTotalLines()+1-pagesize; l=(synopsisTxt->GetTotalLines()+1)-pagesize;
synopsisTxt->SetFirstLine(l); synopsisTxt->SetFirstLine(l);
usleep(60000); usleep(60000);
if (!((ButtonsHold() & WPAD_BUTTON_DOWN)||(ButtonsHold() & PAD_BUTTON_DOWN))) if (!((ButtonsHold() & WPAD_BUTTON_DOWN)||(ButtonsHold() & PAD_BUTTON_DOWN)))
dnBtn.ResetState(); dnBtn.ResetState();
} }
//took this out cause it doesnt act right when not called from the main window and I don't feel like fixing it right now
else if (homeBtn.GetState()==STATE_CLICKED) else if (homeBtn.GetState()==STATE_CLICKED)
{ {
if(page==1) if(page==1)