Menu flicker was introduced during some point of the pygame ui transition. The exact cause is unknown but the menu redraw function has 2 gfx overlay draw functions shown below:
def draw(self):
"""
Draw menu to surface.
:return: None
"""
# Draw background rectangle
_gfxdraw.filled_polygon(self._surface, self._bgrect,
self._bgcolor)
# Draw title
_gfxdraw.filled_polygon(self._surface, self._title_polygon_pos,
self._bg_color_title)
When these lines are commented out the menu is static and has no redraw however it still operates properly with no flicker. The culprit is related to the pygame surface fills in-between frame redraws.
Description
Menu flicker was introduced during some point of the pygame ui transition. The exact cause is unknown but the menu redraw function has 2 gfx overlay draw functions shown below:
When these lines are commented out the menu is static and has no redraw however it still operates properly with no flicker. The culprit is related to the pygame surface fills in-between frame redraws.