Commit graph

19 commits

Author SHA1 Message Date
K. S. Ernest (iFire) Lee 8f0c056431 Fix specific warnings issues by Clang
Found by `scons dev=yes` on llvm-mingw.
2021-10-14 14:14:26 -07:00
Aaron Franke 4e6efd1b07
Use C++ iterators for Lists in many situations 2021-07-23 17:38:28 -04:00
reduz 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
reduz f4379cbc82 Clean up Tree
Fixes some problems introduced by #49917

* Tree used minimum size as a stretch ratio, so it forced a minimum size of 1.
* Minimum size redone, stretch ratio moved to a separate setting
* Fitting to contents was enforced, this is more intuitive, but in many situations this is undesired.
* Added a clip content option for situations where fit to contents does not apply.
* Icon would scroll with the item, making it invislbe if the item is too long.
* Made icon always appear to the right (or left if RTL is enabled) of the visible item space.
2021-07-04 13:13:53 -03:00
reduz 37776b2867 Clean up RenderingServer and its bindings
* Rewrote bindings for RenderingServer.
* They are now all up to date.
* Several unused methods and deprecated features were cleaned up.
2021-07-01 09:07:36 -03:00
Gilles Roudière d7d32ced5b Implement Tree's internal minimum width calculation 2021-06-28 15:54:31 +02:00
Lightning_A e28fd07b2b Rename instance()->instantiate() when it's a verb 2021-06-19 20:49:18 -06:00
Aaron Franke 10d7fccb54
Rename ButtonList enum and members to MouseButton 2021-03-23 07:13:23 -04:00
Rémi Verschelde 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
Rémi Verschelde 09212fba1e
Fix missed renamings from empty() to is_empty()
Those were missed in #44401 or added by later PRs.
2020-12-29 09:55:07 +01:00
bruvzg 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
Aaron Franke 02161aad5a
Remove empty lines around braces with the formatting script 2020-11-16 23:38:11 -05:00
Rémi Verschelde 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
Rémi Verschelde 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
Rémi Verschelde dcd1151d77 Enforce use of bool literals instead of integers
Using clang-tidy's `modernize-use-bool-literals`.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-bool-literals.html
2020-05-14 13:45:01 +02:00
Aaron Franke 540156b387
[Core] Rename linear_interpolate to lerp 2020-04-29 04:02:49 -04:00
Juan Linietsky 441f1a5fe9 Popups are now windows also (broken!) 2020-03-26 15:49:42 +01:00
Rémi Verschelde cb282c6ef0 Style: Set clang-format Standard to Cpp11
For us, it practically only changes the fact that `A<A<int>>` is now
used instead of the C++03 compatible `A<A<int> >`.

Note: clang-format 10+ changed the `Standard` arguments to fully
specified `c++11`, `c++14`, etc. versions, but we can't use `c++17`
now if we want to preserve compatibility with clang-format 8 and 9.
`Cpp11` is still supported as deprecated alias for `Latest`.
2020-03-17 07:36:24 +01:00
Fabio Alessandrelli 3b47eb51e4 Update editor debugger to new remote debugger.
Shared RemoteDebuggerPeer code between client and server.
Move editor profilers inside editor/debugger folder.
2020-03-08 12:36:39 +01:00
Renamed from editor/editor_visual_profiler.cpp (Browse further)