Commit graph

30 commits

Author SHA1 Message Date
Aaron Franke
1b348b3c17
Remove connect *_compat methods 2020-12-05 17:56:47 -05: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
Michael Alexsander
eee9d053a3 Fix timeline cursor not updating on zoom change in the Bezier editor 2020-07-02 16:07:28 -03:00
Michael Alexsander
20c1196bb0 Make timeline cursor in the Bezier editor just as thick as the Animation editor 2020-07-01 23:52:21 -03: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
07bc4e2f96 Style: Enforce separation line between function definitions
I couldn't find a tool that enforces it, so I went the manual route:
```
find -name "thirdparty" -prune \
  -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \
  -o -name "*.glsl" > files
perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files)
misc/scripts/fix_style.sh -c
```

This adds a newline after all `}` on the first column, unless they
are followed by `#` (typically `#endif`). This leads to having lots
of places with two lines between function/class definitions, but
clang-format then fixes it as we enforce max one line of separation.

This doesn't fix potential occurrences of function definitions which
are indented (e.g. for a helper class defined in a .cpp), but it's
better than nothing. Also can't be made to run easily on CI/hooks so
we'll have to be careful with new code.

Part of #33027.
2020-05-14 16:54:55 +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
Aaron Franke
540156b387
[Core] Rename linear_interpolate to lerp 2020-04-29 04:02:49 -04:00
lupoDharkael
95a1400a2a Replace NULL with nullptr 2020-04-02 13:38:00 +02: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
Rémi Verschelde
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
Juan Linietsky
33b5c57199 Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.
- Renames PackedIntArray to PackedInt32Array.
- Renames PackedFloatArray to PackedFloat32Array.
- Adds PackedInt64Array and PackedFloat64Array.
- Renames Variant::REAL to Variant::FLOAT for consistency.

Packed arrays are for storing large amount of data and creating stuff like
meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of
memory. That said, many users requested the ability to have 64 bits packed
arrays for their games, so this is just an optional added type.

For Variant, the float datatype is always 64 bits, and exposed as `float`.

We still have `real_t` which is the datatype that can change from 32 to 64
bits depending on a compile flag (not entirely working right now, but that's
the idea). It affects math related datatypes and code only.

Neither Variant nor PackedArray make use of real_t, which is only intended
for math precision, so the term is removed from there to keep only float.
2020-02-25 12:55:53 +01:00
Juan Linietsky
69c95f4b4c Reworked signal connection system, added support for Callable and Signal objects and made them default. 2020-02-20 08:24:50 +01:00
Juan Linietsky
3f335ce3d4 Texture refactor
-Texture renamed to Texture2D
-TextureLayered as base now inherits 2Darray, cubemap and cubemap array
-Removed all references to flags in textures (they will go in the shader)
-Texture3D gone for now (will come back later done properly)
-Create base rasterizer for RenderDevice, RasterizerRD
2020-02-11 11:53:26 +01:00
Rémi Verschelde
4faaf6089a Remove unused #if 0'ed code 2020-01-21 21:41:54 +01:00
Rémi Verschelde
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
PouleyKetchoupp
bdb9149d7e Fixed missing argument for clear_selection signal in Bezier Curve editor
Also removed unused clear_selection signal in Animation Track editor (never emitted)

Fixes #32348
2019-09-25 19:35:21 +02:00
Valentin Zagura
fbcb68c15a Animation Bezier Editor : fix double inserts on undo 2019-09-06 13:59:44 +01:00
Rémi Verschelde
2ee0ca3d43
Merge pull request #31916 from puthre/bezier_editor_zoom
Animation Bezier Editor - fixed vertical zoom around mouse
2019-09-03 12:31:53 +02:00
Valentin Zagura
e33f13840d Animation Bezier Editor - fixed vertical zoom around mouse
Fixed vertical zoom so it zooms around the mouse cursor not around the center of the window.
2019-09-03 00:51:55 +01:00
Valentin Zagura
a5ebed211f Animation Bezier Editor: Extended zoom in and zoom out limits and fixed guide lines to accomodate sub unit steps and steps other than powers of 5 2019-08-30 15:12:42 +01:00
qarmin
3c154eb93b Remove unnecessary code and add some error explanations 2019-07-01 12:59:42 +02:00
Ben Hickling
a7ef836c69 Fixed a few issues with the bezier animation track editor, fixed the Travis CI errors, added TTR to bezier value labels and rounded them to 3 decimal points 2019-04-30 10:41:23 +01:00
Michael Alexsander Silva Dias
3ef8238c1c Make translatable some undo/redo operations in the editor 2019-02-21 16:41:01 -03:00
Rémi Verschelde
b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
Mateus Felipe C. C. Pinto
e7968954e8 Change color of AnimationPlayer curve to "highlight"
This is to be consistent with Curve editor and to be less confusing
related to tangent lines color.
2018-12-18 13:46:03 -02:00
willnationsdev
5436abefe4 Refactor editor icon retrieval 2018-09-14 09:27:56 -05:00
Rémi Verschelde
9eb4d4ab2d Add missing copyright headers 2018-08-29 22:41:17 +02:00
Juan Linietsky
b659fd6d74 Entirely new (and much improved) animation editor. 2018-06-07 12:52:00 -03:00