nurpax / petmate

PETSCII editor with Electron/React/Redux
MIT License
183 stars 14 forks source link

Right click to pick up character and/or color under the cursor #8

Closed Esshahn closed 6 years ago

Esshahn commented 6 years ago

It would be fantastic if clicking with the right mouse button would actually delete a character.

Simple but already very useful:

Advanced, but might be awesome (as long as there's no layer support)

nurpax commented 6 years ago

Do you think the blank char should be selectable? If I add custom charsets, the empty char might not be 0x20.

Or maybe right click on char selector would choose the secondary character just like it does with a left click?

The per character undo would be a little tricky to add into my undo buffering. (now it’s really simple at framebuffer level with redux-undo). Also could be a bit confusing UI wise. (the user might not discover exactly how this feature works by just playing in the UI).

Esshahn commented 6 years ago

Totally agree on the per character undo. Tricky to pull off with little to gain.

nurpax commented 6 years ago

I'll go with right click = always charcode $20.

Viza74 commented 6 years ago

... or maybe right click = "pick up character and/or color under the cursor"? I would prefer that.

...and maybe a separete "Erase" tool? With a changeable character to use? (basicaly the brush function, only with a 1x1 brush...) Can even be a temporary toggle, while holding down a key, so you don't have to switch to erase, and then switch back to brush. Just erease while holding "e" or something. (Even better (altough not a lot of programs do this, but I liked it in XSI) if you hold a key, that means temporary toggle, if you click a key, that means permanent toggle. So press and release "e" would switch to "Erase" tool (and you have to swithc back to brush later), but if you hold the "e" button longer, the "Erase" mode only lasts while holding down, and switches back to whatever mode it was when the key released.)

... or maybe maybe right click for erease, but shift+left click to pick up?

Esshahn commented 6 years ago

... or maybe right click = "pick up character and/or color under the cursor"? I would prefer that.

That is a really cool idea, as it still makes erasing quick and easy and acts as a powerful short when selecting new (and relevant) chars. +1

nurpax commented 6 years ago

Throwing this in here too (haven’t formed an opinion on this yet):

I think a char and color picker tools in the left menu would be useful. These (and existing) tools would be selectable with a single key press shortcut.

To pick color and draw with it, you could do something like:

press p (pick char), left click on some char, esc (to go into draw mode), draw. shift-p could be color pick.

i’d like these features to also be left menu icons for better discoverability.

Esshahn commented 6 years ago

(issue renamed for clearance)

Behavior of right click:

nurpax commented 6 years ago

Having some trouble getting the right click mouse down event to register at all on Electron/React. I think it's something to do with me running with Chrome Devtools enabled (right click pops up "Inspect element").

nurpax commented 6 years ago

Alt-left-click shipped in 0.2.4. Might be better with COMMAND on Mac. Feels somehow odd to press Alt on a Mac. Alt felt natural on Windows w/ a proper external keyboard.

Esshahn commented 6 years ago

Such a great workflow improvement! Love it! Thank you for making this!

Viza74 commented 6 years ago

I don't know why you feel that alt-click is odd on mac - it completely natural for me. Photoshop, affinity photo, aseprite, pyxel edit all uses alt-clcik to pick. I don't know about other popular programs (gimp? krita? ...else?...) these are the ones I use somewhat regulary, and these all work the same. Is there some macos system-wide convention I'm not aware of?

nurpax commented 6 years ago

You’re on macOS too and it feels natural? If that’s the convention in image editors let’s keep it. In my experience in othet mac SW alt is just less common. Less work for me if mac users are fine with alt.