📜  如何在 pygame 窗口上设置位置 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:45.701000             🧑  作者: Mango

代码示例1
pos_x = screen_width / 2 - window_width / 2
    pos_y = screen_height - window_height
    os.environ['SDL_VIDEO_WINDOW_POS'] = '%i,%i' % (pos_x,pos_y)
    os.environ['SDL_VIDEO_CENTERED'] = '0'