How do I change the pygame icon?

前端 未结 3 1830
日久生厌
日久生厌 2020-12-07 01:17

Does anyone know how to change the pygame icon? I found a thing on the pygame website that lets you do this, but when I try it, it just makes the pygame window very small.

3条回答
  •  无人及你
    2020-12-07 01:58

    If you are using pgzero you can simply set global variable ICON to path to desired PNG file, like:

    ICON = 'images/icon.png'
    

    and pgzero will automatically replace default icon.

    For more information see: https://github.com/lordmauve/pgzero/pull/128/files

提交回复
热议问题