How would I assign the variables x, y to the x and y position, respectivly, of a the mouse pointer when it is pressed down (clicked).
Heres what I have thus far:
from pygame import*
init()
SIZE = (width, height)
screen = display.set_mode(SIZE)
position = 0
Running = True
while Running:
for evnt in event.get():
if evnt.type == QUIT:
Running = False
elif evnt.type == MOUSEBUTTONDOWN:
position = evnt.pos
Currently, position is in the form (x position, y position). How would I access the individual elements?
Thanks in advance.