Commit Graph

82 Commits

Author SHA1 Message Date
448a605cec Improve auto-translation of Debugger 2025-11-17 20:11:35 +01:00
72d437c030 Move localized number formatting methods to TranslationServer
Co-Authored-By: Pāvels Nadtočajevs <7645683+bruvzg@users.noreply.github.com>
2025-11-10 15:01:22 +08:00
f11aff3841 Editor: Restructure editor code
Moving various editor files into sub folders to reduce clutter
2025-07-04 18:18:22 +02:00
a272376f89 Cleanup accessibility names. 2025-06-23 11:08:36 +03:00
d32d2e9b51 Remove NOTIFICATION_ENTER_TREE when NOTIFICATION_THEME_CHANGED is used 2025-05-06 15:28:03 +02:00
302fa831cc Initial editor accessibility. 2025-04-08 20:25:48 +03:00
10f6c01b9c Remove ABS in favor of Math::abs 2025-03-19 13:52:40 +01:00
5113022dfe Clean up some uses of String::substr
Cases where the end position is either equvalent to the default or past
the end of the string.
2025-03-07 14:50:38 +01:00
03bfb4656f Use FlowContainer for Profiler and Visual Profiler bars 2025-01-29 21:04:35 +03:00
f241c1fda0 Remove unused header in editor.
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2024-12-24 00:40:38 +08:00
9f8bbe43ee Add profiler autostart indicator to EditorRunBar 2024-12-16 10:15:24 +01:00
04882d73bb Merge pull request #99113 from MewPurPur/tweak-debugger-sizings
Add minimum size to some debugger elements
2024-11-29 22:47:02 +01:00
4aed2b7981 Merge pull request #99086 from Calinou/editor-visual-profiler-show-hardware-info
Display CPU and GPU model name in the editor visual profiler
2024-11-29 22:46:58 +01:00
0ff5d5fd04 Add theme type variations for secondary Trees and ItemLists 2024-11-19 18:33:30 +04:00
5769c80196 Add minimum size to some debugger elements 2024-11-12 12:35:41 +02:00
3e8a24d0da Display CPU and GPU model name in the editor visual profiler
This shows the information from the remote device, which will typically
differ from the local device in remote debugging scenarios.
2024-11-11 19:51:54 +01:00
562c666e3d Rename internal Button icon to button_icon to match exposed methods 2024-10-29 16:23:03 -07:00
af6d260c17 Don't include core/io/image.h in core/os/os.h
`core/os/os.h` doesn't use `core/io/image.h`. It just brings
transitive dependencies. Lots of dependencies because `core/os/os.h`
is transitively included in almost every file of godot

Also added `core/io/image.h` into files^1 where `Ref<Image>` and `core/os/os.h`
were used to prevent obscure errors involving `Ref<Image>`

^1 except those which include `core/io/image_loader.h` or `core/io/image.h` by
corresponding .h file with the same name

Signed-off-by: Yevhen Babiichuk (DustDFG) <dfgdust@gmail.com>
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2024-10-18 19:04:19 +03:00
9ed655d0eb Don't flip playback control buttons in RTL layout 2024-10-16 16:28:11 +08:00
c53fd9c7be Implement Autostart Feature for Profiler / Visual Profiler / Network Profiler
Co-authored-by: stmSi <stm1998sithumyo@gmail.com>
2024-09-10 19:40:42 +02:00
5e04f0760a Add target fps editor setting to visual profiler
Use same max fps as project setting

Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2024-09-04 09:47:26 +10:00
fbb879debd [Scene] Add SceneStringNames::text/value_changed 2024-06-19 09:44:38 +02:00
d9e2fc74c7 [Scene] Add SceneStringNames::item_selected 2024-06-19 09:39:05 +02:00
d519715d94 [Scene] Add SceneStringNames::font(_size/_color) 2024-06-18 17:24:27 +02:00
ee79386f7b [Scene] Add SceneStringNames::pressed 2024-05-14 15:51:28 +02:00
413c11357d Use Core/Scene stringnames consistently 2024-05-13 23:41:07 +02:00
c7fb8579fe Stop using RTR() inside the "editor" folder 2024-02-27 16:03:28 -03:00
27dc9fa4c0 Fix frame number underflow in visual profiler
Unsigned subtraction underflow caused the frame counter to be locked at
2^64 in the visual profiler until debugger/profiler_frame_history_size
number of frames had passed.
2024-02-15 14:33:47 +01: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
6de34fde27 Add EditorStringNames singleton 2023-09-03 19:58:18 +02:00
7e21eb7e00 Extract and reorganize texture resource classes 2023-07-14 20:04:21 +02:00
6f1adb72db Fix profilers' GUI trees 2023-06-03 11:47:59 +02:00
dfc4367a47 Add expand modes to TextureRect 2023-01-12 17:06:03 +01:00
2b815df3c1 Use BitField<> in core type masks
* All core types masks are now correctly marked as bitfields.
* The enum hacks in MouseButtonMask and many other types are gone. This ensures that binders to other languages non C++ can actually implement type safe bitmasks.
* Most bitmask operations replaced by functions in BitField<>
* Key is still a problem because its enum and mask at the same time. While it kind of works in C++, this most likely can't be implemented safely in other languages and will have to be changed at some point. Mostly left as-is.
* Documentation and API dump updated to reflect bitfields in core types.
2023-01-08 22:17:40 +01: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
97e991929f Fix: Profiler and Visual Profiler start/stop state inconsistency 2022-12-23 08:14:53 +06:30
e48c5daddf Unify usage of GLOBAL/EDITOR_GET 2022-10-18 19:01:48 +02:00
072f6feaba Make some Image methods static 2022-10-14 14:34:15 +02:00
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
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
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
d2900429e8 Add static methods for creating Image and ImageTexture 2022-07-08 13:40:47 +02:00
344ba0ffaf Refactor Font configuration and import UI, and Font resources. 2022-07-06 14:12:36 +03:00
6c12502076 Increase the editor profiler frame history default and maximum limit
The new default value (1800) allows storing 30 seconds of profiling
at 60 FPS.

The new maximum value (10000) allows storing about 3 minutes of
profiling at 60 FPS.

The profiler graph will scale accordingly to the chosen setting,
so the default value is kept relatively low to prevent the graph
from looking too squished on narrow displays.
2022-05-28 01:03:32 +02:00
c273ddc3ee Style: Partially apply clang-tidy's cppcoreguidelines-pro-type-member-init
Didn't commit all the changes where it wants to initialize a struct
with `{}`. Should be reviewed in a separate PR.

Option `IgnoreArrays` enabled for now to be conservative, can be
disabled to see if it proposes more useful changes.

Also fixed manually a handful of other missing initializations / moved
some from constructors.
2022-05-02 16:28:25 +02:00
0ac6e6acbe More icon updates on theme change 2022-03-15 23:05:41 +08:00
51bbcbdec2 Merge pull request #45263 from KoBeWi/😕 2022-03-15 13:18:27 +01:00
420982dfeb Merge pull request #58735 from Calinou/editor-visual-profiler-tweak-frame-time-label
Tweak editor visual profiler frame time label for consistency
2022-03-10 12:39:27 +01:00
39d429e497 Change some math macros to constexpr
Changes `MAX`, `MIN`, `ABS`, `CLAMP` and `SIGN`.
2022-03-09 16:24:32 +01:00