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:
- 52:29772e31a620
- Parent:
- 51:2231e2e141b9
- Child:
- 53:3fdc4486f672
--- a/Menu/Menu.cpp Thu May 09 08:42:25 2019 +0000 +++ b/Menu/Menu.cpp Thu May 09 13:22:45 2019 +0000 @@ -304,6 +304,34 @@ {0,1,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, {0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, }; +const int pressStart[5][52] = { + {1,1,1,1,0,1,1,1,1,0,1,1,1,1,0,1,1,1,0,0,1,1,1,0,0,0,1,1,1,0,0,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,0,1,1,1,1,1}, + {1,0,0,1,0,1,0,0,1,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,1,1,0,1,0,0,1,0,0,0,1,0,0}, + {1,1,1,1,0,1,0,1,1,0,1,0,1,1,0,1,1,1,1,0,1,1,1,1,0,0,1,1,1,1,0,0,0,1,0,0,0,0,1,0,1,0,1,0,1,1,0,0,0,1,0,0}, + {1,0,0,0,0,1,0,1,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,1,0,1,0,1,0,0,0,0,1,0,0}, + {1,0,0,0,0,1,0,0,1,0,1,1,1,1,0,1,1,1,1,0,1,1,1,1,0,0,1,1,1,1,0,0,0,1,0,0,1,0,0,1,1,0,1,0,0,1,0,0,0,1,0,0}, +}; +const int back[19][5] = { + {1,0,0,0,1}, + {0,1,0,1,0}, + {0,0,1,0,0}, + {1,1,1,1,1}, + {0,0,0,0,0}, + {0,0,0,0,1}, + {1,0,0,0,1}, + {1,0,0,0,1}, + {1,1,1,1,1}, + {0,0,0,0,0}, + {0,0,0,1,1}, + {0,0,1,0,1}, + {0,1,0,0,0}, + {1,1,1,1,1}, + {0,0,0,0,0}, + {1,1,0,1,1}, + {1,0,1,0,1}, + {1,0,0,0,1}, + {1,1,1,1,1}, +}; void Menu::init(int ycursor) { // initialize the ycursor value @@ -328,7 +356,8 @@ lcd.drawSprite(54,1,45,26,(int *)orionSprite); break; } - + // display press strart + lcd.drawSprite(2,10,5,52,(int *)pressStart); // draw border and title sprite lcd.drawRect(0,0,84,48,FILL_TRANSPARENT); lcd.drawSprite(0,0,9,48,(int *)title_screen); @@ -365,6 +394,8 @@ _xcursor = 2; } } + // add some lag so that menu options are easier to select + wait(0.25); } int Menu::get_ycursor() @@ -392,4 +423,5 @@ lcd.drawSprite(41,1,45,41,(int *)orionStats); break; } + lcd.drawSprite(0,0,19,5,(int *)back); }