def ProcessInput(self, events, pressed_keys):
"""
Process input from user
Inherits from SceneBase
Args: self
events - pygame events
pressed_keys
"""
for event in events:
if event.type == pygame.KEYDOWN and event.key == pygame.K_RETURN:
# Move to the next scene when the user pressed Enter
pass
if event.type == pygame.MOUSEBUTTONDOWN:
for button in self.buttons:
button.isClicked(event)
if self.leveling_up:
self.continue_button.isClicked(event)
if event.type == pygame.MOUSEBUTTONUP:
for button in self.buttons:
button.isClicked(event)
if self.leveling_up:
self.continue_button.isClicked(event)
if event.type == pygame.MOUSEMOTION:
#for button in self.buttons:
# button.isHovered(event)
if self.leveling_up:
self.continue_button.isHovered(event)
评论列表
文章目录