Commit graph

62 commits

Author SHA1 Message Date
kobewi
91328a86cd Ignore null "id" in tile source proxy 2023-08-01 22:52:16 +02:00
kobewi
2a5db5949f Rework modifying tile source ID 2023-07-31 20:57:09 +02:00
Yuri Sizov
6c11fcd01a
Merge pull request #74717 from KoBeWi/tilesetmap_handler_plugin
Add separate editor plugin for TileMap and TileSet
2023-07-27 19:11:37 +02:00
kobewi
ec24d50469 Add separate editor plugin for TileMap and TileSet 2023-07-26 17:23:41 +02:00
kobewi
f837624d75 Add option to expand tile polygon editors 2023-07-22 22:21:05 +02:00
kobewi
de4a3fa151 Unify and streamline connecting to Resource changes 2023-07-17 19:35:57 +02:00
kobewi
bdb7e62029 Streamline creating tile atlas sources 2023-07-10 15:36:00 +02:00
kobewi
0972e15df5 Improve some tile editor hint labels 2023-06-07 15:59:19 +02:00
mara
93248684b4 Add pattern index tooltip to tilemap and tileset editor
Just a little UI convenience feature. Knowing the index (without having
to count manually) is convenient when working with tile patterns
programmatically, especially when having lots of them.
2023-05-23 19:28:06 +02:00
kobewi
f92392ce23 Fix error spam when deselecting TileMap 2023-02-10 01:07:48 +01:00
SaracenOne
f5d1cf57bd Add read-only mode to tileset editor. 2023-01-25 09:50:54 +00:00
Rémi Verschelde
35326d3dc5
Merge pull request #71626 from groud/fix_add_tileset_layer_undo
Fixes TileSet layer addition not being undoable
2023-01-18 22:28:48 +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
8ecbef36bb Fixes TileSet layer addition not being undoable 2023-01-18 15:54:44 +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
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
Haoyu Qiu
8a22d4cd44 Fix !tile_set.is_valid() error on startup 2022-12-10 13:09:20 +08:00
Haoyu Qiu
af3ef844d9 Update tile source icons when editor theme changes 2022-12-08 17:21:37 +08: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
kobewi
4aaed4fee1 Minor code improvements 2022-10-18 16:44:57 +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
kobewi
7247606f64 Remember tile source sort between sessions 2022-10-02 22:41:12 +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
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
kobewi
ece3df3938 Add per-scene UndoRedo 2022-08-22 18:05:10 +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
Gilles Roudière
62d2549e9e Add terrain center bit 2022-06-10 14:37:39 +02:00
Michael Alexsander
deb1342036 Make TabBar/Container default their alignments to the left instead of center 2022-03-17 18:12:23 -03:00
kobewi
42078dec9f Allow negative indexes in ItemList and PopupMenu 2022-03-12 01:14:03 +01:00
Jakob Bouchard
6553f5c242
Convert _notification methods to switch - Chunk C 2022-02-16 13:03:05 -05:00
Rémi Verschelde
11572c6e30
Editor: Cleanup some includes dependencies
Removes some unnecessary includes from `editor_node.h`, and instead add
those where they're used.

Removes unnecessary `editor_node.h` includes in various editor classes.

Renames `dynamicfont` to `dynamic_font` in a couple files.

Misc cleanup while jumping through that rabbit hole.
2022-02-15 14:54:15 +01:00
Hendrik Brucker
b396fd4eef Improve compilation speed (forward declarations/includes cleanup) 2022-02-12 02:46:22 +01:00
bruvzg
244db37508
Cleanup and move char functions to the char_utils.h header. 2022-02-04 11:35:01 +02:00
Rémi Verschelde
b8b33df178
TileSetAtlasSource: Make get_tile_data return TileData *
This is now possible thanks to `Variant` changes.

Also unbind some `_` prefixed methods which don't need to be exposed.
2022-01-28 14:27:12 +01:00
kobewi
e793331cd7 Allow sorting tileset sources 2022-01-26 13:58:32 +01:00
Rémi Verschelde
fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
Nathan Franke
41a20171eb
align to horizontal_alignment, valign to vertical_alignment, related 2021-12-09 01:38:46 -06:00
Gilles Roudière
699f020f1d Fix TileSet editor drag and drop not working 2021-11-01 10:22:41 +01:00
Rémi Verschelde
c942d567eb
Merge pull request #53926 from YeldhamDev/i_am_tabbar_now 2021-10-20 15:42:41 +02:00
Gilles Roudière
5317b79a1d Remove the tilemap/tileset editor switch, move it to tabs 2021-10-19 17:11:34 +02:00
Michael Alexsander
67acb7de6e Rename Tabs to TabBar 2021-10-19 11:37:31 -03:00
Gilles Roudière
1a95f893c4 Implement TileMap patterns palette 2021-10-19 11:57:37 +02:00