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:
- 6:a2c72def99f9
- Parent:
- 4:17d5b53b8815
- Child:
- 7:8d381315f72c
--- a/Menu/Menu.cpp Tue May 26 17:14:44 2020 +0000 +++ b/Menu/Menu.cpp Tue May 26 18:14:03 2020 +0000 @@ -3,7 +3,8 @@ #include "Gamepad.h" #include "N5110.h" -int snake[28][26] { //design of snake on initial page +//design of snake on initial page +int snake[28][26] { { 0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }, { 0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }, { 0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0 }, @@ -34,7 +35,8 @@ { 0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0 }, }; -int skull[23][23] { //design of skull in the help page +//design of skull in the help page +int skull[23][23] { { 0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0 }, { 0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0 }, { 1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,1 }, @@ -60,6 +62,7 @@ { 0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0 }, }; +//design of the arrow in the menu function int selector[5][7] { { 0,0,0,0,1,0,0 }, { 0,0,0,0,1,1,0 }, @@ -95,7 +98,7 @@ _lcd.drawSprite(WIDTH/2-26,25,5,7,(int*)selector); _lcd.refresh(); while(_pad.A_held() == false) { //unitl A is pressed, the code - arrow(); //stays on the meun, + arrow(); //stays on the menu, _lcd.refresh(); //executing only the code of the arrow wait(1/6); } @@ -116,14 +119,14 @@ _lcd.refresh(); wait(1/6); - if ( _pad.X_held() == true) { //position of arrow in the meun + if ( _pad.X_held() == true) { //position of arrow in the meun _lcd.clear(); //according to what button is pressed _lcd.drawSprite(WIDTH/2-26,25,5,7,(int*)selector); _lcd.refresh(); wait(1/6); } - if ( _pad.B_held() == true) { //position of arrow in the meun + if ( _pad.B_held() == true) { //position of arrow in the meun _lcd.clear(); //according to what button is pressed _lcd.drawSprite(WIDTH/2-26,33,5,7,(int*)selector); _lcd.refresh();