Zini wrote: ↑12 May 2017, 14:56
I imagine the texture editing functions like this:
1. When the user drops a texture on a terrain tile that is not selected the texture is applied to that tile.
2. When a part of the terrain is selected and the user drops a texture on it the texture is applied to the selected terrain tiles.
3. When an unselected piece of terrain is clicked with the primary edit button the texture from the brush button is applied to an area of the terrain specified by the current brush.
4. When a selected piece of terrain is clicked with the primary edit button the texture from the brush button is applied to all selected terrain tiles.
5. When the user clicks a piece of terrain with the secondary edit button the brush button is set to use the texture on this terrain tile.
6. The user can copy the selected part of the terrain as usual.
7. Pasting works in two ways: a) by pressing ctrl-v while hovering the mouse over the insert point, b) via the brush button (see below)
Selection-Button:
When clicking the selection button a small window should pop up that allows to configure the selection brush:
- single point (no size)
- square (size is length of an edge)
- circle (size is diameter)
- custom (makes the shape and size of the current selection into a brush)
The selection button should also have a context menu with a list of recently used brushes (size of list configurable via user settings).
A fancy implementation may display hints about the currently selected selection brush in the selection button icon (but that is optional).
Brush-Button:
When the user drops a texture on the brush button the texture is selected. The brush button should also have a context menu with a list of recently used textures (size of list configurable via user settings).
When clicking the brush button a small window should pop up that allows to configure the brush:
- single point (no size)
- square (size is length of an edge)
- circle (size is diameter)
- custom (makes the shape and size of the current selection into a brush)
- paste (only available while there is copied terrain in the clipboard)
Note that this window and the one of the selection button are almost identical. A shared implementation would be a good idea.
A fancy implementation may display hints about the currently selected brush in the brush button icon (but that is optional).
A final word about selection and brushes: As you have probably noticed there is a lot of duplication between these two. This is unavoidable IMO. We need a fully features selection mechanism for moving terrain (textures) around. But forcing the user to do texture editing by selecting the terrain first and then change the selection would be a very bad usability move. Therefore we also need a fully featured brush for direct editing.