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