Example #1
0
func (s *Surface) CreateColorCursor(hx, hy int) (*Cursor, error) {
	c := C.SDL_CreateColorCursor(s.c(), C.int(hx), C.int(hy))
	if c == nil {
		return nil, getError()
	}

	return &Cursor{c}, nil
}
Example #2
0
func CreateColorCursor(surface *Surface, hot_x, hot_y int) *Cursor {
	_surface := (*C.SDL_Surface)(unsafe.Pointer(surface))
	_hot_x := (C.int)(hot_x)
	_hot_y := (C.int)(hot_y)
	return (*Cursor)(C.SDL_CreateColorCursor(_surface, _hot_x, _hot_y))
}
Example #3
0
// CreateColorCursor (https://wiki.libsdl.org/SDL_CreateColorCursor)
func CreateColorCursor(surface *Surface, hotX, hotY int) *Cursor {
	return (*Cursor)(C.SDL_CreateColorCursor(surface.cptr(), C.int(hotX), C.int(hotY)))
}