yds12 / tarsila

Pixel art and spritesheet editor
Other
141 stars 7 forks source link

Crosshair cursor #11

Open yds12 opened 1 year ago

yds12 commented 1 year ago

The current tool icons provide a quick way to see what tool you are using, but sometimes they may not be precise enough when it comes to seeing which pixel you are on. A crosshair cursor would be ideal for this (similar to the one used for the move tool).

For now, we need to decide when should this cursor be used:

As we don't have yet configurability for shortcuts, we should decide how this can be used for the moment.

FlitneyR commented 1 year ago

How about highlighting the current pixel under the cursor with a black outline? That's the first thing that came to mind for me when I first ran the program. I think this would make sense for the brush, bucket, eraser, eye dropper and line tool

yds12 commented 1 year ago

It would have to be an outline like the one for the selection, which alternates between black and white (in black areas of the image a black outline would not be visible).

yds12 commented 1 year ago

With the new changes on configurable controls, I think we can have a crosshair cursor that is activated by keeping a button pressed, it's trivial to implement now. Would be similar to the new PAN tool (hold SPACE + drag mouse) but simpler.

crumblingstatue commented 1 year ago

It would be nice if it was also toggleable instead of having to hold down a button

yds12 commented 1 year ago

Added: https://github.com/yds12/tarsila/commit/fecc9999404e34806670e9ccf922e45c303f066d

To toggle the cursor, you can press C (this will be configurable soon). Let me know what you guys think, and if we can close this issue.

crumblingstatue commented 1 year ago

Thank you, I'll try it out tomorrow!

crumblingstatue commented 1 year ago

It's working, thank you!

yds12 commented 1 year ago

@FlitneyR 's idea is also good, maybe we could make the pixel under the cursor blink/alternate between the current canvas color and the selected color, when using the crosshair cursor.