Ugh why would you break pystring into list? That makes NO sense... rather have an int iterator and then just make label.text = string[:iterator] or something ....
2013/7/3 Paul Von Zimmerman <[email protected]> > Oh! That's excellent! The text scrolling effect is now implemented, > thanks! Also, a new python tidbit is in our arsenal (+=). > On Tuesday, 2 July 2013 22:15:01 UTC-7, [email protected] wrote: >> >> This code is uglu, but it should give you a basic idea of how you can do >> that. >> >> import pyglet >> >> window = pyglet.window.Window() >> >> label = pyglet.text.Label('', x=window.width/2, y=window.height/2, >> anchor_x='center', anchor_y='center') >> message = 'Hello World!' >> message_display = [] >> for i in message: >> message_display.append(i) >> >> @window.event >> def on_draw(): >> window.clear() >> label.draw() >> >> def text(dt): >> if not message_display == []: >> label.text += message_display.pop(0) >> >> pyglet.clock.schedule_**interval(text, 1.0/2) >> >> 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. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- Bc. Peter Vaňušanik -- 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. For more options, visit https://groups.google.com/groups/opt_out.
