1j01 / jspaint

🎨 Classic MS Paint, REVIVED + ✨Extras
https://jspaint.app/about
MIT License
7.17k stars 562 forks source link

Middle click -- good first issue? #290

Open prendradjaja opened 2 years ago

prendradjaja commented 2 years ago

Hi! This is an awesome project :)

I don't have access to an old Windows installation to check, but if I recall correctly MS Paint allowed you to select and use a third color (in addition to left-click/foreground and right-click/background color) using the middle mouse button.

I'd love to contribute to this project (and might find the third color useful as an occasional user of this project) -- do you accept PRs, and do you have any guess at whether this would be a good first issue?

1j01 commented 2 years ago

Thanks! The tertiary color is implemented, but it's accessed using Ctrl. This is how it works at least in Windows 98.

There are some issues with it I believe. I made automated tests for this, where it draws using different tools using various fill styles and mouse buttons, and compares to an existing screenshot of the canvas, but the tests may need tweaking to get running again. Actually yeah, I have a local branch where I was working on getting the tests running again recently. I think having the tests for this would be pretty useful because there's actually a lot of cases: (left mouse button, right mouse button, holding Ctrl) X (Fill, Fill + Outline, Outline) X 4 shape tools, plus (LMB, RMB, Ctrl) X 7 other tools. So I'd probably want to sort that out, and squash my messy commit history, but then this would be a good issue to work on.

I'm rather absorbed in a new project at the moment, but I appreciate your willingness to help. I hope to get better at working with people at some point... I think longer term relationships are the key, and perhaps I'll feel better about engaging with contributors once I properly open source the project (give it a license).

lafoxxx92 commented 2 years ago

Thanks! The tertiary color is implemented, but it's accessed using Ctrl. This is how it works at least in Windows 98.

There are some issues with it I believe.

A bit of feedback:

When you hold LMB to draw, the entire line changes colors as you press Ctrl. In the original app you could draw like striped lines. Tested in Vista paint, don't have possibility to check Win9x version at the moment though.

1j01 commented 1 year ago

Ah, yes, making stripes used to work but is broken I see.