-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinfo.py
More file actions
48 lines (39 loc) · 1.17 KB
/
info.py
File metadata and controls
48 lines (39 loc) · 1.17 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 pygame,sys
from pygame.locals import *
from animations import *
import main
try:
import android
except ImportError:
android=None
if android:
android.init()
android.map_key(android.KEYCODE_BACK,pygame.K_ESCAPE)
try:
import pygame.mixer as mixer
except ImportError:
import android.mixer as mixer
pygame.init()
pygame.display.set_caption("help")
fpsClock=pygame.time.Clock()
info_object=pygame.display.Info()
WINDOW_WIDTH=info_object.current_w
WINDOW_HEIGHT=info_object.current_h
infoimage=pygame.image.load("images/info1.png")
infoimage=pygame.transform.scale(infoimage,(WINDOW_WIDTH,WINDOW_HEIGHT))
DISPLAYSURF=pygame.display.set_mode((WINDOW_WIDTH,WINDOW_HEIGHT),FULLSCREEN)
DISPLAYSURF.blit(infoimage,(0,0))
def info_main():
while True:
set_bgs(DISPLAYSURF)
DISPLAYSURF.blit(infoimage,(0,0))
for event in pygame.event.get():
if event.type==QUIT:
pygame.quit()
sys.exit()
elif event.type==KEYUP and event.key==K_ESCAPE or (event.type==MOUSEBUTTONDOWN):
return
pygame.display.update()
fpsClock.tick()
if __name__=="__main__":
info_main()