Commit Graph

46 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
1a8306bbc1 Allow custom monitors to select desired type 2025-10-22 07:31:44 -05:00
f11aff3841 Editor: Restructure editor code
Moving various editor files into sub folders to reduce clutter
2025-07-04 18:18:22 +02:00
5b49fd4207 Selectively apply FOCUS_ACCESSIBILITY to the Labels instead of setting it by default. 2025-04-23 12:47:31 +03:00
6f25babd6b Remove empty constructors and destructors from editor/ 2025-03-17 21:20:02 +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
9e259ef061 Merge pull request #97884 from passivestar/list-variations
Add theme type variations for secondary Trees and ItemLists
2024-11-27 10:47:14 -06: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
9625fdc1d7 Fix float value used for MONITOR_TYPE_QUANTITY 2024-11-11 08:33:47 -05:00
d519715d94 [Scene] Add SceneStringNames::font(_size/_color) 2024-06-18 17:24:27 +02:00
2f1aaca167 Merge pull request #91927 from timothyqiu/monitor-names
Make performance monitor names translatable
2024-05-14 12:07:14 +02:00
d33e79f299 Make performance monitor names translatable 2024-05-14 10:05:32 +08: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
1638c1b28f Add const lvalue ref to editor/* container parameters 2024-02-26 15:28:15 -03:00
45eedba1fa Improve editor theme generation after the refactor 2024-01-17 15:16:53 +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
75ee58fd04 [Editor] Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable 2023-09-15 20:15:39 +02:00
6de34fde27 Add EditorStringNames singleton 2023-09-03 19:58:18 +02:00
9b500ab53c Fix premature theme item access in editor tools 2023-04-03 18:01:11 +02: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
a13cdfe096 Use a bold font for section titles in the editor performance monitor 2022-11-11 19:34:13 +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
ae349d8227 Merge pull request #64377 from Mickeon/rename-canvas-redraw
Rename `CanvasItem.update()` to `queue_redraw()`
2022-08-30 14:47:41 +02:00
97f8c9b97c Rename TreeItem's set_tooltip to set_tooltip_text
`set_tooltip` -> `set_tooltip_text`
`get_tooltip` -> `get_tooltip_text`

For consistency:
`get_button_tooltip` -> `get_button_tooltip_text`
And the `tooltip` parameter in `add_button` was renamed to `tooltip_text`
2022-08-30 11:16:23 +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
97dfbea6ad Rename Control PRESET_WIDE to PRESET_FULL_RECT 2022-07-18 20:08:11 -05:00
344ba0ffaf Refactor Font configuration and import UI, and Font resources. 2022-07-06 14:12:36 +03:00
b5c96df277 Move duplicate AutoWrap, Overrun and VisibleChar behavior enums to the TextServer. 2022-06-16 16:49:37 +03:00
45af29da80 Add a new HashSet template
* Intended to replace RBSet in most cases.
* Optimized for iteration speed
2022-05-20 22:40:38 +02:00
746dddc067 Replace most uses of Map by HashMap
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
  (order matters) but use is discouraged.

There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
2022-05-16 10:37:48 +02:00
8b7c7f5a75 Add a new HashMap implementation
Adds a new, cleaned up, HashMap implementation.

* Uses Robin Hood Hashing (https://en.wikipedia.org/wiki/Hash_table#Robin_Hood_hashing).
* Keeps elements in a double linked list for simpler, ordered, iteration.
* Allows keeping iterators for later use in removal (Unlike Map<>, it does not do much
  for performance vs keeping the key, but helps replace old code).
* Uses a more modern C++ iterator API, deprecates the old one.
* Supports custom allocator (in case there is a wish to use a paged one).

This class aims to unify all the associative template usage and replace it by this one:
* Map<> (whereas key order does not matter, which is 99% of cases)
* HashMap<>
* OrderedHashMap<>
* OAHashMap<>
2022-05-12 11:21:29 +02:00
efd9b8bc29 Capitalize names in the debugger 2022-03-29 09:07:08 -05:00
fe52458154 Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
41a20171eb align to horizontal_alignment, valign to vertical_alignment, related 2021-12-09 01:38:46 -06:00
3c0fdcc8ac Use "enum class" for input enums 2021-11-12 15:37:54 -06:00
6631f66c2a Optimize StringName usage
* Added a new macro SNAME() that constructs and caches a local stringname.
* Subsequent usages use the cached version.
* Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time.
* Replaced all theme usages by this new macro.
* Replace all signal emission usages by this new macro.
* Replace all call_deferred usages by this new macro.

This is part of ongoing work to optimize GUI and the editor.
2021-07-18 21:20:02 -03:00
56a8d3f30c Improvements to Label's layout options
- Added options to trim the text in case it overruns
- Added more autowrap modes
- Improved line breaking, which ignores trailing spaces
2021-07-04 16:43:55 +02:00
10d7fccb54 Rename ButtonList enum and members to MouseButton 2021-03-23 07:13:23 -04:00
b5334d14f7 Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆
2021-01-01 20:19:21 +01:00
5b937d493f Rename empty() to is_empty() 2020-12-28 10:39:56 +00:00
4b8b803931 Rename Control margin to offset 2020-12-23 06:25:56 +00:00
99666de00f [Complex Text Layouts] Refactor Font class, default themes and controls to use Text Server interface.
Implement interface mirroring.
Add TextLine and TextParagraph classes.
Handle UTF-16 input on macOS and Windows.
2020-11-26 14:25:48 +02:00
bfadb882b1 Added Custom Performance Monitor and feature to read intermediate values of Monitor
Custom monitors can be added/removed/checked using `Performance.add_custom_monitor`/`Performance.remove_custom_monitor`/`Performance.has_custom_monitor`

The value can be viewed in the `Monitor` tab of Debugger.

Text before `/` is used to categorize the custom monitor.

`EditorPerformanceProfiler` class is created to separate logic from `ScriptEditorDebugger`

User can click on the graph of monitors to read the value at that point.

Graph includes intermediate base lines.
2020-06-29 17:20:29 +05:30