ordehi / pixelattitude

Pixel art editor in plain web
MIT License
1 stars 2 forks source link

Make cursor show currently selected color on cell hover #14

Open ordehi opened 2 years ago

ordehi commented 2 years ago

Similar to other pixel art editors, I want to make this show the currently selected color on any hovered cell, only while the cell is being hovered (the cell will not retain the color unless clicked), this will be extended once we work on implementing custom cursors for different tools.

harshlancer commented 2 years ago

I can do this ...

ordehi commented 2 years ago

Hey @harshlancer, glad to hear you want to contribute.

Feel free to take it after making sure you're good with the guidelines in CONTRIBUTING.md. If you have any questions, let me know.

harshlancer commented 2 years ago

@ordehi So you don't want the color of the cell to change while hovering . Right?

ordehi commented 2 years ago

@harshlancer I want any cell you hover to show the currently selected color, but only while you hover it, the color would only stay in the cell if you click or hold the mouse and drag over it (the current two ways to paint a cel)

My idea is to have the cursor give more information about what the user is doing, so eventually the cursor will change to reflect that, for example, to an eraser, bucket, etc.

To give you an idea of how it looks like here's a gif from Aseprite (part of my inspo for this repo): aseprite-hover

If you can see it, I have black selected, and while I move my cursor, the current cells shows black, but they only get painted when I click or click and drag.