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:
- 16:e81a8f6868f1
- Parent:
- 13:e114d362186d
- Child:
- 25:faba9eb44514
--- a/Menu/Menu.cpp Thu Apr 11 06:48:52 2019 +0000 +++ b/Menu/Menu.cpp Thu Apr 11 11:09:27 2019 +0000 @@ -151,6 +151,105 @@ {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,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,1,1,1,1}, }; + +const int kestrel_ststs[45][41]= { + +{1,0,0,0,1,0,1,1,1,1,0,1,1,1,0,0,1,1,1,1,1,0,1,1,1,1,0,1,1,1,1,0,1,0,0,0,0,0,0,0,0}, +{1,0,0,1,0,0,1,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,1,0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0}, +{1,0,1,0,0,0,1,0,1,1,0,1,1,1,1,0,0,0,1,0,0,0,1,0,1,1,0,1,0,1,1,0,1,0,0,0,0,0,0,0,0}, +{1,0,0,1,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,1,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0}, +{1,0,0,0,1,0,1,1,1,1,0,1,1,1,1,0,0,0,1,0,0,0,1,0,0,1,0,1,1,1,1,0,1,1,1,1,0,0,0,0,0}, +{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, +{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1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::disp_ships(N5110 &lcd) { if(_xcursor == 0) { - lcd.drawSprite(5,0,44,37,(int *)kestrel); + lcd.drawSprite(2,1,44,37,(int *)kestrel); + lcd.drawSprite(41,1,45,41,(int *)kestrel_ststs); } if(_xcursor == 1) { - lcd.drawSprite(15,5,39,17,(int *)imperion); + lcd.drawSprite(12,6,39,17,(int *)imperion); + lcd.drawSprite(41,1,45,41,(int *)imperion_ststs); } } /*void Menu::scroll(N5110 &lcd, Direction d)