mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-04 18:45:05 +01:00
Probably fixed the code dump from pressing down during the synopsis and it doesn't fill the page.
This commit is contained in:
parent
e91ee15ba8
commit
d202fc34a6
@ -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
|
||||
|
||||
// button triggers
|
||||
|
@ -40,6 +40,7 @@ GuiGameCarousel::GuiGameCarousel(int w, int h, struct discHdr * l, int count, co
|
||||
listOffset = (offset == 0) ? this->FindMenuItem(-1, 1) : offset;
|
||||
selectable = true;
|
||||
selectedItem = selected - offset;
|
||||
if (selectedItem==0)selectedItem=(pagesize+1)/2;
|
||||
focus = 1; // allow focus
|
||||
firstPic = 0;
|
||||
clickedItem = -1;
|
||||
@ -244,7 +245,7 @@ void GuiGameCarousel::Draw()
|
||||
return;
|
||||
|
||||
int next = listOffset;
|
||||
|
||||
|
||||
for(int i=0; i<pagesize; i++) {
|
||||
if(next >= 0) {
|
||||
game[i]->SetImage(ImageBuffer(i));
|
||||
|
@ -243,6 +243,8 @@ int autoSelectDol(const char *id)
|
||||
if (strcmp(id,"RM269") == 0) return 492;
|
||||
if (strcmp(id,"RKM5D") == 0) return 290;
|
||||
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
|
||||
|
||||
return -1;
|
||||
|
@ -662,8 +662,6 @@ int showGameInfo(char *ID)
|
||||
{
|
||||
|
||||
VIDEO_WaitVSync();
|
||||
|
||||
//u32 buttonshold = ButtonsHold();
|
||||
if(shutdown == 1)
|
||||
{
|
||||
wiilight(0);
|
||||
@ -680,12 +678,8 @@ int showGameInfo(char *ID)
|
||||
else if (page==2)
|
||||
{
|
||||
HaltGui();
|
||||
//backBtn.SetClickable(true);
|
||||
gameinfoWindow2.SetVisible(false);
|
||||
gameinfoWindow.SetVisible(true);
|
||||
//gameinfoWindow.Append(&backBtn);
|
||||
//gameinfoWindow.Append(&nextBtn);
|
||||
//gameinfoWindow.Append(&homeBtn);
|
||||
mainWindow->Remove(&gameinfoWindow2);
|
||||
ResumeGui();
|
||||
page=1;
|
||||
@ -733,21 +727,22 @@ int showGameInfo(char *ID)
|
||||
if (!((ButtonsHold() & WPAD_BUTTON_UP)||(ButtonsHold() & PAD_BUTTON_UP)))
|
||||
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;
|
||||
if(synopsisTxt->GetTotalLines()>pagesize)
|
||||
l=synopsisTxt->GetFirstLine()+1;
|
||||
|
||||
if (l>synopsisTxt->GetTotalLines()+1-pagesize)
|
||||
l=synopsisTxt->GetTotalLines()+1-pagesize;
|
||||
if (l>(synopsisTxt->GetTotalLines()+1)-pagesize)
|
||||
l=(synopsisTxt->GetTotalLines()+1)-pagesize;
|
||||
|
||||
synopsisTxt->SetFirstLine(l);
|
||||
usleep(60000);
|
||||
if (!((ButtonsHold() & WPAD_BUTTON_DOWN)||(ButtonsHold() & PAD_BUTTON_DOWN)))
|
||||
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)
|
||||
{
|
||||
if(page==1)
|
||||
|
Loading…
Reference in New Issue
Block a user