Pygame, how to show window without loop? no loop=popupand close...
circularfunc at yahoo.se
Sun Jun 29 00:49:20 CEST 2008
On 28 Juni, 08:32, Carl Banks <pavlovevide... at gmail.com> wrote:
> On Jun 27, 10:58 pm, defn noob <circularf... at yahoo.se> wrote:
> > right. im an idiot anyway. i can just draw the lines before entering
> > the loop, problem solved...
> Do not do that; it'll create a busy loop and use 100% of CPU. Use
> pygame.event.wait() instead. It waits for an event to occur, without
> using CPU cycles.
> Carl Banks
screen = pygame.display.set_mode(size)
for event in pygame.event.get():
if event.type == pygame.QUIT: sys.exit()
draw((500, 20), 5)
running that i cant close the program... what must i do? create an
event at mouse click?
More information about the Python-list