def setup_pyglet(self): """Configure Pyglet attributes. """ self.window = window.Window(visible=False, caption=CAPTION, fullscreen=config.fullscreen) clock.schedule_interval_soft(self.tick, 1.0 / TICK_RATE) clock.schedule_interval_soft(self.update, 1.0 / UPDATE_RATE) self.window.set_mouse_cursor( window.ImageMouseCursor(data.load_image("cursor.png"), 4, 60))
def test_set_mouse_cursor(self): self.width, self.height = 200, 200 self.w = w = window.Window(self.width, self.height) img = image.load(cursor_file) w.set_mouse_cursor(window.ImageMouseCursor(img, 4, 28)) w.push_handlers(self) glClearColor(1, 1, 1, 1) while not w.has_exit: glClear(GL_COLOR_BUFFER_BIT) w.dispatch_events() w.flip() w.close()