Implement window resizing

master
LEdoian 8 months ago
parent 8d6a194563
commit ed2439d086

@ -66,6 +66,10 @@ def main():
for event in pg.event.get(): for event in pg.event.get():
if event.type == pg.QUIT: if event.type == pg.QUIT:
running = False # The while is too outer :-/ running = False # The while is too outer :-/
elif event.type == pg.VIDEORESIZE:
base_surface, (item_w, item_h) = get_base_surface(event.size, categories)
elif event.type == pg.VIDEOEXPOSE:
pg.display.flip() # Do we need this?
elif event.type == pg.KEYDOWN and not pressed: elif event.type == pg.KEYDOWN and not pressed:
# We need to do our own press handling # We need to do our own press handling
pressed = True pressed = True

Loading…
Cancel
Save