diff --git a/source/ngc/gui/gui_button.cpp b/source/ngc/gui/gui_button.cpp index 0c2c41c..0b5a9a7 100644 --- a/source/ngc/gui/gui_button.cpp +++ b/source/ngc/gui/gui_button.cpp @@ -226,10 +226,13 @@ void GuiButton::Update(GuiTrigger * t) { if(state == STATE_SELECTED) { - this->SetState(STATE_CLICKED, t->chan); + if(!t->wpad.ir.valid || this->IsInside(t->wpad.ir.x, t->wpad.ir.y)) + { + this->SetState(STATE_CLICKED, t->chan); - if(soundClick) - soundClick->Play(); + if(soundClick) + soundClick->Play(); + } } else if(trigger[i]->type == TRIGGER_BUTTON_ONLY) { diff --git a/source/ngc/gui/gui_filebrowser.cpp b/source/ngc/gui/gui_filebrowser.cpp index 183d09f..20dd518 100644 --- a/source/ngc/gui/gui_filebrowser.cpp +++ b/source/ngc/gui/gui_filebrowser.cpp @@ -357,13 +357,10 @@ void GuiFileBrowser::Update(GuiTrigger * t) } } - if(focus) - { - if(i != selectedItem && gameList[i]->GetState() == STATE_SELECTED) - gameList[i]->ResetState(); - else if(i == selectedItem && gameList[i]->GetState() == STATE_DEFAULT) - gameList[selectedItem]->SetState(STATE_SELECTED, t->chan); - } + if(i != selectedItem && gameList[i]->GetState() == STATE_SELECTED) + gameList[i]->ResetState(); + else if(focus && i == selectedItem && gameList[i]->GetState() == STATE_DEFAULT) + gameList[selectedItem]->SetState(STATE_SELECTED, t->chan); int currChan = t->chan; diff --git a/source/ngc/gui/gui_optionbrowser.cpp b/source/ngc/gui/gui_optionbrowser.cpp index 6a14aff..c2a553e 100644 --- a/source/ngc/gui/gui_optionbrowser.cpp +++ b/source/ngc/gui/gui_optionbrowser.cpp @@ -261,13 +261,10 @@ void GuiOptionBrowser::Update(GuiTrigger * t) optionBtn[i]->SetState(STATE_DISABLED); } - if(focus) - { - if(i != selectedItem && optionBtn[i]->GetState() == STATE_SELECTED) - optionBtn[i]->ResetState(); - else if(i == selectedItem && optionBtn[i]->GetState() == STATE_DEFAULT) - optionBtn[selectedItem]->SetState(STATE_SELECTED, t->chan); - } + if(i != selectedItem && optionBtn[i]->GetState() == STATE_SELECTED) + optionBtn[i]->ResetState(); + else if(focus && i == selectedItem && optionBtn[i]->GetState() == STATE_DEFAULT) + optionBtn[selectedItem]->SetState(STATE_SELECTED, t->chan); int currChan = t->chan;