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