ELEC2645 (2018/19) / Mbed 2 deprecated el17cd

Dependencies:   mbed

Revision:
18:8256546a3cbf
Parent:
17:3c9672c6e532
Child:
19:ec4cb22accb0
diff -r 3c9672c6e532 -r 8256546a3cbf Rasturizer/Rasturizer.cpp
--- 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