title: pygame screen loop not working correctly. loop keeps reshreshing unlike others
body: <pre class="lang-py prettyprint-override"><code>def selection():
      global selectionLoop 
      selectionLoop = True
      clock.tick(1)
      while selectionLoop:
          print(&quot;disspam&quot;)
          window.blit(backgroundgame, (0,0)) 
          text.title('CHOOSE A SUBJECT!') 
          button(550, 500, 250, 100, rollover_menucolours, menucolours, 'MUSIC', 'music', black, smallText) 
          button(900, 500, 250, 100, rollover_menucolours, menucolours, 'ART', 'art', black, smallText) 
          button(1250, 500, 250, 100, rollover_menucolours, menucolours, 'DRAMA', 'drama', black, smallText)
          pygame.display.update()
  </code></pre>
  <p>This menu works correctly, when i press instructions it works as well but when I press selection it spams the loop and doesn't listen to the mouse</p>
  <pre class="lang-py prettyprint-override"><code>def menu(): 
      pygame.mixer.music.load(&quot;menu_music.mp3&quot;)
      pygame.mixer.music.play()
      mainLoop = True 
      clock.tick(1) 
      while mainLoop: 
  
          window.blit(background, (0,0)) 
  
          text.title('lettermatcher.edu') 
          
          button(550, 500, 250, 100, rollover_menucolours, menucolours, 'SELECTION', 'selction', black, smallText) 
          button(900, 500, 250, 100, rollover_menucolours, menucolours, 'INSTRUCTIONS', 'rule', black, smallText) 
          button(1250, 500, 250, 100, rollover_menucolours, menucolours, 'QUIT', 'end', black, smallText)
  
          pygame.display.update() 
  </code></pre>
  <p><a href="https://www.mediafire.com/file/5n0hkva5alqawiz/pygame.zip/file" rel="nofollow noreferrer">https://www.mediafire.com/file/5n0hkva5alqawiz/pygame.zip/file</a>
  so this is my game, feel free to download it and it has the problem when going into the selection menu with going straight into the game. When in the selection function it spams the loop like all the other screens but doesn't display it. can someone please help me fix this.</p>