mirror of
https://github.com/dborth/vbagx.git
synced 2024-11-25 12:06:53 +01:00
GUI behavioral corrections
This commit is contained in:
parent
0998b084ea
commit
dd90a80436
@ -161,7 +161,7 @@ void GuiButton::Update(GuiTrigger * t)
|
||||
|
||||
#ifdef HW_RVL
|
||||
// cursor
|
||||
if(t->wpad.ir.valid)
|
||||
if(t->wpad.ir.valid && t->chan >= 0)
|
||||
{
|
||||
if(this->IsInside(t->wpad.ir.x, t->wpad.ir.y))
|
||||
{
|
||||
|
@ -365,7 +365,13 @@ void GuiFileBrowser::Update(GuiTrigger * t)
|
||||
gameList[selectedItem]->SetState(STATE_SELECTED, t->chan);
|
||||
}
|
||||
|
||||
int currChan = t->chan;
|
||||
|
||||
if(t->wpad.ir.valid && !gameList[i]->IsInside(t->wpad.ir.x, t->wpad.ir.y))
|
||||
t->chan = -1;
|
||||
|
||||
gameList[i]->Update(t);
|
||||
t->chan = currChan;
|
||||
|
||||
if(gameList[i]->GetState() == STATE_SELECTED)
|
||||
{
|
||||
|
@ -270,13 +270,17 @@ void GuiOptionBrowser::Update(GuiTrigger * t)
|
||||
optionBtn[selectedItem]->SetState(STATE_SELECTED, t->chan);
|
||||
}
|
||||
|
||||
int currChan = t->chan;
|
||||
|
||||
if(t->wpad.ir.valid && !optionBtn[i]->IsInside(t->wpad.ir.x, t->wpad.ir.y))
|
||||
t->chan = -1;
|
||||
|
||||
optionBtn[i]->Update(t);
|
||||
t->chan = currChan;
|
||||
|
||||
if(optionBtn[i]->GetState() == STATE_SELECTED)
|
||||
{
|
||||
selectedItem = i;
|
||||
}
|
||||
}
|
||||
|
||||
// pad/joystick navigation
|
||||
if(!focus)
|
||||
|
@ -284,7 +284,6 @@ void GuiSaveBrowser::Update(GuiTrigger * t)
|
||||
{
|
||||
selectedItem += 2;
|
||||
}
|
||||
arrowDownBtn->ResetState();
|
||||
}
|
||||
else if(t->Up() || arrowUpBtn->GetState() == STATE_CLICKED)
|
||||
{
|
||||
@ -301,11 +300,16 @@ void GuiSaveBrowser::Update(GuiTrigger * t)
|
||||
{
|
||||
selectedItem -= 2;
|
||||
}
|
||||
arrowUpBtn->ResetState();
|
||||
}
|
||||
|
||||
endNavigation:
|
||||
|
||||
if(arrowDownBtn->GetState() == STATE_CLICKED)
|
||||
arrowDownBtn->ResetState();
|
||||
|
||||
if(arrowUpBtn->GetState() == STATE_CLICKED)
|
||||
arrowUpBtn->ResetState();
|
||||
|
||||
for(i=0; i<SAVELISTSIZE; i++)
|
||||
{
|
||||
if(listOffset+i < 0 && action == 1)
|
||||
|
@ -1564,6 +1564,7 @@ static int MenuGameSaves(int action)
|
||||
|
||||
HaltGui();
|
||||
mainWindow->Append(&saveBrowser);
|
||||
mainWindow->ChangeFocus(&saveBrowser);
|
||||
ResumeGui();
|
||||
|
||||
while(menu == MENU_NONE)
|
||||
|
Loading…
Reference in New Issue
Block a user