- Changed to display the text "fps: ", followed by the frame rate to only

2 decimal places.
- Size our width accurately.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@179 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Ray Greenwell
2007-03-22 19:17:53 +00:00
parent 89e7c41c2e
commit fd665f3f83
+3 -2
View File
@@ -32,7 +32,8 @@ public class FPSDisplay extends TextField
public function FPSDisplay (framesToTrack :int = 150)
{
background = true;
text = String(Number.MIN_VALUE);
text = "fps: 000.00";
width = textWidth + 5;
height = textHeight + 4;
_framesToTrack = framesToTrack;
@@ -55,7 +56,7 @@ public class FPSDisplay extends TextField
// the difference between 1 frame)
var frames :Number = _frameStamps.length - 1;
this.text = String(frames / seconds);
this.text = "fps: " + (frames / seconds).toFixed(2);
}
/** Timestamps of past ENTER_FRAME events. */