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
Diff: Menu/Menu.cpp
- Revision:
- 17:ce6b54422113
- Parent:
- 16:37d98c281eb3
- Child:
- 18:ba4159ab4da7
--- a/Menu/Menu.cpp Wed May 08 09:05:27 2019 +0000
+++ b/Menu/Menu.cpp Wed May 08 13:03:24 2019 +0000
@@ -13,15 +13,17 @@
}
void Menu::main(N5110 &lcd,Gamepad &pad){
+ play = false;
while (play == false) {
lcd.clear();
- lcd.printString("NEW GAME(X)",10,2);
- lcd.printString("GAME INFO(Y)",10,3);
- lcd.printString("CREDITS(B)",10,4);
+ lcd.printString("NEW GAME(X)",10,1);
+ lcd.printString("GAME INFO(Y)",10,2);
+ lcd.printString("CREDITS(B)",10,3);
lcd.refresh();
newGame(lcd,pad);
wait_ms(1000/60);
}
+
}
void Menu::newGame(N5110 &lcd,Gamepad &pad){
@@ -39,10 +41,17 @@
void Menu::info(N5110 &lcd,Gamepad &pad){
while (pad.check_event(Gamepad::L_PRESSED) == false){
lcd.clear();
- lcd.printString("MOVEMENT(JOYSTICK)",10,2);
- lcd.printString("PLAYS TONE WHEN DAMAGE TAKEN(3 LIVES)",0,3);
- lcd.printString("",10,4);
+ lcd.printString("MOVE(J-STICK)",5,1);
+ lcd.printString("TONE:-1 LIFE",5,2);
+ lcd.printString("5 LIVES",20,3);
+ lcd.printString("COLLECT COINS",3,4);
lcd.refresh();
+ if (pad.check_event(Gamepad::X_PRESSED) == true){
+ }
+ if (pad.check_event(Gamepad::Y_PRESSED) == true){
+ }
+ if (pad.check_event(Gamepad::B_PRESSED) == true){
+ }
}
}
@@ -53,5 +62,11 @@
lcd.printString("SPENCER",10,3);
lcd.printString("TINGLE",10,4);
lcd.refresh();
+ if (pad.check_event(Gamepad::X_PRESSED) == true){
+ }
+ if (pad.check_event(Gamepad::Y_PRESSED) == true){
+ }
+ if (pad.check_event(Gamepad::B_PRESSED) == true){
+ }
}
}
\ No newline at end of file