Embedding a Pygame window into a Tkinter or WxPython frame

后端 未结 3 1782
Happy的楠姐
Happy的楠姐 2020-11-28 08:01

A friend and I are making a game in pygame. We would like to have a pygame window embedded into a tkinter or WxPython frame, so that we can include text input, buttons, and

3条回答
  •  孤独总比滥情好
    2020-11-28 09:02

    Here are some links.

    • For embedding in WxPython An Article on pygame.org
    • For Embedding in WxPython An Article on the WxPython wiki
    • For embedding in Tkinter see this SO question

    Basically, there are many approaches.

    • On Linux, you can easily embed any application in a frame inside another. Simple.
    • Direct Pygame output to a WkPython Canvas

    Some research will provide the relevant code.

提交回复
热议问题