Python Forum
How to get screen to clear?
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to get screen to clear?
#1
Hi, I'm confused again! I'm trying to code it so that when they click a button, it moves to a new screen. However, at the moment, it only goes to the cleared screen as long as i keep hold of the mouse button - how do I get it to stay after it's been clicked?

I know this is probably really obvious, but it won't work for me haha!

    if event.type == pygame.MOUSEBUTTONDOWN:
        mouse = pygame.mouse.get_pos()
        if student.collidepoint(mouse):
            screen.fill(WHITE)
Reply


Messages In This Thread
How to get screen to clear? - by mzmingle - Oct-09-2018, 11:17 AM
RE: How to get screen to clear? - by metulburr - Oct-09-2018, 05:05 PM
RE: How to get screen to clear? - by mzmingle - Oct-10-2018, 08:22 AM
RE: How to get screen to clear? - by metulburr - Oct-10-2018, 11:40 AM
RE: How to get screen to clear? - by mzmingle - Oct-10-2018, 11:41 AM
RE: How to get screen to clear? - by metulburr - Oct-10-2018, 12:36 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [PyGame] When I hit the space bar from the home screen, it sends me to the game over screen JesusisKing 1 1,037 Apr-30-2023, 10:11 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020