Example #1
0
 def test_innit(self):
     pygame.init()
     
     # This is just to make sure it'll actually load up
     s = screen.Screen(engine=core.temp_engine(), dimensions=[800, 600], fullscreen=False)
     s = screen.Screen(engine=core.temp_engine(), dimensions=[800, 600], fullscreen=True)
Example #2
0
 def test_handle_mousedragup(self):
     s = screen.Screen(engine=core.temp_engine(), dimensions=[800, 600], fullscreen=False)
     event = pygame.event.Event(MOUSEBUTTONUP, button=1, pos=(100,100))
     s._handle_mousedragup(event)
Example #3
0
 def test_handle_doubleclick(self):
     s = screen.Screen(engine=core.temp_engine(), dimensions=[800, 600], fullscreen=False)
     first_click = pygame.event.Event(MOUSEBUTTONUP, button=1, pos=(80,80))
     second_click = pygame.event.Event(MOUSEBUTTONUP, button=1, pos=(100,100))
     s._handle_doubleclick(first_click, second_click)
Example #4
0
 def test_handle_mousedrag(self):
     s = screen.Screen(engine=core.temp_engine(), dimensions=[800, 600], fullscreen=False)
     event = pygame.event.Event(MOUSEMOTION, pos=(100,100))
     s._handle_mousedrag(event)
Example #5
0
 def test_handle_keyup(self):
     s = screen.Screen(engine=core.temp_engine(), dimensions=[800, 600], fullscreen=False)
     event = pygame.event.Event(KEYUP, key=113)
     s._handle_keyup(event)
Example #6
0
 def test_handle_keyhold(self):
     s = screen.Screen(engine=core.temp_engine(), dimensions=[800, 600], fullscreen=False)
     s._handle_keyhold()
Example #7
0
 def test_handle_active(self):
     s = screen.Screen(engine=core.temp_engine(), dimensions=[800, 600], fullscreen=False)
     s._handle_active(pygame.event.Event(ACTIVEEVENT))
Example #8
0
 def test_redraw(self):
     s = screen.Screen(engine=core.temp_engine(), dimensions=[800, 600], fullscreen=False)
     s.engine.display = pygame.Surface((1,1))# Fake a surface to draw on
     s.redraw()