MisterBasic

Untitled

Jul 9th, 2018
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. import pygame
  2. GAME_TITLE = "MyApplication"
  3. VERSIONS = ['1.0', '1.1']
  4. AUTHOR = "MisterBasic"
  5. ICON = r'icon.ico'
  6. DESCRIPTION = "You are an explorer exploring the newly created wastes of the last nuclear bomb!"
  7. UPDATE_URL = ""
  8.  
  9.  
  10. def stop():
  11. pygame.quit()
  12.  
  13.  
  14. def main(version):
  15. pygame.init()
  16. pygame.font.init()
  17. pygame.display.set_caption(GAME_TITLE)
  18. screen = pygame.display.set_mode((800, 400))
  19. font = pygame.font.SysFont("Arial", 15)
  20. pygame.mouse.set_visible(False)
  21. while True:
  22. screen.fill((255, 255, 255))
  23. for event in pygame.event.get():
  24. if event.type == pygame.QUIT:
  25. pygame.quit()
  26. return
  27. screen.blit(font.render("You are running version: " + str(version), False, (0, 0, 0)), (0, 0))
  28. if 2 < pygame.mouse.get_pos()[0] < 798:
  29. pygame.draw.rect(screen, (0, 0, 0), [pygame.mouse.get_pos()[0]-5, pygame.mouse.get_pos()[1]-5, 10, 10])
  30. pygame.display.update()
Advertisement
Add Comment
Please, Sign In to add comment