godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.07k stars 20.19k forks source link

New TileMap editor: Tilemap > can select both pencil & erase tool #61299

Open antfitch opened 2 years ago

antfitch commented 2 years ago

Godot version

4.0.alpha8

System information

Windows 10, Mac 11

Issue description

When I created a tilemap and attempted to draw tiles, nothing would happen. I was confused because I selected the pencil icon in the Tiles/Tilemap lower pane and was expecting something to happen. After testing on two computers, I realized that the Erase button was never getting deselected when I selected the pencil icon, and the delete functionality was still being enforced. I hope this isn't the intended behavior of these buttons, so flagging this as a bug.

Steps to reproduce

  1. In Scene, open a tilemap.
  2. Attach a tileset to it.
  3. In the bottom pane, click Erase icon and then click pencil icon. Notice how both icons are highlighted.
  4. Attempt to draw. Won't work.
  5. De-select erase icon.
  6. Works.

Minimal reproduction project

No response

groud commented 2 years ago

This is the intended behavior. The erase button is not a tool, it's a option of the current tool. Erasing also work with the rectangle tool or the paint bucket one for example.

KoBeWi commented 2 years ago

You can avoid this issue by using RMB to erase tiles. The erase tool is there just to indicate that you can erase and how, and for people who can't use right-mouse for any reason.

ajreckof commented 2 years ago

I've been working a lot on TileMap and the ways the tool bar is organised is not intuitive at all i understand how antfitch got confused and if we keep it as it is. We will be sure to have a lot of other person with the same problem.

First let's look at what the actual tool bar look like and why it feels strange and unintuitive to keep it like that :

Capture d’écran 2022-07-27 à 15 46 35

we first have five icon that i would think are actions : the first is a selection tool the four others are multiple version of the same tool. This would be better as one tool with multiple option. By clicking on one of those tool we get access to what i would call options of those tools : first a picker and an eraser those are not options they are tools and a last part has actual options of those tools. The problem here is that there is a mix-up between tools and there options especially the brush type (standard, line, rectangle, fill). In fact when you select the paint you are not selecting a tool but the standard brush. This is why you are not really selecting both paint and erase at the same time you are only selecting the standard brush and erase at the same time

What i would suggest (this is clearly not perfect, but i think it is an improvement still) is to have 4 tools (selection ,paint, erase, picker-> not sure of this one as it is only selection but it stops after one selection and go back to painting), options of those tools for brush type(standard -, line, rectangle, fill -> not sure of this one as normally it is a tool but her you can fill erase which is normally not acceptable so i guess it is more of a brush type). The rest of the options stay untouched. In terms of keyboard shortcut everything will stay the same only the toolbar will be rearrenged. It would look like that (this is just an edit of the photo and i don't really have an icon for the standard brush so just took the selection tool one to show) :

Capture d’écran 2022-07-27 à 15 46 35

Edit : I will try to make it and open a PR once I have a proper implementation

MysteriousMilk commented 2 years ago

@KoBeWi Is RMB supposed to erase tiles? I'm using beta 1 and RMB is not erasing tiles for me. Both LMB and RMB paint tiles. I have to click the eraser icon or press E to erase.

snailrhymer commented 2 years ago

@MysteriousMilk Are you painting tiles directly, or using terrains? When I'm editing tiles in beta1, RMB erases them as expected, but currently both LMB and RMB place terrains when editing terrains (see godotengine/godot-proposals#3873 for a proposal to change that).

MysteriousMilk commented 2 years ago

@snailrhymer You are correct. I was using terrains. So, then I suppose that is the current intended behavior. I agree with the proposal that RMB should erase in terrain mode too.