pyGame within a pyGTK application

前端 未结 7 1820
小鲜肉
小鲜肉 2021-01-12 00:54

What is the best way to use PyGame (SDL) within a PyGTK application?

I\'m searching for a method that allows me to have a drawing area in the GTK window and at the s

7条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-12 01:43

    The Sugar project has several Activities built with PyGTK and PyGame.

    They wrote a support lib to achieve this, called Sugargame. You should be able to modify it for regular PyGTK apps instead of Sugar.

    Here's a chapter in Sugar's development book about how to use it.

    The lib allows for communicating events between GTK and PyGame.

    Enjoy!

提交回复
热议问题