Commit Graph

200 Commits

Author SHA1 Message Date
Gilles Roudière fe65d7aa7b Make terrain painting not change neighbors centers bits 2022-10-20 14:47:45 +02:00
Marc Gilleron 9efb2e786e Fix case where mutex is never unlocked 2022-10-15 13:06:00 +01:00
Rémi Verschelde dc4b616596 Merge pull request #63332 from KoBeWi/static_images_aka_photos
Make some Image methods static
2022-10-15 12:56:57 +02:00
kobewi 985671012a Separate Line and CurveLinear icons 2022-10-15 02:00:39 +02:00
kobewi 072f6feaba Make some Image methods static 2022-10-14 14:34:15 +02:00
Rémi Verschelde 86a836f9e3 Merge pull request #59468 from EricEzaM/fix-zoom-shortcuts
Fix zoom in/out keyboard shortcuts not working
2022-10-13 09:03:58 +02:00
kobewi 386382d796 Fix source sort not saving in TileMap editor 2022-10-11 22:40:39 +02:00
Kongfa Waroros e81e81a56e Fix crashing when editing the `TileSet` field 2022-10-10 00:37:47 +07: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
kobewi 52435e6f90 Disconnect TileSet from source editor if no sources 2022-10-04 20:13:01 +02:00
Rémi Verschelde 380fba6272 Merge pull request #66713 from KoBeWi/remembuh_me
Remember tile source sort between sessions
2022-10-03 14:52:56 +02:00
Rémi Verschelde 88f70dfacd Merge pull request #66656 from magian1127/4.0DelAutotile
TileMap mouse right can delete autotile
2022-10-03 09:19:58 +02:00
kobewi 7247606f64 Remember tile source sort between sessions 2022-10-02 22:41:12 +02:00
Rémi Verschelde e69b7083d4 Merge pull request #65903 from groud/improve_terrain_painting
Right-click to erase TileSet terrains and bugfixes
2022-09-30 17:44:48 +02: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
Eric M 16a3cec71e Fix zoom in/out keyboard shortcuts not working since the introduction of EditorZoomWidget. Add KP shortcuts to zoom in/out. 2022-09-24 18:24:59 +10:00
Rémi Verschelde 658bfb0395 Merge pull request #66159 from MewPurPur/fix-animated-tiles-offset-unit
Remove px unit from animation_separation in TileSet atlas editor
2022-09-20 15:45:41 +02:00
VolTer 6a1d1f1f75 Remove px unit from animation_separation in TileSet atlas editor (as it's tile-based, not pixel-based) 2022-09-20 15:04:26 +02:00
MinusKube 0ff2020bd4 Fix atlas view drawing roots having zoom applied twice 2022-09-17 19:07:56 +02:00
Gilles Roudière 68ffa9a2a1 Right-click to erase TileSet terrains and bugfixes 2022-09-16 15:22:55 +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
Rémi Verschelde 69233093d7 Merge pull request #65241 from bruvzg/no_keymap_ambiguity
Fix key mapping changes when moving from macOS to other platform.
2022-09-08 09:24:24 +02: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
smix8 d7f75fab60 Remove / Replace old Navigation Debug Visualization
- removes / replaces leftovers from old navigation debug code
- cleanes SceneTree and ProjectSettings from old navigation debug
2022-09-07 18:30:35 +02:00
kobewi 35cae71842 Fix tile source selection from picking 2022-09-07 15:02:49 +02:00
Micky dd26ecdd31 Rename CONNECT_ONESHOT TO CONNECT_ONE_SHOT
For consistency. Every other exposed `one_shot` is spaced out like this.
2022-09-06 19:00:33 +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
Aaron Franke 995b9f94e8
Replace Rect2(i) has_no_area with has_area 2022-09-04 23:03:36 -05:00
Jonathan Nicholl 15d057c521 Add `is_zero_approx` methods to `Vector2`, `3`, and `4` 2022-09-02 00:29:50 -04:00
Micky e31bb5ffeb Rename `CanvasItem.update()` to `queue_redraw()`
Affects a lot of classes. Very thoroughly checked signal connections and deferred calls to this method, add_do_method/add_undo_method calls, and so on.

Also renames the internal `_update_callback()` to `_redraw_callback()` for consistency.

Just a few comments have also been changed to say "redraw".

In CPUParticles2D, there was a private variable with the same name. It has been renamed to `do_redraw`.
2022-08-29 14:59:47 +02:00
Rémi Verschelde fd6453c45e Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED"
This reverts commit 4b817a565c.

Fixes #64988.
Fixes #64997.

This caused several regressions (#64988, #64997,
https://github.com/godotengine/godot/issues/64997#issuecomment-1229970605)
which point at a flaw in the current logic:

- `Control::NOTIFICATION_ENTER_TREE` triggers a *deferred* notification with
  `NOTIFCATION_THEME_CHANGED` as introduced in #62845.
- Some classes use their `THEME_CHANGED` to cache theme items in
  member variables (e.g. `style_normal`, etc.), and use those member
  variables in `ENTER_TREE`, `READY`, `DRAW`, etc. Since the `THEME_CHANGE`
  notification is now deferred, they end up accessing invalid state and this
  can lead to not applying theme properly (e.g. for EditorHelp) or crashing
  (e.g. for EditorLog or CodeEdit).

So we need to go back to the drawing board and see if `THEME_CHANGED` can be
called earlier so that the previous logic still works?

Or can we refactor all engine code to make sure that:
- `ENTER_TREE` and similar do not depend on theme properties cached in member
  variables.
- Or `THEME_CHANGE` does trigger a general UI update to make sure that any
  bad theme handling in `ENTER_TREE` and co. gets fixed when `THEME_CHANGE`
  does arrive for the first time. But that means having a temporary invalid
  (and possibly still crashing) state, and doing some computations twice
  which might be heavy (e.g. `EditorHelp::_update_doc()`).
2022-08-29 11:11:29 +02:00
Rémi Verschelde f7f8af232c
Merge pull request #64885 from Mickeon/rename-tooltip-hint
Rename `hint_tooltip` to `tooltip_text` & setter getter
2022-08-28 17:43:01 +02:00
Aaron Record 4b817a565c Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED 2022-08-27 11:52:29 -06:00
Micky ef5b9a06a9 Rename `hint_tooltip` to `tooltip_text` & setget
`hint_tooltip` -> `tooltip_text`
`set_tooltip` -> `set_tooltip_text`
`_get_tooltip` -> `get_tooltip_text`

Updates documentation, too.
2022-08-27 01:35:01 +02:00
Rémi Verschelde dadebb95aa
Merge pull request #64601 from MinusKube/alternative-tile-popup-bug
Fix alternative tile popup menu not being openable
2022-08-26 10:35:43 +02:00
MinusKube 2abccb018e Fix alternative tile popup menu not being openable 2022-08-25 16:20:56 +02:00
MinusKube d71b02cd19 Fix tileset image and background sometimes disappearing 2022-08-25 16:18:39 +02:00
kobewi ece3df3938 Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
Rémi Verschelde 6ba7dacf6b
Merge pull request #63415 from ajreckof/expose_tilemap_custom_data_methods
Expose TileMap methods related to the name of custom data layers
2022-07-29 19:43:55 +02:00
Rémi Verschelde 7199314eb3
Merge pull request #63595 from reduz/remove-signal-connect-binds
Remove Signal connect binds
2022-07-29 18:10:39 +02:00
Juan Linietsky d4433ae6d3 Remove Signal connect binds
Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind().
Changed all uses of it to Callable.bind()
2022-07-29 16:26:13 +02:00
ajreckof 8433ad5353 expose TileMap methods related to the name of custom data layers 2022-07-29 15:05:42 +02:00
Estelle Linkpy Reid d5926b435e Make the alternative tile control correctly handle right-click dragging. 2022-07-29 03:11:08 +02:00
Rémi Verschelde 2e05cc3314
Merge pull request #58361 from V-Sekai/tileset_editor_selection
Fix tileset editor visiblity and selection context
2022-07-28 17:31:21 +02:00
Rémi Verschelde 199ea349f5
Merge pull request #57698 from bluenote10/feature/rename_translated_to_translated_local 2022-07-28 10:03:07 +02:00
Rémi Verschelde 222e489dfd
Merge pull request #63496 from groud/fix_tile_set_not_saving
Fix TileSet not loading correctly when embedded in a scene
2022-07-26 18:27:05 +02:00
Gilles Roudière 8da2710911 Fix TileSet not loading correctly when embedded in a scene 2022-07-26 17:39:35 +02:00