Commit graph

120 commits

Author SHA1 Message Date
bruvzg
7246b229e1
Set RTL minimal dash size to 2.0, add invalid dash size error to the draw_dashed_line. 2023-02-17 08:53:08 +02:00
bruvzg
4dfa161120
Add dash and step size checks to draw_dashed_line. 2023-02-16 17:49:18 +02:00
Danil Alexeev
b8eda519d0
Optimize draw_dashed_line() and draw_rect() 2023-02-08 10:44:12 +03:00
Rémi Verschelde
82ff7b4bce
Merge pull request #68492 from Sauermann/fix-picking-sort
Fix propagation order for 2D physics picking events
2023-02-06 15:38:38 +01:00
Markus Sauermann
6e855e3820 Fix propagation order for 2D physics picking events
This patch adds a viewport-configuration-option for sorting
physics-picking events by the Z-Index and the scene tree position
of the collision objects.
2023-02-04 22:44:36 +01:00
Markus Sauermann
3bc426c9d8 Fix toplevel nomenclature
toplevel was 3.x
top_level is 4.x
2023-02-02 17:37:41 +01:00
Rémi Verschelde
394bb0ee2b
Fix various typos with codespell
Finally do the childs -> children rename too.
2023-02-01 08:45:41 +01:00
Rémi Verschelde
4cfdd25384
Merge pull request #67507 from Sauermann/fix-toplevel-root-control-node
Fix event propagation to child after set_as_toplevel
2023-01-31 15:55:46 +01:00
Rémi Verschelde
2e0d9efb72
Merge pull request #72115 from AThousandShips/clip_children_fix
Hide `clip_children` for some non-drawn CanvasItems
2023-01-30 10:02:54 +01:00
Ninni Pipping
bbf203bc32 Hide clip_children for non-drawn CanvasItems 2023-01-30 08:22:06 +01:00
Rémi Verschelde
13e20fed99
Merge pull request #68627 from Sauermann/fix-tooltip-position
Fix position of Tooltips
2023-01-26 16:00:14 +01:00
Markus Sauermann
c4ed247f5f Fix position of Tooltips
CanvasItem::get_screen_transform returns a transform from the CanvasItem
to the coordinate system, where a Popup - created as a child of the
CanvasItem - should be opened.
get_screen_transform makes some simplifications, that work well, when used
in the editor, but not in general cases.

Since Popups like Tooltips are now used more commonly in projects,
it becomes necessary to correct these simplifications.

This solution introduces Viewport::get_popup_base_transform, which makes
the necessary calculations.
2023-01-26 15:15:14 +01:00
Rémi Verschelde
229c82690d
Merge pull request #70294 from KoBeWi/treedulate
Add a method to get global modulate
2023-01-21 20:51:42 +01:00
Rémi Verschelde
9fc40123ab
Merge pull request #71679 from kleonc/draw_polyline_line_strip
`CanvasItem::draw_polyline` Support thin polylines drawn using line strip
2023-01-20 08:48:56 +01:00
Rémi Verschelde
360b61084a
Merge pull request #41239 from dalexeev/fix_draw_rect
Fix `CanvasItem.draw_rect` function with `filled = false`
2023-01-19 22:49:23 +01:00
kleonc
728c51e362 CanvasItem::draw_polyline Support thin polylines drawn using line strip 2023-01-19 21:08:25 +01:00
kleonc
43fc483e6c CanvasItem::draw_arc Clamp angle difference so arc won't overlap itself 2023-01-18 15:16:22 +01:00
Danil Alexeev
c046bb8389
Fix CanvasItem.draw_rect function with filled = false 2023-01-17 09:15:47 +03:00
Danil Alexeev
a8cbb6245b
Fix scaling issue in draw_line and similar methods 2023-01-16 12:49:58 +03:00
bruvzg
9b2843f14f
Improve dashed line alignment and make it optional. 2023-01-13 10:30:12 +02:00
Yuri Sizov
0ca5a72e90 Clarify some parent item checks in CanvasItem 2023-01-09 19:59:55 +03:00
Rémi Verschelde
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
Adam Scott
ea33001b95 Add safety-checks before some servers free() 2022-12-29 16:23:38 -05:00
Aaron Franke
3161647dab
Fix CanvasItem Z-index referring to Node2D 2022-12-19 20:59:14 -06:00
Rémi Verschelde
adc1096b19
Merge pull request #70219 from bruvzg/msdf_outline_scaling
Scale MSDF font outline with the font size and MSDF source size to match dynamic font behavior.
2022-12-19 16:26:56 +01:00
Rémi Verschelde
f29f3db419
Merge pull request #59682 from Sauermann/fix-following-viewport-transform
Include the follow-viewport-transform into CanvasLayer transform calculations
2022-12-19 16:26:19 +01:00
kobewi
32b0770a73 Add a method to get global modulate 2022-12-19 11:51:37 +01:00
Markus Sauermann
2da2220da7 Include the following-viewport-transform into CanvasLayer transforms
The following-viewport-transform was missing from several calculations
2022-12-18 22:44:34 +01:00
bruvzg
20d9457f9d
Scale MSDF font outline with the font size and MSDF source size to match dynamic font behavior. 2022-12-17 22:47:54 +02:00
Hendrik Brucker
e84f45fc93 Move z_index, z_as_relative and y_sort_enabled from Node2D to CanvasItem 2022-11-29 17:11:22 +01:00
Rémi Verschelde
d4bf7f4458
Fixup Clang -Wtype-limits warnings introduced by #52350 2022-11-02 22:36:01 +01:00
Rémi Verschelde
604abb434f
Merge pull request #52350 from BimDav/viewport_canvas_cull
Added Viewport canvas cull mask feature
2022-11-02 17:14:24 +01:00
BimDav
fcb9be66a2 Viewport canvas cull mask feature
Co-authored-by: Valentin Zagura <puthre@gmail.com>
2022-10-31 14:09:49 +01:00
Rémi Verschelde
71a6aba3d7
Merge pull request #67710 from KoBeWi/a_bit_local_global_transform
Remove error condition from get_global_transform()
2022-10-31 11:59:08 +01:00
Micky
0e0a233859 Fix spacing of few PROPERTY_HINT_ENUM hint_strings 2022-10-28 14:51:26 +02:00
Clay John
e1caa8797b
Merge pull request #67043 from clayjohn/clip_children
Improve behaviour of clip_children by clipping to parent alpha value but still retaining parent color
2022-10-27 09:59:27 -07:00
kobewi
2ff676a696 Remove error condition from get_global_transform() 2022-10-21 14:52:43 +02:00
kobewi
4efa851d7f Add methods to get target filter and repeat 2022-10-19 14:41:42 +02:00
Markus Sauermann
13b87c13c7 Fix set_as_toplevel event propagation to child
In certain conditions events did not get propagated to Control childs of
Node2D nodes when setting a parent of the Node2D to toplevel.

This patch makes sure that such Control nodes become root control in the
viewport.
2022-10-16 21:42:16 +02:00
clayjohn
b6f44859d7 Implement multiple clip_children modes for CanvasItems 2022-10-14 08:02:28 -07:00
kobewi
31e62ca827 Allow negative indices in move_child() 2022-09-10 03:54:04 +02:00
kobewi
b218727599 Rename raise() to move_to_front() 2022-09-06 22:13:06 +02:00
Rindbee
621b9a1bfe Fix getting an error message when repeatedly entering and exiting the tree 2022-09-02 10:48:20 +08:00
kobewi
cd01f695d5 Change _redraw_callback to callable_mp 2022-08-30 15:21:48 +02:00
Micky
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
Rémi Verschelde
7013c68619
Merge pull request #64422 from bruvzg/make_fonts_unbearably_ugly_2.0 2022-08-26 11:59:07 +02:00
skyace65
64061678c6 Spell out "anisotropic" fully in filter options 2022-08-23 19:19:56 -04:00
bruvzg
bcc3643989
Add font LCD sub-pixel anti-aliasing support. 2022-08-23 08:47:21 +03:00
Rindbee
fc17d3563d Remove first_draw and reset visibility when entering tree 2022-07-28 12:35:47 +08:00
kleonc
57ff4032d0 Fix CanvasItem not exiting its canvas group on canvas exit 2022-07-20 21:35:31 +02:00