Remove redundant scrolling

master
En Yi 2019-06-12 19:17:38 +01:00
parent 9967a2c237
commit 4e32a7e369
1 changed files with 0 additions and 7 deletions

7
UI.py
View File

@ -222,7 +222,6 @@ class TestScreen(view.PygView):
element.process_events(event)
if event.type == pygame.MOUSEBUTTONUP:
mouse_pos = pygame.mouse.get_pos()
if event.button == 1:
print('mouse click')
if self.double_clicking:
@ -233,12 +232,6 @@ class TestScreen(view.PygView):
self.double_clicking = True
pygame.time.set_timer(self.double_click_event, 200)
if self.scroll_menu.rect.collidepoint(mouse_pos):
if event.button == 4:
self.scroll_menu.scroll_up()
if event.button == 5:
self.scroll_menu.scroll_down()
if event.type == self.double_click_event:
pygame.time.set_timer(self.double_click_event, 0)
self.double_clicking = False