def from_pygame_event(cls, event): if event.type == pygame.MOUSEMOTION: return MouseMotion(event.pos, event.rel)