Commit Graph

161 Commits

Author SHA1 Message Date
aXu-AP ec8374643e Allow opening of polygon editor without texture
There's no reason to deny access to polygon editor when there's no texture set.
2024-09-08 23:24:13 +03:00
Lars Pettersson 5a0a0257e1
Fix Polygon2D UV editor error when opening grid settings 2024-08-31 23:22:48 +02:00
Yuri Rubinsky 52889ab7ee [Scene] Add SceneStringName::toggled 2024-08-28 15:14:26 +03:00
kleonc 1b7626f391 Fix snapping when zoomed in Polygon2D UV editor 2024-08-27 17:01:41 +02:00
bruvzg fba7ad8c7b
Remove spaces and punctuation from the beginning of translatable strings. 2024-08-22 20:51:13 +03:00
kleonc 6b82c48bc6 Fix leaf Bone2Ds drawing in Polygon2D UV editor 2024-08-07 21:06:00 +02:00
kobewi 681769e2c9 Fix undoredo handling in some dialogs 2024-07-04 14:17:47 +02:00
A Thousand Ships fbb879debd
[Scene] Add `SceneStringNames::text/value_changed` 2024-06-19 09:44:38 +02:00
A Thousand Ships ca18a06ecb
[Scene] Add `SceneStringNames::confirmed` 2024-06-19 09:40:54 +02:00
A Thousand Ships 926afccbd8
[Scene] Add `SceneStringNames::panel` 2024-05-30 22:54:50 +02:00
A Thousand Ships 755a0efbb6
[Scene] Add `SceneStringNames::id_pressed` 2024-05-30 22:54:04 +02:00
A Thousand Ships ee79386f7b
[Scene] Add SceneStringNames::pressed 2024-05-14 15:51:28 +02:00
kobewi 413c11357d Use Core/Scene stringnames consistently 2024-05-13 23:41:07 +02:00
kobewi 6f7da2f5e4 Remove uv_editor_bounds editor setting 2024-04-23 19:13:22 +02:00
kobewi a031911c82 Use check_changed_settings_in_group() everywhere 2024-02-19 21:34:45 +01:00
Yuri Sizov 95b27fe8c7 Reorganize code related to editor theming
This change introduces a new EditorThemeManager class
to abstract theme generatio and its subroutines.

Logic related to EditorTheme, EditorColorMap, and editor
icons has been extracted into their respective files with
includes cleaned up.

All related files have been moved to a separate folder to
better scope them in the project. This includes relevant
generated files as well.
2024-01-16 11:57:45 +01:00
aXu-AP 5bdb5f5c37 Improve UV editor zoom behavior
Scrolling focuses towards mouse like in canvas editor.
Center view on opening.
Adjust scroll area to include polygons larger than texture.
Change zoom slider to EditorZoomWidget.
2024-01-10 13:27:20 +02:00
aXu-AP a45db4d616 Fix UV editor not showing polygon correctly
Fix polygon not showing correctly if UVs have been moved around. Show the actual contents of the polygon instead.
2023-12-05 15:38:37 +02:00
Rémi Verschelde 9108445eca
Merge pull request #84076 from aXu-AP/uv-editor-texture-transform
Fix UV editor not using texture transform
2023-12-04 23:00:54 +01:00
aXu-AP d7e5c25e4a Fix UV editor not using texture transform 2023-10-27 22:33:37 +03:00
aXu-AP aa3568b8dd Fix 2D bone weight editor not accounting for offset
Skeleton was shown in wrong place in Polygon2D UV editor's bone painting mode.
2023-10-27 20:37:23 +03:00
aXu-AP 76f81cfc21 Fix Polygon2D undo on transforming vertices
Fix: Action not committed to history when transforming all points in UV editor's Points mode.
2023-10-20 11:59:09 +03:00
Rémi Verschelde 8ddf73c74d
Merge pull request #81939 from YuriSizov/gui-flat-and-depressed
Replace flat buttons with flat-styled buttons with a visible pressed state
2023-09-25 17:18:29 +02:00
Yuri Sizov 4bd569be95 Replace flat buttons with flat-styled buttons with a visible pressed state 2023-09-19 22:36:29 +02:00
ajreckof 6afadbaa9f Replace Ctrl in editor shortcuts with Cmd or Ctrl depending on platform 2023-09-19 10:29:07 +02:00
kobewi 6de34fde27 Add EditorStringNames singleton 2023-09-03 19:58:18 +02:00
Alex Drozd 0c75d5d70c apply selected texture filter when editing UV 2023-06-18 22:56:26 +02:00
Yuri Sizov 4154039832 Improve includes of EditorNode (and everything else)
Also start organizing editor-specific GUI components
into a dedicated folder, `editor/gui`.
Also move `editor_file_server` next to the rest of debugger classes.
2023-04-07 18:59:49 +02:00
Hugo Locurcio 0f73ef1df9
Use 8×8 default grid size for TextureRegion and 2D polygon editors
Power-of-two grid sizes are more suited to most game assets.
2023-02-21 17:02:24 +01:00
Gilles Roudière a3b431b09d Add gesture to ViewPanner and simplify a bit its API 2023-01-23 16:43:53 +01:00
Rémi Verschelde 5b1df48c6c
Convert en_GB spelling to en_US with codespell 2023-01-23 11:02:20 +01:00
kobewi b58111588a Add EditorUndoRedoManager singleton 2023-01-16 01:11:52 +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
trollodel c90d0bd84f Use forward-declarations in big editor classes 2022-11-29 09:59:43 +01:00
kobewi 15831e381b Unify usage of undo_redo in editor 2022-11-02 17:51:58 +01:00
kobewi e48c5daddf Unify usage of GLOBAL/EDITOR_GET 2022-10-18 19:01:48 +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
Yuri Sizov 43f03e2ce6 Improve naming of theme properties throughout GUI code
Rename ItemList's bg -> panel
Rename ItemList's bg_focus -> focus
Rename ProgressBar's bg -> background
Rename ProgressBar's fg -> fill
Rename Tree's bg -> panel
Rename Tree's bg_focus -> focus
Rename ScrollContainer's bg -> panel
Rename FileDialog's *_icon_modulate -> *_icon_color
Rename FileDialog's files_disabled -> file_disabled_color
Rename CheckButton's on/off -> checked/unchecked
Rename check_v_adjust -> check_v_offset
2022-09-06 22:53:17 +03: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
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
Aaron Franke b831fb0a54
Rename Transform2D "elements" to "columns" 2022-04-29 08:02:39 -05:00
Rémi Verschelde b78aa4fe19 Style: Apply clang-tidy to current code, add `readability-redundant-member-init` 2022-04-04 21:49:51 +02:00
kobewi 2057ea2883 Remove duplicate editor settings definitions 2022-03-06 22:05:49 +01:00
Rémi Verschelde 51a00c2855
Merge pull request #58182 from akien-mga/style-cleanup-if-semicolons-deadcode 2022-02-16 16:55:07 +01:00
megalobyte 8824b6c5e9 Update if == NOTIFICATION_* to switch statements to match coding style 2022-02-16 08:44:37 -05:00
Rémi Verschelde b8b4580448
Style: Cleanup single-line blocks, semicolons, dead code
Remove currently unused implementation of TextureBasisU, could be re-added
later on if needed and ported.
2022-02-16 14:06:29 +01:00