Commit Graph

7337 Commits

Author SHA1 Message Date
lawnjelly ba74643594 Force unsigned behaviour for bitfield enums
Some compilers (notably MSVC) were using signed values for bitfield enums. This was causing problems where 2 bits were used to store 4 or less enum values, where they were being treated as negative numbers.

This PR explicitly requests these enums to be treated as unsigned values.
2022-06-06 16:58:21 +01:00
Haoyu Qiu d043f91b79 Fix `Viewport.own_world` documentation
Also fixed the naming of the setter's parameter and made an `if` block
straightforward.
2022-06-06 21:34:36 +08:00
Rémi Verschelde e80dfb7b12
Merge pull request #61687 from YeldhamDev/double_hover_fix
Fix hover being drawn twice inside `PopupMenu`s
2022-06-06 13:17:25 +02:00
Michael Alexsander b4e4f88cd9 Fix specific bug related to submenus in `PopupMenu` 2022-06-04 13:26:12 -03:00
Michael Alexsander 78fdebf8cc Fix hover being drawn twice inside `PopupMenu`s 2022-06-04 02:51:22 -03:00
Rémi Verschelde a6b27b526f
Merge pull request #60822 from lawnjelly/fti_add_child_reset 2022-06-03 14:56:19 +02:00
FireForge ea46f32246 Fix get_data() for GradientTexture2D 2022-05-31 23:19:25 -05:00
Rémi Verschelde b44928586b
Merge pull request #61483 from kleonc/popup-update-exclusive-when-shown
[3.x] Allow changing `exclusive` of already popped up `Popup`
2022-05-31 12:14:37 +02:00
Rémi Verschelde 51e52b5ed8
Merge pull request #61496 from timothyqiu/asymmetric-le-3.x
[3.x] Fix LineEdit clear button for asymmetric stylebox
2022-05-31 08:56:13 +02:00
bruvzg 553bdc6783
[3.x] Fix Label3D oversampling. 2022-05-30 09:05:41 +03:00
Haoyu Qiu 1e6747d185 Fix LineEdit clear button for asymmetric stylebox 2022-05-28 19:51:50 +08:00
kleonc 9ba598f94f Allow changing `exclusive` of already popped up Popup 2022-05-28 01:10:49 +02:00
kleonc 736b0c4e97 PopupMenu Fix hover stylebox overflowing horizontally 2022-05-27 23:35:17 +02:00
Hugo Locurcio 011ff93aa5
Tweak TextMesh decomposition error message to mention self-intersecting lines 2022-05-24 15:12:15 +02:00
Rémi Verschelde 88dba8e625 Fix typos with codespell
Using codespell 2.2-dev from current git.
2022-05-23 21:41:46 +02:00
bruvzg eb44e23ca3
[Label3D, 3.x] Monitor default theme font changes, to prevent use of invalid materials. 2022-05-23 18:16:17 +03:00
Rémi Verschelde b2cdc16a1d
Merge pull request #61281 from bruvzg/textmesh_3x
Backport TextMesh and expose dynamic font vector outlines
2022-05-23 16:16:40 +02:00
Rémi Verschelde f2e3d89562
Merge pull request #61309 from timothyqiu/label-3d-line-spacing
[3.x] Use float when calculating `Label3D` line height
2022-05-23 16:10:42 +02:00
Haoyu Qiu ff5e671c81 Use float when calculating Label3D line height 2022-05-23 17:58:51 +08:00
bruvzg 1ab459a951
Fix material shader key for SDF fonts. 2022-05-23 12:03:09 +03:00
bruvzg d502bd4847
Backport TextMesh and expose dynamic font vector outlines 2022-05-23 10:47:28 +03:00
bruvzg dc6d8d6098
Backport Label3D node implementation and Sprite*3D material render priority. 2022-05-23 09:14:41 +03:00
smix8 8df9fd076f Process NavigationAgent2D/3D avoidance on demand only
Changes NavigationAgent avoidance callback to a toggle that is disabled by default.
Also fixes a few missing descriptions / wrong warnings.

(cherry picked from commit 7f3688603c)
2022-05-22 19:43:56 +02:00
Hugo Locurcio 548c511f57 Tweak the disabled files text color in FileDialog for readability
Contrast rate is still fairly low, but the text needs to be easy enough
to distinguish from non-disabled items.

(cherry picked from commit 8962d2760d)
2022-05-22 19:43:56 +02:00
Haoyu Qiu 4a03bc8f75 Update last min size when Control becomes visible
(cherry picked from commit 4ac999cc3f)
2022-05-22 19:43:56 +02:00
Daniel Kariv 47ead8504a add check for selection when try to push a meta.
Add a check for when we select a text but end on a link. Before it would act as if we just click an link, but now it changes it so if we click-drag over a link, we could select it (and not move to other page).

(cherry picked from commit e6c909b489)
2022-05-22 19:26:45 +02:00
smix8 b03f6bc170 Remove arbitrary NavigationMesh bake property limits
Lowers or removes the slider limits and steps from NavigationMesh resources and changes some default values to better work with realistic unit sizes by default.

(cherry picked from commit cda93057f7)
2022-05-22 19:26:45 +02:00
bruvzg b5d5515a2b Fix incorrect encoding used in _error_handler functions
Co-authored-by: Haoyu Qiu <timothyqiu32@gmail.com>
2022-05-22 18:56:41 +08:00
Rémi Verschelde 67208ae80b
Merge pull request #60402 from Calinou/httprequest-timeout-float 2022-05-20 15:27:29 +02:00
Rémi Verschelde 2a1a2380e5
Merge pull request #61027 from timothyqiu/quit-prop-3.x
[3.x] Make `auto_accept_quit` and `quit_on_go_back` properties
2022-05-20 08:13:41 +02:00
smix8 88acb5b798 Make Navigation Agents and Obstacles respect parent process mode
Temporarily removes agent from navigation map when parent node cannot process due to SceneTree pause and process_mode property. Normal process_mode does not work as other agents would still avoid the paused agents because they were still active on the navigation map and the rvo world. Also fixes potential crash when region_get_map or agent_get_map is called while no map is set.

(cherry picked from commit 6b51ab66d8)
2022-05-19 15:34:56 +02:00
smix8 44915696d2 Add wrong surface warnings to NavigationMesh.create_from_mesh()
Adds warnings when at least one of the input mesh surfaces is of wrong primitive type or has an empty vertex / index array as those broken input meshes would fail as both navmesh as well as later when creating debug meshes.

(cherry picked from commit 4185fce0ef)
2022-05-19 15:25:43 +02:00
Rémi Verschelde 78a9d21da3
Merge pull request #61185 from okla/3.x 2022-05-19 12:02:14 +02:00
Sergey Pershenkov 46ab2512b8 Return -1 from get_selected_id() when not selected
Partial cherry pick from 3b146c5eaa
2022-05-19 12:42:54 +03:00
Rémi Verschelde b7523a953f Revert invalid PopupMenu breaking change from #61102
Fixes #61179.
2022-05-19 10:02:02 +02:00
Haoyu Qiu b657d0c76c Add dedicated macros for property name extraction
* Replace case-by-case extraction with PNAME & GNAME
* Fix group handling when group hint begins with property name
* Exclude properties that are PROPERTY_USAGE_NOEDITOR
2022-05-19 11:31:35 +08:00
Rémi Verschelde b0a2b34d48
Merge pull request #61150 from smix8/navigation_region2d_update_navpoly_3.x 2022-05-18 14:36:55 +02:00
smix8 37530b0871 Update NavigationPolygonInstance when polygons of NavigationPolygon change
Updates NavigationPolygonInstance polygons on the NavigationServer2D when the NavigationPolygon Resource emits its changed signal due to e.g. polygons altered by script.
2022-05-18 13:53:46 +02:00
Yuri Rubinsky 32b9818965 Add node list param to GraphEdit::delete_nodes_request signal 2022-05-18 12:36:00 +03:00
Rémi Verschelde 281c5c9a56
Merge pull request #61102 from okla/3.x
[3.x] Make various improvements to OptionButton
2022-05-16 23:51:55 +02:00
Sergey Pershenkov 431c032d8c Make various improvements to OptionButton
- Allow OptionButton selection to be set to -1 to signify no selection, both via API and in the editor.
- Reset OptionButton selection to -1 when the selected item has been removed.
- Fully convert PopupMenu to a zero-based ID system, which improves an inconsistency in generated IDs when making new items in the editor.

(cherry picked from commit 3b146c5eaa)
2022-05-16 22:47:46 +03:00
Haoyu Qiu 96b1b1991b Fix AnimatedSprite doesn't emit animation_finished when changing playback direction
(cherry picked from commit d5f5e96e11)
2022-05-16 21:12:21 +02:00
Markus Sauermann ff52becb47 Distribute remaining pixel to expanding childs of GridContainer
(cherry picked from commit 6b3207644b)
2022-05-16 21:12:21 +02:00
FireForge 67e6fc8e43 Fix Theme type group naming in the inspector
(cherry picked from commit 197be78bc5)
2022-05-16 21:12:21 +02:00
smix8 3e01d32b4c Clamp NavigationMesh sample_distance above zero
While default ReCast library has support for 0.0 'sample_distance' the Godot implementation does not an crashes.
Previously Godot would set all sample_distance values below 0.9 to 0 which causes the crashes.

This limits the sample_distance range selection to 0.1 - 16.0 and also clamps sample_distance that are below 0.1 before ReCast receives them.

(cherry picked from commit e33fa9d833)
2022-05-16 21:10:36 +02:00
smix8 c3b39ca1e9 Disable threaded NavigationMesh bake on unsupported OS
Automatically disables threaded NavigationMesh bake when OS does not support threads.

(cherry picked from commit 49c603e127)
2022-05-16 17:52:07 +02:00
smix8 b11708c50d Expose NavigationObstacle2D/3D get_rid() and add config warning
Exposes get_rid() function for scripting.
Adds configuration warning when obstacle is used with not intended static body parent.

(cherry picked from commit 001d89223f)
2022-05-16 17:52:07 +02:00
smix8 847fab6272 Fix NavigationObstacle2D/3D get_global_transform() error
Fixes NavigationObstacle2D/3D reporting a 'get_global_transform: Condition "!is_inside_tree()" error when estimating the agent radius.

The collisionshapes that are lower in the SceneTree order than the obstacle node are not loaded in the SceneTree yet so the global_transform function fails.

Also adds warning message when this happens.

(cherry picked from commit cc707412e9)
2022-05-16 17:52:07 +02:00
Hendrik Brucker 7a4187495d Fix button icon expansion calculation with empty text
(cherry picked from commit c09a5e2774)
2022-05-16 17:14:43 +02:00
Rémi Verschelde 5e693b6d84 Fix warnings found by Emscripten 3.1.10
Fix `-Wunused-but-set-variable`, `-Wunqualified-std-cast-call`, and
`-Wliteral-range` warnings.

(cherry picked from commit d8935b27a9)
2022-05-16 16:38:26 +02:00