-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcredit.py
More file actions
47 lines (39 loc) · 1.25 KB
/
credit.py
File metadata and controls
47 lines (39 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import cursor
from cursor import *
import pygame
from pygame.locals import *
import sys
import gui
import Game
def creditMenu(display):
bg = pygame.image.load("menu/wallpaper.jpg")
rollingCredit = pygame.image.load("menu/rolling.png").convert_alpha()
back = pygame.image.load("buttons/back.png").convert_alpha()
bX = 10
bY = 560
rX = 200
rY = 700
while True :
pos = pygame.mouse.get_pos()
if collide(bX,bY,back,pos) :
pygame.mouse.set_cursor(*cursor.HAND_CURSOR)
else :
pygame.mouse.set_cursor(*cursor.ARROW_CURSOR)
for event in pygame.event.get():
if event.type == MOUSEBUTTONDOWN and event.button == 1 :
if collide(bX,bY,back,pos) :
Game.menu1(display)
if event.type == QUIT:
pygame.quit()
sys.exit()
if event.type == KEYDOWN :
if event.key == K_ESCAPE :
pygame.quit()
sys.exit()
if rY<-1200:Game.menu1(display)
display.blit(bg,(0,0))
display.blit(rollingCredit,(rX,rY))
display.blit(back,(bX,bY))
rY -= 1
pygame.display.update()
return