Block mouse motions in pygame event grabbing

master
En Yi 2019-06-13 11:38:20 +01:00
parent 4e32a7e369
commit c1792c21a6
2 changed files with 1 additions and 1 deletions

1
UI.py
View File

@ -196,7 +196,6 @@ class TestScreen(view.PygView):
self.button = Button(300, 100, 50, 25, text_size=18)
self.textbox = TextBox(300, 250, 200, 100, text="Test")
self.elements = [self.scroll_menu, self.button, self.textbox]
self.double_clicking = False

View File

@ -19,6 +19,7 @@ class PygView(object):
self.fps = fps
#self.playtime = 0.0
self.font = pygame.font.SysFont('mono', 20, bold=True)
pygame.event.set_blocked(pygame.MOUSEMOTION)
def run(self):
"""The mainloop, requires reimplementation