From e968f18a2521e23ae14d596b539a3bec23069f8a Mon Sep 17 00:00:00 2001 From: snsd0805 Date: Tue, 30 Jun 2020 00:04:10 +0800 Subject: [PATCH] Change some font & comment out one line code which is useless --- draw.py | 4 ++-- main.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/draw.py b/draw.py index 5422e37..209a258 100644 --- a/draw.py +++ b/draw.py @@ -5,7 +5,7 @@ def drawUserList(nowUserList,screen): listSTR = nowUserList[7:] listJSON = json.loads(listSTR) - print(listJSON) + #print(listJSON) # [['127.0.0.1', 52362], ['127.0.0.1', 52370]] # [{'name': ['127.0.0.1', 55888], 'score': 0}, {'name': ['127.0.0.1', 55900], 'score': 0}] #print(listJSON) @@ -17,7 +17,7 @@ def drawUserList(nowUserList,screen): pgStringVar = pygame.font.Font(None,25).render(str(sockName['name']),False,(0,0,0))# 文字物件 screen.blit(pgStringVar,(870,y+10))# draw font - pgStringVar = pygame.font.Font(None,25).render(str(sockName['score']),False,(255,0,0))# 文字物件 + pgStringVar = pygame.font.Font(None,40).render(str(sockName['score']),False,(255,0,0))# 文字物件 screen.blit(pgStringVar,(860,y+10))# draw font pygame.display.update() diff --git a/main.py b/main.py index 72c8245..40f6832 100644 --- a/main.py +++ b/main.py @@ -240,7 +240,7 @@ class Client: ## SET PYGAME pygame.init() - pygame.display.set_caption('Mouse Example') + pygame.display.set_caption('Draw Think') size= [1080, 480] screen= pygame.display.set_mode(size) @@ -248,7 +248,7 @@ class Client: continueFlag = False while not continueFlag: screen.fill((255, 255, 255)) - pgStringVar = pygame.font.Font(None,25).render("Please wait...",False,(0,0,0))# 文字物件 + pgStringVar = pygame.font.Font(None,40).render("Please wait...",False,(0,0,0))# 文字物件 screen.blit(pgStringVar,(500,240))# draw font pygame.display.update()