- fix to keep check boxes selected when not using the pointer.

This commit is contained in:
Fledge68 2019-10-21 17:44:34 -05:00
parent ebe85b1a60
commit d22b1e26a7
5 changed files with 15 additions and 0 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 MiB

After

Width:  |  Height:  |  Size: 3.4 MiB

View File

@ -487,6 +487,15 @@ bool CButtonsMgr::selected(s16 button)
return false;
}
void CButtonsMgr::setSelected(s16 button)
{
SElement &b = *m_elts[button];
m_selected[0] = button;
b.targetScaleX = 1.1f;
b.targetScaleY = 1.1f;
}
// **********************************************************************************************
// * Plays the click sound for the function above. Also sets rumble off and enlarges button *
// **********************************************************************************************

View File

@ -64,6 +64,7 @@ public:
void noHover(bool nohover = false);
void click(s16 id = -1);
bool selected(s16 button = -1);
void setSelected(s16 button);
void setRumble(int, bool wii = false, bool gc = false, bool wupc = false);
void deselect(void){ for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--) m_selected[chan] = -1; }
void stopSounds(void);

View File

@ -375,15 +375,19 @@ void CMenu::_CategorySettings(bool fromGameSet)
{
case '0':
m_btnMgr.show(m_categoryBtnCat[i]);
m_btnMgr.setSelected(m_categoryBtnCat[i]);
break;
case '1':
m_btnMgr.show(m_categoryBtnCats[i]);
m_btnMgr.setSelected(m_categoryBtnCats[i]);
break;
case '2':
m_btnMgr.show(m_categoryBtnCatHid[i]);
m_btnMgr.setSelected(m_categoryBtnCatHid[i]);
break;
default:
m_btnMgr.show(m_categoryBtnCatReq[i]);
m_btnMgr.setSelected(m_categoryBtnCatReq[i]);
break;
}
break;

View File

@ -162,6 +162,7 @@ void CMenu::_PluginSettings()
else
m_plugin.SetEnablePlugin(m_cfg, i+IteratorHelp-1);// switch plugin from off to on or vice versa
_updatePluginCheckboxes();
m_btnMgr.setSelected(m_pluginBtn[i]);
break;
}
}