Commit Graph

3215 Commits

Author SHA1 Message Date
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
Gilles Roudiere b6f30f1b5b Fixes infinite loop in GridContainer
(cherry picked from commit 44cb8eb3a2)
2018-03-29 00:41:03 +02:00
Leon Krause a5ccaa919e Prevent division by zero in GridContainer
(cherry picked from commit 38623e07ac)
2018-03-29 00:12:35 +02:00
bncastle 449e75455b Fix BaseButton not always calling _pressed()
Fix "ui_accept" action in BaseButton.cpp not calling _pressed() func in
GDScript

(cherry picked from commit ceb079fa35)
2018-03-28 23:55:58 +02:00
Bernhard Liebl 73cc3a96c0 Fix uninitialized data in Sprite::_get_rects()
(cherry picked from commit 5f917139ab)
2018-03-28 23:54:10 +02:00
Gary Oberbrunner 91bc845152 Fix infinite loop in GridContainer layout
I had a grid container and tried to set rect.min_height larger in the
editor; that caused an infinite loop in GridContainer::_notification
at line 118. The reason is max_index was being set to the *height* of
the row, not the *index* of the row. So later when it tried to erase
that row and try again, there was nothing to erase.
I applied the same fix to the width code.

(cherry picked from commit 561e57df13)
2018-03-28 23:45:39 +02:00
Hugo Locurcio 8a0966a8cb Add an hinting mode setting to DynamicFonts
- Editor font hinting can now be tweaked in the Editor Settings.
- DynamicFonts used in projects now have tweakable hinting settings
  in their DynamicFontData child. Changes will be visible upon
  reloading the scene in the editor.

(cherry picked from commit c1544c12ef)
2018-03-28 22:56:04 +02:00
MrCdK 99331ca395 Added pitch scale property to AudioStreamPlayer, AudioStreamPlayer2D and AudioStreamPlayer3D
(cherry picked from commit 5bc010e8ee)
2018-03-28 22:43:44 +02:00
JFonS a026e2626c Fix weird editor crash when switching from editing one gradient to another keeps 'grabbing' variable to true
(cherry picked from commit f68594a525)
2018-03-28 22:01:19 +02:00
Marc Gilleron cf2e30b30c Fix Line2D tile mode for non-square textures
(cherry picked from commit d2fae5c9a6)
2018-03-28 21:33:49 +02:00
poke1024 f7efa9d43a Fix line thickness for CollisionPolygon2D.
(cherry picked from commit a36f6e5386)
2018-03-28 21:23:42 +02:00
Rémi Verschelde c0132f30c4 Viewport: Fix missing tooltips w/ disabled physics object picking
Previously this option seemed to be the sole responsible for enabling
physics processing in Viewport, while several other features like
tooltips and debugging collision hints rely on it.

All this logic is moved to internal processing (it's incorrect to let
it be affected by users disabling physics/idle processing), and disabling
physics object picking no longer affects the internal physics processing.

Fixes #17001.

(cherry picked from commit ce7da2c7d6)
2018-03-03 14:19:57 +01:00
Bernhard Liebl f967334f53 Fix more regressions in RichTextLabel from PR 15711
(cherry picked from commit 0e1e95c41f)
2018-03-03 01:47:52 +01:00
Rémi Verschelde 262c97098d Fix serialization of identifiers with non printable ASCII characters
Fixes #6888.

(cherry picked from commit ab001d830b)
2018-03-02 14:54:45 +01:00
Hein-Pieter van Braam cee20e24bd Don't crash when trying to add an invalid navmesh
It is possible to try to add an invalid object as a navmesh through
GDScript which results in an engine crash. This creates a debug message
that should help the user figure out what's wrong.

(cherry picked from commit 555eebf3f4)
2018-03-02 12:06:46 +01:00
Hein-Pieter van Braam 675899a521 Fix various valgrind reported uninitialized variable uses
(cherry picked from commit d702d7b335)
2018-03-01 21:06:31 +01:00
poke1024 c800653c6f Fix regression through fa98637aca
(cherry picked from commit 89f607604e)
2018-03-01 19:19:29 +01:00
JFonS 69274ef368 Fix visibility of gizmos on scene load
(cherry picked from commit 99d740c46e)
2018-02-27 00:02:01 +01:00
Gilles Roudiere 34591f9451 Fixes collisions shape selection
(cherry picked from commit c250a9a9f9)
2018-02-24 10:53:10 +01:00
Rémi Verschelde d79a7a2773 Refactor version macros and fix related bugs
The previous logic with VERSION_MKSTRING was a bit unwieldy, so there were
several places hardcoding their own variant of the version string, potentially
with bugs (e.g. forgetting the patch number when defined).

The new logic defines:

- VERSION_BRANCH, the main 'major.minor' version (e.g. 3.1)
- VERSION_NUMBER, which can be 'major.minor' or 'major.minor.patch',
  depending on whether the latter is defined (e.g. 3.1.4)
- VERSION_FULL_CONFIG, which contains the version status (e.g. stable)
  and the module-specific suffix (e.g. mono)
- VERSION_FULL_BUILD, same as above but with build/reference name
  (e.g. official, custom_build, mageia, etc.)
  Note: Slight change here, as the previous format had the build name
  *before* the module-specific suffix; now it's after
- VERSION_FULL_NAME, same as before, so VERSION_FULL_BUILD prefixed
  with "Godot v" for readability

Bugs fixed thanks to that:

- Export templates version matching now properly takes VERSION_PATCH
  into account by relying on VERSION_FULL_CONFIG.
- ClassDB hash no longer takes the build name into account, but limits
  itself to VERSION_FULL_CONFIG (build name is cosmetic, not relevant
  for the API hash).
- Docs XML no longer hardcode the VERSION_STATUS, this was annoying.
- Small cleanup in Windows .rc file thanks to new macros.

(cherry picked from commit 23ebae01dc)
2018-02-24 01:34:34 +01:00
Rado'sPC\aRaGaR 3d804778fd Fix quotation in string
fix for #16404

(cherry picked from commit f38e819fc1)
2018-02-22 13:23:44 +01:00
Artem Varaksa eacd66e784 Clean up some bad words from code comments
(cherry picked from commit d35e486228)
2018-02-22 12:22:41 +01:00
Poommetee Ketson b5f8c1a53b Fix timer second not zero padded when < 10
Also RTR "Time Left:"

(cherry picked from commit d2e3607fa0)
2018-02-22 12:20:23 +01:00
luz.paz 751806b5c7 Fix typos with codespell
Found via `codespell -q 3 --skip="./thirdparty,./editor/translations" -I ../godot-word-whitelist.txt`
Whitelist consists of:
```
ang
doubleclick
lod
nd
que
te
unselect
```

(cherry picked from commit 612ab4bbc6)
2018-02-22 12:17:06 +01:00
isaacremnant f01821b60a Force controls to save rect_clip_content since they do not all default to false.
(cherry picked from commit cc902cf9ab)
2018-02-22 00:01:33 +01:00
Bernhard Liebl fa98637aca Fixes wrong vertical font layout in RichTextLabel
(cherry picked from commit 77b1320fb4)
2018-02-21 23:52:49 +01:00
Ian 723613dbc3 TextEdit folding over unindented comments
(cherry picked from commit d327f75392)
2018-02-21 23:51:45 +01:00
Hein-Pieter van Braam 8efb9c8cdd Actually fix the db/dc renaming mess
Local builds save lives :)
2018-02-21 23:21:21 +01:00
Hein-Pieter van Braam 75289b4017 revert the renaming _tree_db_selected function 2018-02-21 22:57:50 +01:00