Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void MultiSwitchMenuItem::ButtonPressed(u32 button)
- {
- if (button & (vpb_Left | vpb_Right))
- {
- for(vector<Switch>::iterator ite=_multiSwitches.begin();ite!=_multiSwitches.end();ite++)
- {
- if(ite->Activated)
- {
- if (button & (vpb_Left)) // gauche
- {
- if(ite==_multiSwitches.begin()) // si premeir element -> on passe au dernier
- {
- _multiSwitches.end()->Activated=true;
- }
- else
- {
- }
- }
- else // droite
- {
- if(ite==_multiSwitches.end()) // si dernier element -> on passe au dernier
- {
- _multiSwitches.begin()->Activated=true;
- }
- else
- {
- }
- }
- ite->Activated=false;
- break;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement