This is a simple script that replicates the problem. I'm using Windows 7
and Python 3.3 with pyglet 1.2alpha1. As written, the image does not
display on screen. However, it appears if you comment out the definition
of the on_resize function. My question: how can I have an on_resize
handler without making my game disappear?
import pyglet
class GameWindow( pyglet.window.Window ):
def on_resize( self, width, height ):
print("resized",width,height)
def on_draw( self ):
self.clear()
mysprite.draw()
gwindow = GameWindow( width=640, height=480, resizable=True )
image = pyglet.image.load( "pic.png" )
mysprite = pyglet.sprite.Sprite( image, x=100, y=100 )
pyglet.app.run()
--
You received this message because you are subscribed to the Google Groups
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyglet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.