Commit graph

3413 commits

Author SHA1 Message Date
Chaosus d42b17607e Prevent visibility notification been called twice in object creation 2018-04-13 15:28:38 +03:00
Rémi Verschelde fbc61374ca Use internal physics processing for Nodes' internal logic 2018-04-11 09:28:14 +02:00
Poommetee Ketson 72aa87758a
Update classref and docs, fix missing parameters' name 2018-04-11 10:20:22 +07:00
Paulb23 aba4247910 Fixed color region calculation for the first line 2018-04-10 20:42:28 +01:00
Guilherme Felipe 4f05190fb0 Implement Input.set_default_cursor_shape to change the default shape
Closes #18043
2018-04-10 11:38:34 -03:00
Rémi Verschelde cb996d7169
Merge pull request #18095 from robfram/fix-lineedit-17113
LineEdit placeholder alignment, content margins, and overflow bugs
2018-04-10 08:18:16 +02:00
Rémi Verschelde a360a9b348
Merge pull request #18091 from RandomShaper/icon-radio-item
Add support for radio-looking items with icon
2018-04-10 08:09:18 +02:00
Rémi Verschelde 7e2782e177
Merge pull request #17081 from endragor/no-press-when-scroll
Make Button not emit press when container is scrolled
2018-04-10 07:56:37 +02:00
Rémi Verschelde 866cb2805f
Merge pull request #17080 from simedis/pretty_print_tree
Made Node.print_tree() print prettily
2018-04-10 07:50:10 +02:00
robfram 53b51f68bf LineEdit placeholder alignment, content margins, and overflow bugs
LineEdit doesn't correctly uses style margins nor use placeholders
width correctly, causing multiple rendering bugs.
2018-04-09 23:57:23 +02:00
Rémi Verschelde 07e4556434
Merge pull request #18080 from Alexander-Alekseev/fix_rigidbody_config_warning
Fix of RigidBody's configuration warning for Z axis
2018-04-09 22:01:13 +02:00
Rémi Verschelde 24c2efc0f5
Merge pull request #16473 from ianb96/move_tab
Drag to Rearrange Editor Docks
2018-04-09 21:45:06 +02:00
Pedro J. Estébanez b964a9e678 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.
2018-04-09 19:55:54 +02:00
Rémi Verschelde 36552c2c90
Merge pull request #18040 from Paulb23/color_region_cache
Fixed colour regions and added local colour region cache
2018-04-09 16:05:26 +02:00
Ruslan Mustakov dcf5be92a3 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.
2018-04-09 20:34:52 +07:00
Geoffrey 8362ce4769 Made print_tree_pretty() function which displays scene tree graphically 2018-04-09 15:01:37 +02:00
Alexander Alekseev 6a5ed3a42b Fix RigidBody's configuration warning for Z axis 2018-04-09 09:28:31 +03:00
George Marques 0ee72fbd30
Merge pull request #18072 from AlexHolly/master
expose Tileset TileMode to GDScript
2018-04-08 21:44:07 -03:00
ianb96 9ac3c474b8 Drag to rearrange Tabs and TabContainer 2018-04-08 20:23:37 -04:00
Alexander Holland f18b74838c expose Tileset TileMode to GDScript 2018-04-08 22:54:02 +02:00
Juan Linietsky b756172bdb
Merge pull request #16705 from Chaosus/generate_normals_flip
Add flip switch to SurfaceTool.generate_normals
2018-04-08 17:18:03 -03:00
Juan Linietsky 217a95868a
Merge pull request #16707 from Web-eWorks/atlasfixes
Fix Sprite3D's incorrect behavior when using AtlasTextures.
2018-04-08 17:11:16 -03:00
Juan Linietsky 24cf58f917
Merge pull request #16574 from isaacremnant/better_grow_direction
Added GROW_DIRECTION_BOTH for controls
2018-04-08 16:42:16 -03:00
Juan Linietsky a6c9ccf007
Merge pull request #17150 from robfram/check-animation-playing-backwards
Added `get_playing_speed` method to AnimationPlayer, returning the actual playing speed of the animation being played
2018-04-08 11:36:15 -03:00
Juan Linietsky e9e5aa617e
Merge pull request #17227 from Faless/multiplayer_api
[RFC] MultiplayerAPI refactor
2018-04-08 11:04:16 -03:00
Juan Linietsky 4ee3f3251d
Merge pull request #17382 from bojidar-bg/13971-path-array-unsaved
Duplicate Arrays and Dictionaries when instancing scene in editor
2018-04-08 09:39:03 -03:00
Juan Linietsky 6eb0c74e9d
Merge pull request #17443 from Noshyaar/tilesetcrash
Fix converting to tileset crashes Godot if existing file is not tileset
2018-04-08 09:31:54 -03:00
Juan Linietsky 9e7cee2ceb Removed strange custom world2d in CanvasLayer, been there since always and not sure why.
Fixes #17524, fixes #17523.
2018-04-07 19:43:09 -03:00
Juan Linietsky 61d70fe47c Document condition to avoid mistakes (like #17690) 2018-04-07 17:04:12 -03:00
Juan Linietsky 14340efa3c
Merge pull request #17602 from ivodopiviz/tscn-issues
Removed unnecessary newlines from tscn
2018-04-07 16:59:12 -03:00
Juan Linietsky fdfbff3cef
Merge pull request #17642 from brendor/master
Particles 2D and 3D - fix hue variation not working
2018-04-07 16:55:10 -03:00
Juan Linietsky 187b14ae24
Merge pull request #17730 from RandomShaper/radio-buttons-in-menus
Radio buttons in menus
2018-04-07 16:41:39 -03:00
Juan Linietsky 51f689de3c
Merge pull request #17744 from robfram/fix-rtl-table
Fix `RichTextLabel` column size growing beyond its calculated `max_width`
2018-04-07 16:36:50 -03:00
Juan Linietsky 644ada1aac
Merge pull request #17752 from nikibobi/texture-progress-tint
Add tint property to TextureProgress
2018-04-07 16:35:49 -03:00
Juan Linietsky 7dedb22f0b
Merge pull request #17809 from RandomShaper/menu-item-on-release
Improve popup menus usability
2018-04-07 16:22:00 -03:00
Paulb23 b571a29df5 Fixed color regions and added local color region cache 2018-04-07 14:14:19 +01:00
Pedro J. Estébanez 259ed1d400 Improve popup menus usability
It seems that popups were intended to "grab" the mouse click that triggered them, but their intent was being lost. This commit does the necessary changes to let it happen and updates items that were trying to get advantage of it, because the semantics of `Control::grab_click_focus()` have changed a bit. Namely, it must be called **before** showing the modal.

This allows to popup a menu and activate an item in it in a single click-point-release cycle, instead of having to click once to open the menu and once more to pick an item.

This ability is extended even to context menus activated with the RMB (or any other mouse button, for that matter). The editor benefits from this in the context menu of the tree dock, which has been patched to opt-in for this feature.

This improves UX a bit by saving unnecessary clicks.

From now on, `PopupMenu` always grabs the click and also invalidates the first button release unless the mouse has moved (that's what `set_invalidate_click_until_motion()` was doing and now it's removed), so there is no longer the need of doing both things at every point a pop-up menu is shown.
2018-04-07 01:06:02 +02:00
Rémi Verschelde 5ede505f14
Merge pull request #17923 from Paulb23/add_abstract_syntax_highlighter
Abstracted the syntax highlighter from text edit.
2018-04-04 09:50:51 +02:00
Rémi Verschelde 60d89d0ab3
Merge pull request #17854 from BastiaanOlij/fix_vehicle_body
Improve side impulse calculation
2018-04-03 23:12:17 +02:00
Rémi Verschelde 7b1c661269
Merge pull request #17914 from Rubonnek/add-signal-to-videoplayer
Added signal to VideoPlayer to notify when the video finished playing
2018-04-03 22:06:47 +02:00
Gilles Roudiere 72ed1e4244 Remove the selection rect for nodes that do not require it 2018-04-03 22:04:19 +02:00
karroffel 4303fbca5a 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.
2018-04-03 16:43:50 +02:00
Rémi Verschelde a10be201de
Merge pull request #17902 from Noshyaar/outline
Mesh: fix crash when creating mesh outline from QuadMesh
2018-04-03 11:55:01 +02:00
Paulb23 f7c727e6c3 Abstracted the syntax highlighter from text edit 2018-04-02 12:41:44 +01:00
Wilson E. Alvarez 747c65272d
Added signal to VideoPlayer to notify when the video finished playing 2018-04-01 23:40:26 -04:00
bosak 90918ff5ab add tint for under, progress and over and tint group 2018-04-01 19:22:51 +03:00
Poommetee Ketson a492d22952 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.
2018-04-01 22:06:47 +07:00
Benedikt Bär 84d60b0829 Implement missing navgiation polygon debugging in tilemap 2018-03-30 17:28:53 +02:00
Bastiaan Olij a36e5951ff Improve side impulse calculation 2018-03-30 09:30:38 +11:00
Pedro J. Estébanez a6dc160d5c Use radio-button-like menu entries where applicable 2018-03-27 19:19:45 +02:00
Pedro J. Estébanez ab3b1d9f3e 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.
2018-03-27 19:19:45 +02:00
Ivan Vodopiviz e0f6b54b77 Removed unnecessary newlines from tscn
References #6025. Made small changes to avoid adding newlines for no reason.
2018-03-25 23:09:19 +02:00
robfram ef2b7b090c Fix RichTextLabel column size growing beyond its calculated max_width
When `RichTextLabel` calculated the actual width of columns, it let
them grow to sizes greater than its calculated `max_width`. Now this
PR ensures no columns grows beyond `max_width`, and the excess width
is distributed among the columns which can still grow.

It should fix #17731.
2018-03-24 18:09:35 +01:00
Poommetee Ketson ed3b080ca6 Fix converting to tileset crashes Godot if existing file is not tileset
also make TileSetEditorPlgn tile list updates the preview modulate
2018-03-23 21:27:30 +07:00
Rémi Verschelde 01bb39ac3f
Merge pull request #17321 from LinkDoyle/issue_16350
Fix switching WindowDialog types leaves garbage buttons
2018-03-23 11:38:59 +01:00
Rémi Verschelde f720d86b0b
Merge pull request #17555 from poke1024/add-worldenv-warning
Warn about WorldEnvironment being ignored
2018-03-23 11:27:03 +01:00
Rémi Verschelde 8cfca7726f
Merge pull request #17571 from kubecz3k/cam-disable
a way to ensure that camera is disabled
2018-03-23 11:08:44 +01:00
Rémi Verschelde 5f0ea4ddcf
Merge pull request #17612 from robfram/fix-richtextlabel-bbcode
Fix bad rendering of BBCode tables in `RichTextLabel`
2018-03-23 10:22:33 +01:00
bosak 1fa69c24a0 add tint property to TextureProgress changes progress color 2018-03-21 22:33:48 +02:00
brendor 7061c28df7
Particles 2D and 3D - fix hue variation not working by transposing the hue matrix
The hue variation matrix is hardcoded as transposed and thus the multiplication always yielded the original color value.
I wanted to keep the matrix and get the same result by switching the operands (getting a result as if the matrix was transposed).
2018-03-20 01:28:41 +01:00
Ruslan Mustakov 47747718d6 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.
2018-03-19 20:44:26 +07:00
Rémi Verschelde cc8f7c78af
Merge pull request #17618 from groud/fix_gridcontainer
Fixes wrong calculation of gridcontainer's children size
2018-03-19 10:12:20 +01:00
Gilles Roudiere 896e5a64d3 Fixes wrong calculation of gridcontainer's children size 2018-03-18 22:33:17 +01:00
robfram 5358befb41 Fix bad rendering of BBCode tables in RichTextLabel
Text overflowed canvas as tables didn't calculate correctly the width
of their columns. They used the whole table width available for each
column. Also, the `cell` parameter was wrongly parsed if used with its
optional argument (expand ratio).

This PR fixs the parsing of `cell` parameter (i.e. `cell=e`) and the
distribution of the full table width between columns, but it overrides
automatically the `expand` flag if the column is smaller than it could
be, to allow a better UX out-of-the-box. It keeps the `expand_ratio`
flag to let the user customize how every column grows in relation to
the rest.

Partially fix #6289.
2018-03-18 18:06:24 +01:00
Jakub Grzesik f78c7353ea a way to ensure that camera is disabled 2018-03-17 10:57:04 +01:00
Fabio Alessandrelli c531262190
Merge pull request #16947 from Faless/ui_actions
GUI elements ui_action usage, improvements
2018-03-16 20:55:11 +01:00
Bernhard Liebl 29d305599d Warn about WorldEnvironment being ignored 2018-03-16 11:21:57 +01:00
Rémi Verschelde f17c35b447
Merge pull request #17537 from Noshyaar/intcam
InterpolatedCamera: use internal_process
2018-03-16 08:10:37 +01:00
Poommetee Ketson 6b22ec5f6c InterpolatedCamera: use internal_process 2018-03-16 05:15:26 +07:00
Hein-Pieter van Braam 99f286e23f
Merge pull request #17264 from poke1024/fix-gesture-key-event-accepted
Fix gesture events being blocked
2018-03-15 23:13:04 +01:00
Hein-Pieter van Braam 64b336b367
Merge pull request #17293 from bncastle/basebutton_fix_pressed
Fix "ui_accept" action not calling _pressed() function in GDScript Button
2018-03-15 22:58:49 +01:00
Rémi Verschelde fe93459ef9
Merge pull request #17345 from AlexHolly/expose-itemlist-move-item
expose Itemlist.move_item and optimize functionality
2018-03-13 20:05:00 +01:00
Alexander Holland a3d2f59dbe expose itemlist.unselect_all() 2018-03-13 16:46:25 +01:00
Bojidar Marinov 9f6c0c6eae
Duplicate Arrays and Dictionaries when instancing scene in editor
Also, add deep (=false) parameter to Array.duplicate and Dictionary.duplicate

Fixes #13971
2018-03-13 17:18:08 +02:00
Alexander Holland 73146af740 expose Itemlist.move_item and optimize functionality 2018-03-13 15:19:43 +01:00
Rémi Verschelde c81356153e
Merge pull request #16971 from Noshyaar/tilemap
TileMap: add fix_invalid_tiles
2018-03-13 13:57:58 +01:00
Rémi Verschelde 96bda9c463
Merge pull request #17094 from Calinou/add-dynamicfont-hinting-options
Add an hinting mode setting to DynamicFonts
2018-03-13 13:38:35 +01:00
Rémi Verschelde 931f669b30
Merge pull request #17114 from poke1024/fix15719
Fix line thickness for CollisionPolygon2D.
2018-03-13 13:34:32 +01:00
Rémi Verschelde 88c1430613
Merge pull request #17314 from robfram/complete-path-15813
Fix bad autocomplete of partially written node paths when using syntactic sugar notation ($)
2018-03-13 12:16:51 +01:00
Rémi Verschelde 6d97fbdfc1
Merge pull request #17359 from AlexHolly/completion-edge-jump
Auto completion edge jump
2018-03-13 12:01:14 +01:00
Rémi Verschelde b49746f3cd
Merge pull request #17381 from poke1024/fix-anim-scrub
AnimationPlayer: fix scrubbing after play backwards
2018-03-13 11:51:30 +01:00
Rémi Verschelde 6e491ff283
Merge pull request #17383 from poke1024/colorpicker-tweaks
Better tab support for color picker
2018-03-13 11:42:51 +01:00
Rémi Verschelde ada1357dfd
Merge pull request #17422 from robfram/fix-radial-textureprogress
Implement line clipping for `TextureProgress` to avoid bad rendering
2018-03-13 11:25:49 +01:00
Rémi Verschelde b1c9a7c757
Merge pull request #17410 from groud/fix_grid_container
Fixes infinite loop in GridContainer
2018-03-13 10:34:31 +01:00
Rémi Verschelde c446231a6e
Merge pull request #17191 from garyo/fix_grid_cont
Fix infinite loop in GridContainer layout
2018-03-13 10:34:20 +01:00
Rémi Verschelde 7e246a0cb7
Merge pull request #17432 from ShyRed/tilemapupdate
Update TileMap when its TileSet changes
2018-03-13 09:30:38 +01:00
Bernhard Liebl 8277bf29a4 Various ui tweaks for color picker 2018-03-12 13:58:31 +01:00
ShyRed 67f4944a21 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.
2018-03-11 12:24:50 +01:00
Alexander Holland 11e40d3700 expose Itemlist.is_anything_selected 2018-03-11 03:01:16 +01:00
robfram 7991bd168d 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.
2018-03-10 20:51:42 +01:00
Gary Oberbrunner 561e57df13 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.
2018-03-10 14:38:35 -05:00
ShyRed a23c0877f1 Update Sprite when Texture changes
Make Sprite monitor its Texture for changes and trigger an update when the sprite changes.
2018-03-10 17:23:29 +01:00
Gilles Roudiere 44cb8eb3a2 Fixes infinite loop in GridContainer 2018-03-10 14:01:20 +01:00
Bernhard Liebl b553b38e7b AnimationPlayer: fix scrubbing after play backwards 2018-03-09 19:41:14 +01:00
Alexander Holland e36dd4282b auto-completion edge jump
arrow up/down jumps to end/start on edges
2018-03-09 17:31:07 +01:00
Rémi Verschelde 079b919b41
Merge pull request #17341 from poke1024/fix16461
Fix unselectable flipped sprites (fixes 16461)
2018-03-08 08:40:49 +01:00
Rémi Verschelde 0b600fde3f
Merge pull request #17189 from CodeAndWeb/master
Fixes Selection of Sprites using AtlasTexture
2018-03-08 08:37:22 +01:00
poke1024 bd2e1df216 Fix unselectable flipped sprites (fixes 16461) 2018-03-07 18:58:45 +01:00
Leon Krause 38623e07ac Prevent division by zero in GridContainer 2018-03-07 17:36:28 +01:00
Link 611c050469 Fix switching WindowDialog types leaves garbage buttons
We can distinguish between node-specific children and custom children by `child->is_owned_by_parent()`.

Fixes: #16350
2018-03-07 18:28:29 +08:00