Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
StartMenu/StartMenu.cpp
- Committer:
- ll17lrc
- Date:
- 2020-05-16
- Revision:
- 2:823dea76ff2e
- Child:
- 3:4494e6928194
File content as of revision 2:823dea76ff2e:
#include "StartMenu.h"
StartMenu::StartMenu()
{
}
StartMenu::~StartMenu()
{
}
void StartMenu::complete(Gamepad &pad)
{
while( pad.A_pressed() == false ){
lcd.clear();
lcd.printString(" Start Game ",0,1);
lcd.printString(" Levels ",0,2);
lcd.printString(" Tutorial ",0,3);
lcd.drawSprite(5,selector * 8,7,5,(int *)arrow);
lcd.refresh();
wait(0.15);
if( pad.get_direction() == S ){
if( selector < 3 ){
selector ++;
}
}
if( pad.get_direction() == N ){
if( selector > 1 ){
selector --;
}
}
if( selector == 1 ){
level = 0;
}
if( selector == 2 ){
level = 0;
}
if( selector == 3 ){
level = 0;
}
{