Example #1
0
def set(name):
	# Pointer coordinates
	x = 0
	y = 32
	
	# Pointer
	if name is 'pointer':
		x = 6
	
	# Down
	elif name is 'down':
		x = 6
		y = 10
	
	# Load the cursor
	image = pyglet.image.load('./data/img/cursors/' + name + '.png')
	cursor = pyglet.window.ImageMouseCursor(image, x, y)
	
	# Apply it!
	current_window = window.get()
	current_window.set_mouse_cursor(cursor)
	
	# Enable the cursor
	enable()
	
	return True
Example #2
0
def disable():
	current_window = window.get()
	current_window.set_mouse_visible(False)
	
	return True
Example #3
0
def enable():
	current_window = window.get()
	current_window.set_mouse_visible(True)
	
	return True