Update main.py

上级 4449de6f
......@@ -2,6 +2,21 @@ import pygame,sys,threading,pygame.locals,pygame.font
pygame.init()
'''def check_events(ai_settings, screen, stats, play_button, ship, bullets):
#键鼠响应
for event in pygame.event.get():
if event.type == pygame.QUIT:
sys.exit()
elif event.type == pygame.KEYDOWN:
check_keydown_events(event, ai_settings, screen, ship, bullets)
elif event.type == pygame.KEYUP:
check_keyup_events(event, ship)
elif event.type == pygame.MOUSEBUTTONDOWN:
mouse_x, mouse_y = pygame.mouse.get_pos()
check_play_button(stats, play_button, mouse_x,
mouse_y)
'''
def New_window(window_x,window_y,window_name,background):
screen = pygame.display.set_mode((window_x,window_y),0,32)
pygame.display.set_caption(window_name)
......@@ -15,6 +30,8 @@ def New_file(screen,file_imarge,file_x,file_y,file_text,text_x,text_y,text_color
screen.blit(file_imarge,(file_x,file_y))
screen.blit(file_text,(text_x,text_y))
return None
def New_button(event,):
pass
def Opensys(a):
with open(a) as files:
file = files.readlines()
......@@ -43,3 +60,4 @@ t_First = threading.Thread(target = first_window)
t_First.start()
t_First.join()
pygame.quit()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册