Add framerate UI and control on -/+ keys
[SugarCubes.git] / _Overlay.pde
index d33e4a14d33a9e4ac9318a3d6f1c48788d8f7d9b..827223a5e83f89ef70c8be045290c94ea10a1eea 100644 (file)
@@ -70,7 +70,12 @@ abstract class OverlayUI {
     textFont(titleFont);
     textAlign(LEFT);
     fill(#666666);
-    text("FPS: " + (((int)(frameRate * 10)) / 10.), 4, height-6);     
+    text("FPS: " + (((int)(frameRate * 10)) / 10.), 4, height-6);
+    text("Target (-/+):", 50, height-6);
+    fill(#000000);
+    rect(104, height-16, 20, 12);
+    fill(#666666);
+    text("" + targetFramerate, 108, height-6);
   }
 
   protected int drawObjectList(int yPos, String title, Object[] items, Method stateMethod) {
@@ -148,7 +153,7 @@ abstract class OverlayUI {
     return (mouseY - firstItemY) / lineHeight;
   }
   
-  abstract public void draw();
+  abstract public void draw();  
   abstract public void mousePressed();
   abstract public void mouseDragged();
   abstract public void mouseReleased();