Commit Graph

3243 Commits

Author SHA1 Message Date
chanon 4897227d04 fix can't set AudioStreamPlayer stream to null
(cherry picked from commit 2bdac0a5d9)
2018-07-28 16:06:30 +02:00
Marcelo Fernandez d3a482ab65 Fix possible bug with AudioStreamPlayer2D audio position
(cherry picked from commit 0c78a58b64)
2018-07-27 17:14:22 +02:00
Rémi Verschelde c709dff1a2 Style: Format code with clang-format 6.0.1
(cherry picked from commit 7c9f7452f4)

Travis: Update style checks to clang-format 6.0.1

(cherry picked from commit 003ac67df1)
2018-07-18 16:37:23 +02:00
volzhs a34daf6851 Fix segfault at quiting editor
(cherry picked from commit e639db0529)
2018-07-08 15:39:15 +02:00
GagaPete 139185e543 Fix CORS problems due to added headers on JS target
Before this change, missing User-Agent and Accept headers were automatically
added on all platforms. Setting the User-Agent header forces the browser to
do a CORS preflight (see 1) which fails if the HTTP endpoint is not
configured appropriate. It's not neccesary to set either header as the
browser sets them and so this commit disables that functionality on the JS
target.

1: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Simple_requests
(cherry picked from commit 8a4dccc4ce)
2018-07-08 15:39:15 +02:00
Hugo Locurcio 403f7dc35f Change ".." punctuation for "..." in editor strings (#16507)
(cherry picked from commit 1c419531a0)
2018-06-05 21:42:33 +02:00
Hein-Pieter van Braam e09170dffa Revert "Prevent visibility notification been called twice in object creation"
This reverts commit 826108efec.

This caused a regression (#18614), and potentially other unintended regressions.
2018-06-05 12:14:57 +02:00
Bastiaan Olij 77542276f8 Check for 0 roll influence
(cherry picked from commit 660bebec94)
2018-06-01 17:59:15 +02:00
Bastiaan Olij 0a3779135d Improve side impulse calculation
(cherry picked from commit a36e5951ff)
2018-06-01 17:59:11 +02:00
toger5 b04c9a1b66 fixed capital A osx
(cherry picked from commit 6476b708d9)
2018-06-01 17:43:28 +02:00
toger5 dd026c77e3 fixed a input not registered in osx script editor
(cherry picked from commit d927e972d1)
2018-06-01 17:43:14 +02:00
Sherjil Ozair 00bf66d7f2 Add additional macos shortcuts for going to start/end of line
(cherry picked from commit 166c7fdc9d)
2018-06-01 17:43:10 +02:00
volzhs 0b3b3de2cd Ability to change path color with self modulate
Fix #18164

(cherry picked from commit d77ffa3e97)
2018-05-13 22:43:10 +02:00
Bastiaan Olij 5e551a584e added custom aabb to primitives
(cherry picked from commit 1ee40206d4)
2018-05-13 22:41:29 +02:00
Hugo Locurcio 8ccb27ce18 Tweak the property hint ranges of caret blink and line length guideline
This allows for more precise adjustments.

(cherry picked from commit 0eb2f6c223)
2018-05-13 22:36:21 +02:00
robfram a187fb381e Fix placeholders position in `LineEdit` when editing inside the Editor
Editing the `Text` property through the editor causes a wrong
placement of the placeholder, as it calls `LineEdit::clear_internal`,
which was wrongly reseting the cached placeholder width.

Fix #18184.

(cherry picked from commit c17de1f70f)
2018-05-13 22:19:42 +02:00
Charly Mourglia 10c12b37ec Consider TextEdit paste operation complex.
Not considering a paste operation as a complex one ends up
adding an unneeded extra step when pasting over a selection.

This fixes issue #18325

(cherry picked from commit b09e0454bb)
2018-05-13 22:16:56 +02:00
thfrwn 3491e776dd fix clang6 assignment error
(cherry picked from commit f48ff4dc64)
2018-05-13 22:13:14 +02:00
Poommetee Ketson 2e61ca6193 Particles: fix corrupted scene when saved after convert (2nd try)
(cherry picked from commit 38865345d9)
2018-05-13 22:08:53 +02:00
Geequlim 0c030d6e08 Fix double free for drag preview control in viewport
(cherry picked from commit 56c2463f8c)
2018-05-13 21:56:56 +02:00
ShyRed c2a8eb2081 Use fake audio playing property in editor
It appears that some time ago users were supposed to be able to include the playback of sound effects in their animations by placing keys on the "playing" property. Back then the key frame editor took the value of the checkbox in the property_editor.

Somewhere / Sometime this behaviour changed and the key frame editor is now reading the actual value from the object instead of relying on the property editor.

This commit introduces a fake active field that is returned when reading the playing property in the editor. While the actual active flag is changed when playback is finished the fake one will stay the same thus allowing the user to take their time with setting the key in the animation editor.

(cherry picked from commit bc1522e268)
2018-05-13 21:42:27 +02:00
Hein-Pieter van Braam 5917063192
Merge pull request #18082 from RandomShaper/improve-gui-touch-3.0
Implement universal translation of touch to mouse (3.0)
2018-05-13 21:30:37 +02:00
Pedro J. Estébanez e10a2e5999 Implement universal translation of touch to mouse
Now generating mouse events from touch is optional (on by default) and it's performed by `InputDefault` instead of having each OS abstraction doing it. (*)

The translation algorithm waits for a touch index to be pressed and tracks it translating its events to mouse events until it is raised, while ignoring other pointers.

Furthermore, to avoid an stuck "touch mouse", since not all platforms may report touches raised when the window is unfocused, it checks if touches are still down by the time it's focused again and if so it resets the state of the emulated mouse.

*: In the case of Windows, since it already provides touch-to-mouse translation by itself, "echo" mouse events are filtered out to have it working like the rest.

On X11 a little hack has been needed to avoid a case of a spurious mouse motion event that is generated during touch interaction.

Plus: Improve/fix tracking of current mouse position.
2018-04-30 19:04:35 +02:00
Hein-Pieter van Braam 3ee4d6af2e Hand-merge API hash fixes #18514
This hasn't made it into master yet but is important for mono support.
If this turns out to be the wrong call we'll revert and merge whatever
next version of this becomes available.
2018-04-29 20:44:48 +02:00
Bernhard Liebl 6e658fdcc1 Warn about WorldEnvironment being ignored
(cherry picked from commit 29d305599d)
2018-04-29 15:00:41 +02:00
sersoong b5425e3d87 Fixed context menu TTR bugs
(cherry picked from commit a1cfc89108)
2018-04-28 22:57:32 +02:00
volzhs 94ddb499df Fix error spam with Sprite has compressed texture
Fix #18177

(cherry picked from commit 3ecf8eef37)
2018-04-28 22:54:54 +02:00
volzhs 5a947ebc42 Fix index out of size error on Image
Fix #18229

(cherry picked from commit af0d547c02)
2018-04-28 22:54:44 +02:00
ShyRed d89015cfe3 ItemList selection: Check against item count
ItemList needs to check against the number of items available when the user moves the selection via "ui_right" action.

(cherry picked from commit cbcb96ae85)
2018-04-28 22:43:36 +02:00
Chaosus 826108efec Prevent visibility notification been called twice in object creation
(cherry picked from commit d42b17607e)
2018-04-28 22:38:19 +02:00
robfram 7f64090401 LineEdit placeholder alignment, content margins, and overflow bugs
LineEdit doesn't correctly uses style margins nor use placeholders
width correctly, causing multiple rendering bugs.

(cherry picked from commit 53b51f68bf)
2018-04-28 22:30:06 +02:00
Pedro J. Estébanez 02f767fe0d Add support for radio-looking items with icon
Letting users of `PopupMenu` use them. `OptionButton` was one of those interested and is updated in this commit.

Fixes #18063.

(cherry picked from commit b964a9e678)
2018-04-28 22:17:08 +02:00
Pedro J. Estébanez 20fa30bde6 Use radio-button-like menu entries where applicable
(cherry picked from commit a6dc160d5c)
2018-04-28 22:16:53 +02:00
Pedro J. Estébanez a525ea128d Add radio-button-looking entries to PopupMenu
They work exactly the same as current checkbox-decorated items, but in order to preserve compatibility, separate methods are used, like `add_radio_check_item()`. The other option would have been to add a new parameter at the end of `add_check_item()` and the like, but that would have forced callers to provide the defaults manually.

`is_item_checkable()`, `is_item_checked()` and `set_item_checked()` are used regardless the item is set to look as check box or radio button.

Keeping check in the name adds an additional clue about these facts.

Closes #13055.

(cherry picked from commit ab3b1d9f3e)
2018-04-28 22:16:25 +02:00
Alexander Alekseev 4002da9603 Fix RigidBody's configuration warning for Z axis
(cherry picked from commit 6a5ed3a42b)
2018-04-28 20:30:34 +02:00
karroffel 2e31c9fe10 fix bone scale/rotation in AnimationPlayers
fixes #17325.

The bone pose transform was created by setting the rotation and
**then** scaling the transform. This leads to object "deformation"
that's not intended.

(cherry picked from commit 4303fbca5a)
2018-04-28 20:19:35 +02:00
Poommetee Ketson c5dfe6824c Mesh: fix crash when creating mesh outline from QuadMesh
Since create_outline can only make outline for PRIMITIVE_TRIANGLES,
when QuadMesh (which is PRIMITIVE_TRIANGLE_FAN) is used to create
outline, will leave `arrays` empty, and crash when it is being indexed
for "indices" subarray.

This PR shows error when there's only one surface and it is not
TRIANGLES. Also prevent the crash if it has more than one surface
and none of them are TRIANGLES (and any other cases that could leave
`arrays` empty) by checking the size of `arrays` == 8 before indexing
it, since the method seems to expect `arrays` to be of that size.

(cherry picked from commit a492d22952)
2018-04-28 20:16:22 +02:00
Benedikt Bär 4c19fc2eb1 Implement missing navgiation polygon debugging in tilemap
(cherry picked from commit 84d60b0829)
2018-04-28 20:03:46 +02:00
Ruslan Mustakov 56395b03e1 Fix oversampled font artifacts after resize
Font update after resize relies on the viewport size which was updated
after the font was already refreshed, which resulted in artifacts when
it was rendered into the actual/new viewport size.

Fixes #15173.

(cherry picked from commit 47747718d6)
2018-04-28 17:42:57 +02:00
Gilles Roudiere 448d281222 Fixes wrong calculation of gridcontainer's children size
(cherry picked from commit 896e5a64d3)
2018-04-28 17:40:29 +02:00
ShyRed 171542d96a Update TileMap when its TileSet changes
Make TileMap monitor its TileSet for changes and emit a signal when the TileSet changes. This makes the editor update and show the updated version of the TileSet.

(cherry picked from commit 67f4944a21)
2018-04-28 16:25:33 +02:00
robfram b855bc44ae Implement line clipping for `TextureProgress` to avoid bad rendering due to imprecise UV mapping
Original code used a quick aproximation for simulating the
correspondent texel in the `TextureProgress` texture as radial
progress indicator. This lead to visualization errors. Changed it for
a Liang-Barsky line clipping algorithm stripped to its minimum for
this specific use case.

Fix #17364.

(cherry picked from commit 7991bd168d)
2018-04-28 16:19:52 +02:00
ShyRed c39e32ae60 Update Sprite when Texture changes
Make Sprite monitor its Texture for changes and trigger an update when the sprite changes.

(cherry picked from commit a23c0877f1)
2018-04-28 16:13:28 +02:00
Bernhard Liebl 6d767b0f9a AnimationPlayer: fix scrubbing after play backwards
(cherry picked from commit b553b38e7b)
2018-04-28 15:55:36 +02:00
robfram bffd4f0548 Fix bad autocomplete of partially written node paths when using syntactic sugar notation ($)
If you had a tree like Node2D->Sprite->Camera2D and you write a
code like $Node2D/Spr and chose the autocompletion sugested
Node2D/Sprite, the resulting string was $Node2D/Node2D/Sprite
instead $Node2D/Sprite. If you chose Node2D/Sprite/Camera2D, then
you ended with $Node2D/Node2D/Sprite/Camera2D.

Fix #15813.

(cherry picked from commit 95f186b621)
2018-04-14 23:14:30 +02:00
Alexander Holland 259b9664ef auto-completion edge jump
arrow up/down jumps to end/start on edges

(cherry picked from commit e36dd4282b)
2018-04-14 21:29:48 +02:00
Andreas Loew 7ad6a9aeea Fix selection of Sprites using AtlasTexture in the editor.
Fixes #16261.

(cherry picked from commit a01ba4523b)
2018-04-14 20:30:51 +02:00
Ranoller aaed3ef5ed FIX Windows enter/exit mouse notifications
Fix to this issue #17202

(cherry picked from commit 979dccbd8d)
2018-04-14 20:25:57 +02:00
Geoffrey 5d7b7f798a Made print_tree_pretty() function which displays scene tree graphically
(cherry picked from commit 8362ce4769)
2018-04-14 19:56:55 +02:00
Ruslan Mustakov 710b57d493 Make BaseButton not emit press when container is scrolled
This fixes the problem described in #13996 in a proper way.

This also adds "deadzone" property to ScrollContainer. It can be used
on mobile, where taps are not as precise as mouse clicks. Player could
slightly move their finger when tapping, in which case we still want
the button to be pressed rather than the container to be scrolled.

(cherry picked from commit dcf5be92a3)
2018-04-14 19:36:10 +02:00