Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

pygame detect click

is_toching = self.rect.collidepoint(mpos)
if event.type == pygame.MOUSEBUTTONUP:
     self.mouse_up_event(mpos)
     if is_toching and event.button == 1:
         self.click_event(mpos)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pygame #detect #click
ADD COMMENT
Topic
Name
3+3 =