From 4b1d75efe309e33b6ec797922275d4151f6403d6 Mon Sep 17 00:00:00 2001 From: stinky_mud <68097401@qq.com> Date: Tue, 30 Nov 2021 22:51:21 +0800 Subject: [PATCH] Update main.py --- main.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index 6000281..ed5e47c 100644 --- a/main.py +++ b/main.py @@ -30,10 +30,10 @@ 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 New_button(screen,event,button_imarge,button_x,button_y,text,text_x,text_y,text_color,text_S,text_font): + New_file(screen,button_imarge,button_x,button_y,text,text_x,text_y,text_color,text_S,text_font) def Opensys(a): - with open(a) as files: + with open(a,encoding='UTF-8') as files: file = files.readlines() title = file[0].rstrip() title_x,title_y = int(file[1].rstrip()),int(file[2].rstrip()) @@ -60,4 +60,3 @@ t_First = threading.Thread(target = first_window) t_First.start() t_First.join() pygame.quit() - -- GitLab