Remove redundant scrolling
parent
9967a2c237
commit
4e32a7e369
7
UI.py
7
UI.py
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue