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: Rasturizer/Rasturizer.cpp
- Revision:
- 18:8256546a3cbf
- Parent:
- 17:3c9672c6e532
- Child:
- 19:ec4cb22accb0
--- a/Rasturizer/Rasturizer.cpp Sun Mar 31 18:10:18 2019 +0000
+++ b/Rasturizer/Rasturizer.cpp Sun Mar 31 22:05:54 2019 +0000
@@ -139,4 +139,48 @@
selectionCube.rotateY(0.05);
selectionCube.rotateZ(-0.08);
selectionCube.translate(-x, -y, -z);
+}
+
+void Rasturizer::drawHomeScreen(int selection){
+ int x;
+ int y;
+ int z;
+
+ if(selection == 0){
+ x = -30;
+ y = -12;
+ z = 50;
+ }
+ else if(selection == 1){
+ x = -30;
+ y = 5;
+ z = 50;
+ }
+ else{
+ x = -30;
+ y = 22;
+ z = 50;
+ }
+
+ lcd.drawRect(24, 6, 45, 10, FILL_WHITE);
+ lcd.printString("Play",35,1);
+ lcd.drawRect(24, 6, 45, 10, FILL_TRANSPARENT);
+
+ lcd.drawRect(24, 22, 45, 10, FILL_WHITE);
+ lcd.printString("Help",35,3);
+ lcd.drawRect(24, 22, 45, 10, FILL_TRANSPARENT);
+
+
+ lcd.drawRect(24, 38, 45, 10, FILL_WHITE);
+ lcd.printString("Quit",35,5);
+ lcd.drawRect(24, 38, 45, 10, FILL_TRANSPARENT);
+ selectionCube.translate(x, y, z);
+
+ for(int i = 0; i < 6; i++){
+ drawFace(selectionCube.getFace(i), 0);
+ }
+ selectionCube.rotateX(-0.1);
+ selectionCube.rotateY(-0.05);
+ selectionCube.rotateZ(0.08);
+ selectionCube.translate(-x, -y, -z);
}
\ No newline at end of file