Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Cursor #40

Open
valkyrienyanko opened this issue Oct 29, 2019 · 15 comments
Open

Custom Cursor #40

valkyrienyanko opened this issue Oct 29, 2019 · 15 comments
Labels
enhancement New feature or request

Comments

@valkyrienyanko
Copy link
Collaborator

Describe the feature you want added:

Cursor RPG Art?

@valkyrienyanko valkyrienyanko added the enhancement New feature or request label Oct 29, 2019
@steviegt6
Copy link

What kind of style are we going for?

@valkyrienyanko
Copy link
Collaborator Author

Anything will go for now.

@steviegt6
Copy link

Alright. What size should it be? (In pixels.)

@valkyrienyanko
Copy link
Collaborator Author

I don't know much about cursors, use your own discretion.

@steviegt6
Copy link

Okay.

@steviegt6
Copy link

Untitled
Will this do?

@steviegt6
Copy link

(It's hard to see cause it's white)

@valkyrienyanko
Copy link
Collaborator Author

I've tried both p5.js cursor function and the traditional CSS way and neither way work for custom cursors. Nothing is showing up, but when I do something like cursor: move; it works.

#defaultCanvas0 { /* p5.js Canvas */
  position: absolute; top: 0; right: 0; left: 0; bottom: 0;
  cursor: url(../assets/test.png);
}

@steviegt6
Copy link

Try:

cursor: url('path-to-image.png'), auto;	

@steviegt6
Copy link

You can also try hiding the cursor and making an image follow where the cursor would normally be.

@valkyrienyanko
Copy link
Collaborator Author

Oh hey auto fixed it.

@valkyrienyanko
Copy link
Collaborator Author

valkyrienyanko commented Oct 29, 2019

I also found out that all png have to be 32 x 32 in size.

Larger sizes don't seem to work.

@valkyrienyanko
Copy link
Collaborator Author

valkyrienyanko commented Oct 29, 2019

Your white sword is very hard to see on the green canvas. I tried taking a screenshot but it would not screenshot the cursor with the image.

@steviegt6
Copy link

Untitled
Is that better?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants