Commit Graph

31 Commits

Author SHA1 Message Date
302fa831cc Initial editor accessibility. 2025-04-08 20:25:48 +03:00
82a0290871 Add auto translate mode for items in PopupMenu and OptionButton 2025-03-09 23:50:11 +08:00
466590d0ec Use get_slicec instead of get_slice for single character splitters 2025-03-08 20:36:37 +01:00
af56d6e8e8 Use SceneStringName in more places 2024-12-02 14:39:16 +01:00
562c666e3d Rename internal Button icon to button_icon to match exposed methods 2024-10-29 16:23:03 -07:00
fbb879debd [Scene] Add SceneStringNames::text/value_changed 2024-06-19 09:44:38 +02:00
ca18a06ecb [Scene] Add SceneStringNames::confirmed 2024-06-19 09:40:54 +02:00
ee79386f7b [Scene] Add SceneStringNames::pressed 2024-05-14 15:51:28 +02:00
7b42c24550 Make auto translation inheritable 2024-02-15 16:51:19 -03:00
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
0e8f90f4c8 Update deferred calls to use Callables 2024-01-09 16:11:47 +01:00
9b03fb36f9 Improve threading in ClassDB and EditorHelp 2023-10-20 22:14:04 +02:00
119f379a3d Merge pull request #81075 from SekoiaTree/prevent-leading-dot
Prevent creating any type of file with a leading dot
2023-09-08 09:10:59 +02:00
bbeb2f98f5 Prevent creating any type of file with a leading dot
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: gotnospirit <gotnospirit@gmail.com>
2023-09-07 22:13:02 +02:00
6de34fde27 Add EditorStringNames singleton 2023-09-03 19:58:18 +02:00
4d13126e3b Disable translation of root name on scene creation 2023-08-20 11:23:38 +02:00
7f41403a6f Standardize dialog input validation as a new class 2023-08-08 16:14:35 +02:00
1ab7d1fcad Respect "editor/naming/node_name_casing" in Create New Scene dialog 2023-07-27 14:01:43 -07:00
08ef3044ee Fix missing translation in SceneCreateDialog 2023-06-26 19:19:36 +02:00
00b5222f66 Fix inconsistent state of Controls when editing and running scenes 2023-01-09 15:54:04 +03:00
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
3b4f5f8a04 Remove more instances of 'instance' being used as a verb 2022-11-16 14:01:53 +01:00
0103af1ddd Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4. 2022-10-07 11:32:33 +03:00
59f933b0e1 Fixed root name invalid at scene creation. 2022-09-22 17:02:07 +07:00
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
10a56981dc Rename String plus_file to path_join 2022-08-29 19:38:13 -05:00
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
4b817a565c Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED 2022-08-27 11:52:29 -06:00
97dfbea6ad Rename Control PRESET_WIDE to PRESET_FULL_RECT 2022-07-18 20:08:11 -05:00
e4067064ce Add ok_button_text to AcceptDialog and cancel_button_text to ConfirmationDialog 2022-07-09 10:47:08 -05:00
a08d930740 Rework scene creation dialog 2022-06-21 15:42:56 +02:00