Commit Graph

64 Commits

Author SHA1 Message Date
94282d88f9 Core: Use Math namespace for constants 2025-04-10 16:29:30 -05:00
ef3e8b1609 Merge pull request #102786 from Giganzo/top-toolbar-menu-button-styles
Fix MenuButton style in editor top menu bar
2025-04-10 10:18:10 -05:00
302fa831cc Initial editor accessibility. 2025-04-08 20:25:48 +03:00
4f4031a675 Replace size() == 0 with is_empty(). 2025-04-02 19:18:43 +08:00
6f25babd6b Remove empty constructors and destructors from editor/ 2025-03-17 21:20:02 +01:00
f7b6f98215 Fix MenuButton style in editor top menu bar 2025-02-10 10:03:54 +01:00
a1846b27ea Improve use of Ref.is_null/valid
Use `is_null` over `!is_valid` and vice versa.
2024-12-23 16:35:02 -05:00
562c666e3d Rename internal Button icon to button_icon to match exposed methods 2024-10-29 16:23:03 -07:00
kit
5e1c9d68aa Extract editor main screen 2024-09-09 11:06:18 -04:00
065dd099dd Remove empty bind_methods() 2024-08-15 08:24:32 +02:00
755a0efbb6 [Scene] Add SceneStringNames::id_pressed 2024-05-30 22:54:04 +02:00
ee79386f7b [Scene] Add SceneStringNames::pressed 2024-05-14 15:51:28 +02:00
9cd30208d6 Improve SceneTreeEditor usability
- Mark contextually relevant node
- Remember/Clear selection as appropriate
- Scroll to marked/selected node
2024-03-31 21:35:10 +02:00
684752e75b Replace error checks against size with is_empty 2024-02-09 12:50:15 +01:00
dc3194f668 Only allow MeshInstance3D-inherited nodes in MultiMesh Populate Surface dialog 2023-11-15 12:24:11 +01:00
8ecc0c4f47 Fix accessing editor theme items throughout the UI
This also exposes `EditorInterface::get_editor_theme`.
2023-09-15 14:51:01 +02:00
6de34fde27 Add EditorStringNames singleton 2023-09-03 19:58:18 +02:00
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
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
c90d0bd84f Use forward-declarations in big editor classes 2022-11-29 09:59:43 +01:00
1459507ed2 Rename EditorInterface.get_editor_main_control to get_editor_main_screen 2022-09-07 03:01:58 +03: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
e4067064ce Add ok_button_text to AcceptDialog and cancel_button_text to ConfirmationDialog 2022-07-09 10:47:08 -05: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
fa7a7795f0 Rename Basis get_axis to get_column, remove redundant methods 2022-05-03 09:37:47 -05:00
6f51eca1e3 Discern between virtual and abstract class bindings
* Previous "virtual" classes (which can't be instantiated) are not corretly named "abstract".
* Added a new "virtual" category for classes, they can't be instantiated from the editor, but can be inherited from script and extensions.
* Converted a large amount of classes from "abstract" to "virtual" where it makes sense.

Most classes that make sense have been converted. Missing:

* Physics servers
* VideoStream
* Script* classes.

which will go in a separate PR due to the complexity involved.
2022-03-10 12:28:11 +01:00
05b56f316d Remove most EditorNode constructor parameters and fields 2022-02-14 14:16:24 +01:00
b396fd4eef Improve compilation speed (forward declarations/includes cleanup) 2022-02-12 02:46:22 +01:00
fe52458154 Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
49403cbfa0 Replace String comparisons with "", String() to is_empty()
Also:
- Adds two stress tests to test_string.h
- Changes to .empty() on std::strings
2021-12-09 04:48:38 -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
de3f6699a5 Rename Transform to Transform3D in core 2021-06-03 07:30:01 -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
44357ddc28 Editor: Fix invalid use of Node::get_viewport() after rename of EditorNode::get_viewport()
Fixes #44761, was a regression from #44524.

The PR passed CI because EditorNode::get_viewport() used to shadow Node::get_viewport()
(which was a bug in itself, fixed by #44524), so once it was renamed the existing code
relying on it fell back to the now available Node::get_viewport().
This might bite some thirdparty modules too.
2020-12-28 19:51:39 +01:00
4b8b803931 Rename Control margin to offset 2020-12-23 06:25:56 +00:00
8509c8c8fc Rename AcceptDialog get_ok() to get_ok_button()
Also renames:
- AcceptDialog add_cancel() to add_cancel_button()
- ConfirmationDiaglog get_cancel() to get_cancel_button()
2020-12-14 18:43:52 +00:00
526e060b73 Resize dialogs (FileDialog, EditorFileDialog, Reparent, SceneTreeDialog and resource depency dialogs). 2020-07-14 14:35:22 +02:00
0ee0fa42e6 Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14 21:57:34 +02:00
0be6d925dc Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to
will now be changed automatically to remove the first empty line.

This makes us lean closer to 1TBS (the one true brace style) instead
of hybridating it with some Allman-inspired spacing.

There's still the case of braces around single-statement blocks that
needs to be addressed (but clang-format can't help with that, but
clang-tidy may if we agree about it).

Part of #33027.
2020-05-14 16:54:55 +02:00
95a1400a2a Replace NULL with nullptr 2020-04-02 13:38:00 +02:00
eaaee63b62 doc: Update classref with node renames
A few extra renames for classes which were missed in last week's PRs.
2020-03-30 18:23:02 +02:00
d1acbbce7f Rename more 2D and 3D nodes to follow convention
Rename editor plugins to match the new node names.
2020-03-27 16:26:34 +01:00
eaae4b6408 Renamed 2D and 3D nodes to make their types explicit
Fixes #30736.
2020-03-27 14:54:04 +01:00
441f1a5fe9 Popups are now windows also (broken!) 2020-03-26 15:49:42 +01:00
4758057f20 Working multiple window support, including editor 2020-03-26 15:49:40 +01:00
01afc442c7 Signals: Port connect calls to use callable_mp
Remove now unnecessary bindings of signal callbacks in the public API.
There might be some false positives that need rebinding if they were
meant to be public.

No regular expressions were harmed in the making of this commit.
(Nah, just kidding.)
2020-02-28 14:24:09 +01:00
69c95f4b4c Reworked signal connection system, added support for Callable and Signal objects and made them default. 2020-02-20 08:24:50 +01:00
3205a92ad8 PoolVector is gone, replaced by Vector
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are
sugar for `Vector<Type>`.
2020-02-18 10:10:36 +01:00
6deffa62fb Several fixes to 3D rendering, and multimesh implementation. 2020-02-11 12:01:22 +01:00
a7f49ac9a1 Update copyright statements to 2020
Happy new year to the wonderful Godot community!

We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.

Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
2020-01-01 11:16:22 +01:00