Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/305.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python pygame登录页面前端错误_Python_User Interface_Authentication_Pygame_Frontend - Fatal编程技术网

Python pygame登录页面前端错误

Python pygame登录页面前端错误,python,user-interface,authentication,pygame,frontend,Python,User Interface,Authentication,Pygame,Frontend,我试图使用pygame和firebase创建一个登录页面,但是这个前端代码在我运行它时,退格和返回不起作用,而且当我在一个框中键入时,另一个框也得到输入。有人能帮我打印信息并使用firebase登录命令吗 def auth(self): self.E_select=False self.P_select=False 尽管如此: 自我筛选填充((0,0,0)) pygame.draw.rect(self.screen,self.rect_C,(14025047050),2) self.draw_文

我试图使用
pygame
firebase
创建一个登录页面,但是这个前端代码在我运行它时,退格和返回不起作用,而且当我在一个框中键入时,另一个框也得到输入。有人能帮我打印信息并使用
firebase
登录命令吗

def auth(self):
self.E_select=False
self.P_select=False
尽管如此:
自我筛选填充((0,0,0))
pygame.draw.rect(self.screen,self.rect_C,(14025047050),2)
self.draw_文本(self.screen,self.email,274,26,(250250250))
pygame.draw.rect(self.screen,self.rect_C,(14032047050),2)
self.draw_文本(self.screen,self.pwd,345,26,(250250250))
pygame.display.update()
对于pygame.event.get()中的事件:
如果event.type==pygame.QUIT:
pygame.quit()
sys.exit()
elif event.type==MOUSEBUTTONUP:
x、 y=pygame.mouse.get_pos()

如果(x>=140和x=250,y=140和x=320,y如果您想检查按下的键是否有
KEYDOWN
事件,那么您正在查找
event.key
,例如,
if event.key==pygame.K_RETURN
(如果event.type==pygame.K_RETURN
,则不检查
).

一个建议:你知道
tkinter
吗?在那里创建这样的GUI可能会更容易(也许更好)。相关:也许你可以尝试将用户输入存储在一个列表中(在循环之外)?然后使用
firebase
并使用该列表中的所有信息登录(或者使用字典(更容易组织))