def set_cursor_image(self, image, clickpoint=(0,0)): """replace default mouse cursor with image Cursor variable is State._cursor, default cursor automatically hidden. @param image:a pygame.Surface @param clickpoint: Usually that's the topleft or topright pixel of the image. If you're using a crosshair as cursor, the clickpoint would probably be the center. """ self._cursor = Cursor(image, clickpoint) self.widgets.append(self._cursor) self.sprites.add(self._cursor) pygame.mouse.set_visible(0)