Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #6
0
 def test_handle_keyhold(self):
     s = screen.Screen(engine=core.temp_engine(), dimensions=[800, 600], fullscreen=False)
     s._handle_keyhold()
Beispiel #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))
Beispiel #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()