Do you want to work on this issue?
You can request for a bounty in order to promote it!
Suggested new behaviors for Erase Terrain (both of them) #3483
juanitogan posted onGitHub
This is related to (nullifies): https://github.com/mapeditor/tiled/issues/3126 https://github.com/mapeditor/tiled/issues/3379 point 2.
I believe all Erase Terrain buttons (map editor and terrain editor) should be removed. They are not obvious and, once noticed, are not immediately apparent as to what and why they are there. Here’s my proposal for how to remove them.
Map Editor
This is the easier one to rework. The toolbar needs another button for Terrain Eraser. Perhaps assign it to (U)n-brush, Shift+E or Shift+T; and/or maybe assign it to the right button when in T mode (similar to background/mask color in a paint program). The point is, promote the Terrain Brush like any other tool in a paint program by putting a Terrain Eraser next to it. The user selects one or the other... and not some weird sub-mode of the one. That way, they can keep their selected terrain brush when going into erase mode and back. The terrain palette should be treated exactly like a color palette. That is, a terrain is always selected (if there is one to select).
Terrain Editor
This is a bit hard to describe, so please bear with me. In short, when “tagging” tile “corners,” the first thing I tried for correcting a mistake was to click the tag again. This whole operation feels more like a toggle system than a painting system (even though, technically, it is exactly the same as pixel painting). I (embarrasingly) had to read the docs a few times over before I finally figured out the expected work pattern.
I suspect the reason why I want to treat this editor different than a paint editor is because it is more of a programming screen than it is a screen for artistic iteration. That is, your actions here are purely logical and tend to be done one terrain at a time (often also ignoring large parts of the tileset). Thus, my goal is to make this “programming” task as easy and as intuitive as possible.
Also, to quote part of https://github.com/mapeditor/tiled/issues/1729, I’m not the only one trying to click to correct:
There's no way to remove a single marking, only all colors on a single tile. I attempted clicking again, right clicking, middle clicking, ctrl+clicking etc.
One of the difficulties here is that the interface is currently biased towards the act of painting over tagged tiles with a new tag color. That’s fine, but the most common use case, however, is correcting mistakes (I believe). Thus, it is recommended to bias the interface for that instead.
Like the recommend change to the Map Editor, a terrain should always remain selected in the terrain palette, regardless of tag/erase mode.
My proposal is as simple as this: When the user clicks a tile corner, the state of what is found under that click sets the tag/erase mode. That is, if that corner is already tagged, remove it. If not, tag it. In short, treat each hot spot like a check box.
Okay, yes, the complexity is with click-and-drag tagging, along with multiple terrains to tag. For this, there are two options. As mentioned, my preference is that the tag/erase mode gets set by what’s under the mouse-down point. If no tag, then tag with the selected terrain (color). If there is a tag, then erase any other tags you drag over (regardless of color). I’ve used tools like this and they aren’t as odd as it might sound. The layer visibility and lock buttons in Aseprite come to mind. You can click and drag those on and off, depending on the state of the first one you mouse down on.
Thus:
- If clicked corner == no tag, then mode = tag.
- Else, {if clicked corner == any color, then} mode = erase.
Yes, the downside is that if you want to over-paint with new tags (instead of erase) you need to first click the one of the tags off and then click again to tag. That, or start your tagging from an area with no tag, if you can.
The other option is to expand the above actions a bit, like so:
- If clicked corner == no tag, then mode = tag.
- Else, if clicked corner == currently-selected color, then mode = erase.
- Else, {if clicked corner == any other color, then} mode = tag.
While this second option sounds more sophisticated by allowing easy re-tagging, users will often find it unpredictable (unless they are crazy good at tracking which “color” is currently selected). In other words, erase mode can be either one or two clicks away, depending on the state of something they may not be looking at (which, surprise!, resets its state if you switch to another TSX tab and back). Thus, while it makes re-tagging easier (secondary use case), it risks making correcting mistakes more frustrating (primary use case). Yeah, best to stay away from this option. But, it’s here if you want to test it. And, who knows, testing may prove me wrong.
If the above two options fail (somehow), it would be helpful to at least give the Terrain Editor a mini toolbar with the same two buttons (essentially) as my proposed change to the Map Editor (but call them something different like Tag Pencil and Tag Eraser).
While you are in changing the toolbar, the Map Editor toolbar is a bit odd to to adapt to. I think most would “get” this picture quicker:
[dotted rectangle] [dotted irregular shape + wand] [globe+wand] ||| [stamper] [eraser] [eyedropper] [paintbucket] [filled rectangle] [filled ellipse] ||| [map+brush] [map+eraser]
Place the selectors before draw tools because you need to select before you can fill. Also, according to other programs, the Magic Wand in Tiled is a Magic Wand in contiguous mode, and Select Same Tile is a Magic Wand in global mode, so I suggested new icons to reflect that. Just looking for something better than the “touching Tetris” icon. Maybe replace the globe idea with a collection of dotted squares, depending on what fits. (paint.net uses a light bulb for contiguous and a rain cloud for global, if you like those ideas better.)
The eraser goes next to the stamper to give the stamper context as the main draw tool. I’m tempted to change the stamper to a pencil because stamper means clone (as in clone from drawing, not palette) but I get the stamper now after seeing how the multiselect in the tileset works with the tool. Could change icon to stamper+pencil but that’s probably going too far. Maybe consider calling it a Tileset Clone Brush, Tileset Stamper, Tileset Cloner, or Tileset somethingrather. Including “Tileset” in the name might help in understanding the different between Tileset tools and Terrain Set tools. But, this is a small thing.
Brush, not pencil, on the Terrain Brush icon.
The rectangle for the shape tool looks too much like a monitor (partly the glass-blue fill, partly the heavy outline, mostly the very low shadow). Both rectangle and ellipse should be top-level buttons because it is not likely other shapes will be needed like paint programs have (and if they are, find another solution when adding them). (I just now realized there was an ellipse [a.k.a. ”circle”] option.) Breaking this out follows the same logic as to why I did not suggest combining the Magic Wands into one tool.
Yeah, okay, Tiled’s eyedropper/tile-picker is assigned (as a momentary action) to the right mouse button in some modes. It would be useful to some as a tool as well (modifiable by Shift/Ctrl/etc. if you like). Shortcut might be pic(K)er (same as paint.net) or Shift+B. (Aseprite: eyedropper is both a selectable tool [I], and assigned as a momentary action to the Alt key.)
If you feel like you now have too many toolbar buttons, move the transform stuff to the menus (where it is usually found). Could be in either Edit or Map.