Commit Graph

127 Commits

Author SHA1 Message Date
kleonc 224c66324b TileMapEditor Fix preview rendering and transform calculations 2023-03-16 14:52:38 +01:00
Haoyu Qiu ccc3bdebb3 Add missing i18n in tiles editor 2023-02-15 23:08:03 +08:00
SnailRhymer db8d308830
Fix random placement behaviour in new TileMap Editor
Fix a bug where scattering could be set to e.g. 0.9 but a tile would still always be placed, as the check rand > 0.9 would be run on every mouse movement until it was successful.
2023-02-10 19:08:03 +01:00
Gilles Roudière 89ccdc7d34 Fix TileMap patterns creation 2023-02-10 10:46:19 +01:00
Rémi Verschelde 525db733c8
Merge pull request #72129 from groud/unclamp_texture_origin
Rename texture_offset and unclamp it
2023-01-27 15:40:52 +01:00
Gilles Roudière d7f3bd50bd Rename texture_offset and unclamp it 2023-01-27 11:04:45 +01:00
Rémi Verschelde aeac5a80af
Merge pull request #72050 from groud/flow_tilemap_toolbar
Make TileMap toolbar a FlowContainer
2023-01-26 01:07:48 +01:00
Gilles Roudière 156c4cbcb8 Make TileMap toolbar a FlowContainer 2023-01-25 16:27:28 +01:00
SaracenOne f5d1cf57bd Add read-only mode to tileset editor. 2023-01-25 09:50:54 +00:00
Rémi Verschelde c3539b4561
Merge pull request #70773 from KoBeWi/lector
Add range iterator to LocalVector
2023-01-21 20:53:29 +01:00
Rémi Verschelde 229c82690d
Merge pull request #70294 from KoBeWi/treedulate
Add a method to get global modulate
2023-01-21 20:51:42 +01:00
kobewi 615c517034 Use range iterators in LocalVector loops 2023-01-21 18:44:42 +01:00
Rémi Verschelde bcaf048f33
Merge pull request #71379 from KoBeWi/destruction_of_compatibility_function
Remove set_drag_forwarding_compat()
2023-01-18 17:40:13 +01:00
Gilles Roudière 6285d6e5f5 Fixes rectangle painting when dragging outside the atlas area 2023-01-17 10:30:07 +01:00
Rémi Verschelde d94a46ab95
Merge pull request #64021 from ajreckof/change-shortcut-for-rect-tool-tilemap
Add `Key::CTRL_OR_CMD` and use it to fix shortcut for tilemap painting tools on macOS
2023-01-16 12:47:07 +01:00
ajreckof fa528b86b6 replace the use of CTRL by CMD_OR_CTRL in three places where using CTRL prevented the use of the functionality on mac
on Mac CTRL + Left click = Right click therefore when a functionality needs CTRL + Left click it is not possible on mac. It then forcibly needs to be CMD on mac
2023-01-16 06:07:16 +01:00
kobewi b58111588a Add EditorUndoRedoManager singleton 2023-01-16 01:11:52 +01:00
kobewi 59ea36b87c Remove set_drag_forwarding_compat() 2023-01-14 15:16:51 +01:00
Rémi Verschelde 228db366bf
Merge pull request #70601 from vmedea/keep-terrain-choice
Keep terrain choice when changing layer in tilemap editor
2023-01-13 18:04:02 +01:00
Juan Linietsky e6a4debede Change set_drag_forwarding() to use callables.
* This solution is much cleaner than the one in 3.x thanks to the use of callables.
* Works without issues in any language (no need to worry about camel or snake case).
* Editor code uses a compatibility function (too much work to redo).

Fixes #59899
2023-01-10 14:09:24 +01:00
Rémi Verschelde d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
Charles Crete 50e09bbaef Fix "Double-click on the TileMap's pattern prints an error" (#70892) 2023-01-03 23:06:52 -05:00
Haoyu Qiu 1ac35c38be Fix heap-use-after-free when using TileMap editor 2022-12-30 14:16:54 +08:00
mara 5380e685d8 Keep terrain choice when changing layer in tilemap editor
Make `TileMapEditorTerrainsPlugin::edit` logic analogous to
`TileMapEditorTilesPlugin::edit`, in that the selection is only
cleared when switching to another tilemap.

Closes #70033.
2022-12-26 21:45:06 +01:00
kobewi 32b0770a73 Add a method to get global modulate 2022-12-19 11:51:37 +01:00
kobewi 99a9401a2c Use layer's modulate for tile previews 2022-12-18 17:31:29 +01:00
henrlin24 afa38bd030 Hide Scattering label and controls within TileMap editor window when "Place Random Tile" is disabled 2022-12-11 13:16:36 -05:00
Rémi Verschelde 43bef98450
Merge pull request #60892 from KoBeWi/fat_selection
Improve tile editor selection appearance
2022-12-09 18:05:38 +01:00
kobewi 871278cdf0 Improve tile editor selection appearance 2022-12-09 14:46:17 +01:00
Haoyu Qiu af3ef844d9 Update tile source icons when editor theme changes 2022-12-08 17:21:37 +08:00
Rémi Verschelde de2d0f156e
Merge pull request #69713 from groud/rename_get_surrounding_tiles
Rename get_surrounding_tiles to get_surrounding_cells
2022-12-07 13:24:57 +01:00
Gilles Roudière 3ea54bb3a1 Rename get_surrounding_tiles to get_surrounding_cells 2022-12-07 11:09:10 +01:00
Haoyu Qiu 9893b04fda Make ID capitalization in tiles editor consistent 2022-12-07 10:07:10 +08:00
trollodel c90d0bd84f Use forward-declarations in big editor classes 2022-11-29 09:59:43 +01:00
kobewi 8a3d2f4e0c Cleanup remaining EditorUndoRedoManager usages 2022-11-24 18:56:22 +01:00
Michael Alexsander 02390693ce Properly center labels in the TileMap/Set editors 2022-11-12 21:35:07 -03:00
Rémi Verschelde 5947f22be9
Merge pull request #67578 from KoBeWi/GEDITOR
Unify usage of GLOBAL/EDITOR_GET
2022-10-31 13:15:58 +01:00
Gilles Roudière fe65d7aa7b Make terrain painting not change neighbors centers bits 2022-10-20 14:47:45 +02:00
kobewi e48c5daddf Unify usage of GLOBAL/EDITOR_GET 2022-10-18 19:01:48 +02:00
kobewi 985671012a Separate Line and CurveLinear icons 2022-10-15 02:00:39 +02:00
kobewi 386382d796 Fix source sort not saving in TileMap editor 2022-10-11 22:40:39 +02:00
bruvzg 0103af1ddd
Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4. 2022-10-07 11:32:33 +03:00
Magian 7e30343a5c TileMap mouse right can delete autotile 2022-09-30 21:15:15 +08:00
Guilherme Sousa 1ae1a02098 Fix mouse release leaving dock area 2022-09-27 13:35:01 +02:00
kobewi aafe72fcec Fix broken patterns on TileMap layer change 2022-09-10 16:45:51 +02:00
Michael Alexsander c4c9e41073 Make `Vector2i` values paired with `EDSCALE` be just `Vector2` 2022-09-08 14:46:32 -03:00
bruvzg 6f4d233062
Fix key mapping changes when moving from macOS to other platform
Removes separate `Command` key (use `Meta` instead).
Adds an event flag to automatically remap `Command` <-> `Control` (cannot be set alongside `Control` or `Meta`).
2022-09-07 18:45:35 +02:00
kobewi 35cae71842 Fix tile source selection from picking 2022-09-07 15:02:49 +02:00
Rémi Verschelde 5fb84e5702 Merge pull request #64661 from Mickeon/rename-tilemap-world
Rename TileMap/GridMap.`world_to_map` and opposite to `local_to_map`
2022-09-06 17:01:16 +02:00
Micky 694190a354 Rename TileMap/GridMap.`world_to_map` and opposite to `local_to_map`
For both TileMap and GridMap:
- `world_to_map` -> `local_to_map`
- `map_to_world` -> `map_to_local`

Also changes any mention of "world" in this context to "local" to avoid future confusion.

Finally, updates the docs of both methods for consistency.
In particular, adding a note on how to convert the returned values from local to global coordinates and vice versa.
2022-09-05 18:08:39 +02:00