| Trees | Indices | Toggle frames |
|---|
Display current clock values, such as FPS.
This is a convenience class for displaying diagnostics such as the framerate. See the module documentation for example usage.
__init__(self,
font=None,
interval=0.25,
format='%(fps).2f',
color=(0.5, 0.5, 0.5, 0.5),
clock=None)
Create a ClockDisplay.
|
|
|
unschedule(self)
Remove the display from its clock's schedule.
|
|
|
update_text(self,
dt=0)
Scheduled method to update the label text.
|
|
|
draw(self)
Method called each frame to render the label.
|
| pyglet.font.Text |
label
The label which is displayed.
|
'%(fps).2f',
color=(0.5, 0.5, 0.5, 0.5),
clock=None)
Create a ClockDisplay.
All parameters are optional. By default, a large translucent font will be used to display the FPS to two decimal places.
Remove the display from its clock's schedule.
ClockDisplay uses Clock.schedule_interval to periodically update its display label. Even if the ClockDisplay is not being used any more, its update method will still be scheduled, which can be a resource drain. Call this method to unschedule the update method and allow the ClockDisplay to be garbage collected.
Since: pyglet 1.1
| Trees | Indices | Toggle frames |
|---|
| Generated by Epydoc 3.0beta1 on Thu Dec 31 17:58:18 2009 | http://epydoc.sourceforge.net |