def __init__(self, resolution, flags): GraphicEngine.__init__(self) pygame.init() pygame.font.init() self._screen = pygame.display.set_mode(resolution, flags) self._clock = pygame.time.Clock() self._font = pygame.font.Font(None, 40) # for examples TODO: find a better way self._img_path = '../data/pix'
def __init__(self, resolution, caption): GraphicEngine.__init__(self) # for examples TODO: find a better way pyglet.resource.path.append('../data/pix') # for games: standard path pyglet.resource.path.append('data/pix') pyglet.resource.reindex() self._win = pyglet.window.Window(resolution[0], resolution[1], caption=caption) self._fps_display = pyglet.clock.ClockDisplay()