Hi there,

I'm fairly new to pyglet, just wondering about the best practise to
use with batches. What I was planning on doing is creating a global
batch which everything is added to as and where necessary. This batch
is then drawn in on_draw().

I'm slightly confused about one thing: say I create a label and add it
to a batch/group:

mylabel = pyglet.text.Label('Hello World', batch=mybatch,
group=foreground)

I can then remove the label from the batch by calling
mylabel.delete(). But how would I go about re-adding it to the batch
without recreating the entire label? Obviously I'm sure it doesn't
make a huge difference just for small labels, but when it comes to
larger backgrounds (etc) I'd rather not be re-loading them into memory
each time they're needed. It would be nice if I could just place it
back into the batch so it can be re-drawn when the batch is drawn.

Am I going about this the right way? Any help would be appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en.

Reply via email to