[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] pygame & gtk



Joseph Blaylock wrote:
Would something like this work with Tkinter?
i'm not sure. i expect it would work, but i've heard reports from people not having any success. i'm not sure if the problem was tkinter, or just some random configuration problem?

i've only ever played with this is wxpython, and it seemed to work without much effort.

note that when you embed the window you will not get any of the regular pygame events dealing with mouse and keyboard input. those will come to you through the regular gui api you are using. you should still call pygame.event.pump() or pygame.event.clear() once each frame, just to allow pygame/SDL to do its own internal processing.

i believe you'll also need to do your own 'repainting' of exposed areas on the embedded window. i'm pretty sure SDL no longer does this for you once it doesn't have control of the window.

there's other reasonable limitations when running embedded. and i'm sure you'll get strange results if you try. but for basic graphics in an embedded window it should work well.



____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org