mirror of
https://github.com/dborth/vbagx.git
synced 2024-11-23 02:59:17 +01:00
more GUI logic corrections
This commit is contained in:
parent
dc33859cc4
commit
a2f4cbae70
@ -225,12 +225,15 @@ void GuiButton::Update(GuiTrigger * t)
|
|||||||
if(t->chan == stateChan || stateChan == -1)
|
if(t->chan == stateChan || stateChan == -1)
|
||||||
{
|
{
|
||||||
if(state == STATE_SELECTED)
|
if(state == STATE_SELECTED)
|
||||||
|
{
|
||||||
|
if(!t->wpad.ir.valid || this->IsInside(t->wpad.ir.x, t->wpad.ir.y))
|
||||||
{
|
{
|
||||||
this->SetState(STATE_CLICKED, t->chan);
|
this->SetState(STATE_CLICKED, t->chan);
|
||||||
|
|
||||||
if(soundClick)
|
if(soundClick)
|
||||||
soundClick->Play();
|
soundClick->Play();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if(trigger[i]->type == TRIGGER_BUTTON_ONLY)
|
else if(trigger[i]->type == TRIGGER_BUTTON_ONLY)
|
||||||
{
|
{
|
||||||
this->SetState(STATE_CLICKED, t->chan);
|
this->SetState(STATE_CLICKED, t->chan);
|
||||||
|
@ -357,13 +357,10 @@ void GuiFileBrowser::Update(GuiTrigger * t)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(focus)
|
|
||||||
{
|
|
||||||
if(i != selectedItem && gameList[i]->GetState() == STATE_SELECTED)
|
if(i != selectedItem && gameList[i]->GetState() == STATE_SELECTED)
|
||||||
gameList[i]->ResetState();
|
gameList[i]->ResetState();
|
||||||
else if(i == selectedItem && gameList[i]->GetState() == STATE_DEFAULT)
|
else if(focus && i == selectedItem && gameList[i]->GetState() == STATE_DEFAULT)
|
||||||
gameList[selectedItem]->SetState(STATE_SELECTED, t->chan);
|
gameList[selectedItem]->SetState(STATE_SELECTED, t->chan);
|
||||||
}
|
|
||||||
|
|
||||||
int currChan = t->chan;
|
int currChan = t->chan;
|
||||||
|
|
||||||
|
@ -261,13 +261,10 @@ void GuiOptionBrowser::Update(GuiTrigger * t)
|
|||||||
optionBtn[i]->SetState(STATE_DISABLED);
|
optionBtn[i]->SetState(STATE_DISABLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(focus)
|
|
||||||
{
|
|
||||||
if(i != selectedItem && optionBtn[i]->GetState() == STATE_SELECTED)
|
if(i != selectedItem && optionBtn[i]->GetState() == STATE_SELECTED)
|
||||||
optionBtn[i]->ResetState();
|
optionBtn[i]->ResetState();
|
||||||
else if(i == selectedItem && optionBtn[i]->GetState() == STATE_DEFAULT)
|
else if(focus && i == selectedItem && optionBtn[i]->GetState() == STATE_DEFAULT)
|
||||||
optionBtn[selectedItem]->SetState(STATE_SELECTED, t->chan);
|
optionBtn[selectedItem]->SetState(STATE_SELECTED, t->chan);
|
||||||
}
|
|
||||||
|
|
||||||
int currChan = t->chan;
|
int currChan = t->chan;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user