Commit graph

1637 commits

Author SHA1 Message Date
Pedro J. Estébanez
c1630f0e60 Fix Node::move_child() crash if moving to the end plus one
(cherry picked from commit 6c1b7fd899)
2017-07-25 05:21:58 +02:00
alexholly
0cc1ba947f removed floor so that global pos works with scale
(cherry picked from commit 3b5ac579a9)
2017-07-14 22:10:41 +02:00
TwistedTwigleg
41b8a28c5f Added additional functions to RichTextLabel:
* Added set_text function to RichTextLabel
* Added percent_visible attributes and functions to RichTextLabel
This should make switching from Label to RichTextLabel easier.

(cherry picked from commit d649140b9b)
2017-07-14 22:09:42 +02:00
TwistedTwigleg
1fa70cf9b6 Fixed set_global_scale in Node2D.
(cherry picked from commit a6feb0943a)
2017-07-14 21:58:54 +02:00
Pedro J. Estébanez
73fb33a931 Remove warnings about benign situations 2017-07-10 16:28:50 +02:00
Rémi Verschelde
4f220a6552 Merge pull request #9505 from Keetz/particle-attractor-binding
Added missing binding to _owner_exited
2017-07-05 16:26:22 +02:00
Rasmus Ketelsen
b54c5f3953 Added missing binding to _owner_exited 2017-07-05 11:39:46 +02:00
volzhs
7ca40c3eb9 Fix visibility changes for Spatial 2017-07-03 00:02:36 +09:00
Poommetee Ketson
4a0dc529ce BuildSystem: generated files have .gen.ext 2017-06-25 20:31:56 +07:00
Rémi Verschelde
8d6445b8f3 Merge pull request #7946 from RandomShaper/fix-vis-notifier-2d-2.1
Fix VisibilityNotifier2D viewport offset issue (2.1)
2017-06-25 11:21:43 +02:00
Rémi Verschelde
c5a44eebf5 Merge pull request #8558 from RandomShaper/tilemap-one-way-collision-2.1
Add one-way collision to tile-set/tile-map (2.1)
2017-06-25 11:19:54 +02:00
Rémi Verschelde
148a9e384b Merge pull request #8999 from RandomShaper/fix-physics-2.1
Fix multiple 2D & 3D physics issues (2.1)
2017-06-25 11:12:37 +02:00
geequlim
82224d0b80 Add type statements for RichTextLabel 2017-06-24 14:10:44 +08:00
Thomas Herzog
2bd3792d6a Merge pull request #8434 from hikari-no-yume/Sprite3D_double_sided_flag
Add double-sided flag to SpriteBase3D (fixes #8007)
2017-06-19 23:47:33 +02:00
Pedro J. Estébanez
3e5e8b6c9e Fix multiple issues with 2D & 3D physics
- Use `NOTIFICATION_ENTER`/`EXIT_WORLD` for `Area` (intead of `*_TREE`).
- Now both bodies' and areas' constraints are cleaned up.
- And now also that happens as soon as the space is set to null (i.e., when exiting the tree) instead of only at freeing time.
- When clearing constraints, the loop goes on to the next if the current is already released, instead of breaking.
- When one has been already released, no error is shown from now on, as it's something expected, since a pair (our kind of constraint of interest) can be freed by any of its involved collision objects and the other will try again.
- Implement index shifting (or marking as -1) for shapes indices in collision pairs shapes are removed.
- Standarize behavior of bodies and areas so that anything that invalidates a given pair gives the same result (collision mask, actual collision, etc); for instance, triggering area enter/exit signals.
- Add missing member initializations.
- Extend the new-space-equals-area/body-current-space test to every case.
- Fix 3D ray-casts early accepting Areas (skipping the mask check).
- Fix unpairing of large elements (2D's `BroadPhase2DHashGrid`).

Some of these prevent random crashes caused by constraints with dangling pointers to involved objects.
Fixes #8856.
Fixes #7589.
Fixes #6676.
And maybe others.
2017-06-19 12:02:50 +02:00
Pedro J. Estébanez
2018db093c Add one-way collision to tile-set/tile-map 2017-06-17 22:26:50 +02:00
Hugo Locurcio
db2cb08057 Increase the default perspective camera FOV
This does not affect existing projects, but will affect newly-created
editor settings and Camera nodes.

(cherry picked from commit cdcc3c919b)
2017-06-17 12:31:27 +02:00
Poommetee Ketson
0aa6b4aac7 Fix autoplay animation starts from last editor state #8976
(cherry picked from commit c7ac90c97f)
2017-06-17 12:00:23 +02:00
Pedro J. Estébanez
693ebbb807 Fix/improve TouchScreenButton
- Refactor touch acceptance logic so the same is used whether passby is enabled or not.
- Remove the check for visibility during input handling as it should never fail; instead using now an ERR_FAIL_COND() just in case since we have been checking for that so far.

Fixes #9159.
2017-06-14 17:13:58 +02:00
Rémi Verschelde
7c3b3e0a80 Revert "Fix text warp in color blocks with CJK"
This reverts commit b93fce1c18.

That commit introduced regressions for non-CJK languages are discussed
in #8952. Fixes #9078.
2017-06-07 07:40:06 +02:00
Rémi Verschelde
6fb97d9898 Merge pull request #8952 from GodotExplorer/pr-fix-richtextlabel-warp-CJK
[2.1] Fix text warp in color blocks with CJK
2017-05-27 11:34:31 +02:00
Rémi Verschelde
7b286b06da Merge pull request #8919 from pixelpicosean/fix-item-list-scroll
[2.1] Fix item list scroll speed
2017-05-27 11:20:47 +02:00
Rémi Verschelde
680b905ae4 Merge pull request #8918 from GodotExplorer/pr-expose-texturebutton-resize-model-consts
Expose texturebutton resize model constants
2017-05-27 11:19:24 +02:00
Geequlim
cd778e00dc Fix text warp in color blocks with CJK 2017-05-27 14:07:18 +08:00
Ferenc Arn
c2c1d2076c GDScript bindings for various missing Mesh functions.
Fixes #8041.

(cherry picked from commit f2a335d0c1)
2017-05-27 00:42:59 +02:00
yanorax
06ca73c6f8 Add column_title_pressed signal to Tree node
The Tree node column/table form is missing the ability to
capture column title clicks easily.

Adding this functionality will give us the ability to
create functions such as sort by column, which is a common
table manipulation ability in games/apps.

https://godotengine.org/qa/7699
(cherry picked from commit 7b00ad22b9)
2017-05-27 00:42:58 +02:00
AlexHoratio
3cd1185b25 Fixed #8526, popup menu width now responds to submenu icon
(cherry picked from commit 69359f2220)
2017-05-27 00:42:58 +02:00
Poommetee Ketson
85e6a38c0b RayCast2D: fix detached arrow tip
(cherry picked from commit 64879e592b)
2017-05-26 23:54:34 +02:00
Andreas Haas
4a1c9de869 Tree: Clear search string on selection.
The Tree node has the ability to jump to a specific item by typing the first few chars of it's name.
But on selection ('item_activated' signal), it didn't clear the search string used for that. It was especially annoying in `FileDialog`s and has been bugging me for
ages :P

With this, you can traverse a directory structure in a FileDiag quickly with the keyboard (like you'd expect from pretty much any modern file browser) :)

(cherry picked from commit def41b9856)
2017-05-26 23:45:11 +02:00
Poommetee Ketson
e06fa5a089 LineEdit: fix placeholder text affected by secret
(cherry picked from commit e64c473bc9)
2017-05-26 23:44:24 +02:00
Rémi Verschelde
6cf507f004 Move other lone thirdparty files to thirdparty/misc
Also move Box2D ConvexDecomposition contrib code to
thirdparty/b2d_convexdecomp.

(cherry picked from commit d4029aa51a)
2017-05-26 23:39:47 +02:00
Rémi Verschelde
8312d421c6 Move core thirdparty files to thirdparty/{minizip,misc}
(cherry picked from commit 2398eb6ed4)
2017-05-26 23:29:26 +02:00
Rémi Verschelde
e43e7a414a Fix theme_data.h formatting via make_header.py
Should make clang-format happy.

(cherry picked from commit 5f15f03d38)
2017-05-26 19:11:43 +02:00
Andreas Haas
66a1e049b0 Tree: Ability to add tooltips to TreeItem buttons.
Adds a tooltip parameter to `TreeItem::add_button()` and set a few tooltips in the Project settings and SceneTree dock.

(cherry picked from commit 29999942a2)
2017-05-26 19:05:09 +02:00
Sean Bohan
064dce7a4c Fix item list scroll speed.
Remove the extra `set_val` action after the proper one, so the right scroll value won’t get overrided any more.
2017-05-26 17:25:44 +08:00
Geequlim
166d4cb40c Expose constants of TextureButton 2017-05-26 17:07:38 +08:00
Zireael07
307c5c1afc GDScript can now tell if the wheel is in contact with the ground; change roll influence of the wheel in editor 2017-05-19 11:50:23 +02:00
Rémi Verschelde
21bf3778d5 Merge pull request #8776 from RandomShaper/fix-sample-priority-2.1
Fix priority in sample players (2.1)
2017-05-16 08:12:52 +02:00
Pedro J. Estébanez
40e7f1c3d5 Fix priority in sample players 2017-05-15 20:24:38 +02:00
Rémi Verschelde
aa046a85dc Merge pull request #8740 from pixelpicosean/scrollingWithFactor
Implemented scrolling factor for precision trackpads for 2.1
2017-05-15 07:57:05 +02:00
Rémi Verschelde
caeee17846 Merge pull request #8734 from Faless/various_2.1_cherries
Various 2.1 cherry picks
2017-05-15 07:55:27 +02:00
Sean Bohan
ee670f3724 Implemented scrolling factor for smooth trackpad scrolling
Working platforms platform: OSX, Windows.
Support for almost all ui elements, including project list.

Ported from 304a1f5b5a (#7864).
Fixes #492 and #3913.
2017-05-15 06:44:00 +08:00
Fabio Alessandrelli
56e23624bf Fix bug in pause mode propagation
Pause mode was not correctly propagating effectively stopping
immediately when the mode was not PAUSE_MODE_INHERIT.

(cherry picked from commit a5ce7a98cb)
2017-05-12 20:01:53 +02:00
Rémi Verschelde
e7328fe5a0 Fix return statement in CanvasItem::get_global_transform_with_canvas
Thanks to @susnux for the report and patch in #5446.
2017-05-12 19:54:54 +02:00
Fabio Alessandrelli
2665460390 Fix bug with viewport not correctly setting audio listener 2d 2017-05-05 15:21:42 +02:00
Andrea Faulds
aa66530010 Add double-sided flag to SpriteBase3D (fixes #8007) 2017-05-02 15:48:16 +01:00
volzhs
edefaa768b Fix auto_accept_quit option to work
auto_accept_quit value is set first properly with GLOBAL_DEF("application/auto_accept_quit", true) in main.cpp
after that it's reset to true in SceneTree:init() whatever value was.
2017-04-25 19:54:08 +09:00
Rémi Verschelde
6aaec01e99 Merge pull request #8272 from MattUV/2.1
Add methods to get and set bits of collision layers and masks for TileMaps (2.1)
2017-04-24 11:13:33 +02:00
Andreas Haas
0ffa923bca Merge pull request #8369 from volzhs/fix-stylebox-2.1
Fix editor style box for ToolButton (2.1)
2017-04-14 17:51:22 +02:00
volzhs
4a0aac4fb3 Fix editor style box for ToolButton 2017-04-12 12:20:51 +09:00
Rémi Verschelde
d8ae244d51 Revert "Respect style boxes for Button states other than "normal""
This reverts commit 98f01f9143.
This made icons in the editor "jumpy" on hover.
2017-04-11 19:45:39 +02:00
MattUV
de96024453 Add set/get_collision_layer/mask_bit() to TileMaps
Add four methods to the TileMap node to make collision layers and masks be modified bit by bit (like PhysicBody2Ds and RayCast2Ds):

 * set_collision_layer_bit()
 * set_collision_mask_bit()

 * get_collision_layer_bit()
 * get_collision_mask_bit()
2017-04-11 19:38:14 +02:00
Rémi Verschelde
3b687c5474 Move VERSION_MKSTRING logic to version.h
Fixes a bug where the VERSION_PATCH define is not yet in scope if
typedefs.h is included before version.h at compilation time.
2017-04-10 23:08:28 +02:00
Rémi Verschelde
b46d7f986d Merge pull request #8320 from RandomShaper/zero-preprocess-particles2d-2.1
Allow a preprocess time of 0 for Particles2D (2.1)
2017-04-09 17:44:23 +02:00
Andreas Haas
9b6b713d61
Particles2D: Fix flip property (again).
should have flipped the dst_rect..
2017-04-09 01:16:48 +02:00
Rémi Verschelde
c9eb0f5f45 Merge pull request #8317 from RandomShaper/fix-area-monitoring-2.1
Fix side effects of the bookkepping of Area/Area2D's monitoring (2.1)
2017-04-08 22:47:44 +02:00
Pedro J. Estébanez
86966940ff Allow a preprocess time of 0 for Particles2D 2017-04-08 20:00:24 +02:00
Pedro J. Estébanez
c3c0cfd207 Fix side effects of the bookkepping of Area/Area2D's monitoring
- Fix monitoring flag being reset when the scene is out of the tree (happens on save all if the current scene is not the focused one, therefore on save-on-run as well)
- Fix the inability to reset the monitoring flag while the area is out of the tree
2017-04-08 13:24:29 +02:00
Rémi Verschelde
e9b045d9e5 Add "Godot Engine contributors" copyright line 2017-04-08 00:45:24 +02:00
Rémi Verschelde
63ddee793e Merge pull request #8307 from RandomShaper/optimize-out-debug-n-non-tools-2.1
Optimize-out some debug and/or non-tools methods (2.1)
2017-04-07 22:22:43 +02:00
Rémi Verschelde
990e8e00c7 Merge pull request #8303 from RandomShaper/reset-folded-on-reset-edit-children-2.1
Reset display folded for an instanced scene if editable children is toggled off (2.1)
2017-04-07 19:10:03 +02:00
Pedro J. Estébanez
1b15c53479 Optimize-out some debug and/or non-tools methods
Collisions and nav debug are conditionally compiled depending on DEBUG_ENABLED
is_editor_hint() and is_node_being_edited() are compiled only with TOOLS_ENABLED
Every affected method is implemented in the header in case its macro is not present (the getters just returning false and the setters having an empty body) so the compiler can inline and finally no-op-out them as likely as possible.
is_node_being_edited() already showed a similar optimization effort and has been adapted to this change.
Furthermore, and as a consequence, -debugcol and -debugnav will not work on non-debug (strict release) builds.
This can bring a little bit of runtime performance on release and non-tooled builds (less code, so less cycles to spend and maybe more cache friendly).
2017-04-07 16:34:15 +02:00
Pedro J. Estébanez
4087e61900 Reset display folded for an instanced scene if editable children is toggled off
This avoids the display folded flag needlessly getting into the scene file (potentially forever) and also gives more visual feedback if the user re-enables editable children so it will display unfolded at first.
2017-04-07 15:46:13 +02:00
Pedro J. Estébanez
9f8f8efa67 Add priority to samples in a library 2017-04-06 23:59:49 +02:00
Rémi Verschelde
9a9bd12913 Fixer looping timer accumulation in _process
Follow-up to #8251.

(cherry picked from commit 5b5a825c7f)
2017-04-05 08:24:15 +02:00
Nikhil Shagrithaya
323041a476 previous value of time_left is added to wait_time before assigning to time_left
(cherry picked from commit ea4fbee8f2)
2017-04-05 08:23:34 +02:00
Andreas Haas
1620f46f03 Viewport: Fix undefined behaviour found by llvm sanitizer.
When godot was running as the project manager, it tried to call a method on a null pointer (get_tree()->get_edited_scene_root()).
This is undefined behaviour and caused a crash when compiled with sanitizing enabled.

(cherry picked from commit 1d3c9c448d)
2017-04-05 08:18:59 +02:00
Fabian Mathews
1a1e25bfca Added ability to change A-star cost function
(cherry picked from commit b541402417)
2017-04-05 08:18:38 +02:00
Saggi Mizrahi
89b201b466 Add the option to check if input was handled
When working with a viewport you should call Viewport.input() to pass
the input, but if the input was unhandled you might also want to call
Viewport.unhandled_input() so that objects in the sub-scene can handle
the event. This adds a way to check if the input was handled so that you
know whether you should call Viewport.unhandled_input() or not.

Signed-off-by: Saggi Mizrahi <saggi@mizrahi.cc>
(cherry picked from commit 245ace6e2e)
2017-04-05 08:15:15 +02:00
Rémi Verschelde
e10e732bf0 Merge pull request #8242 from volzhs/area-monitoring
Fix monitoring status of Area2D and doing same logic on Area too
2017-04-04 23:04:20 +02:00
volzhs
6222821535 Apply same logic to Area with Area2D
comes from 5b556ca and 73f53a7
2017-04-04 10:37:45 +09:00
Pedro J. Estébanez
7d642e218e Improve TouchScreenButton
Fix shape not being updated
Add a way to hide the shape on editor and debug-with-visible-shapes
Remove useless checks
2017-04-03 14:38:01 +02:00
volzhs
73f53a7918 Fix monitoring status of Area2D 2017-04-03 21:00:38 +09:00
Shin-NiL
ca96d7940e Honor the Tween's final values 2017-03-29 19:35:51 -03:00
Fabio Alessandrelli
d9525082fe Remove set_ip_type from network classes (no longer needed)
- TCP:
  - `listen` bind to wildcard "*" -> dual stack socket
  - `listen` bind to address -> socket from address type
  - `connect` -> resolve using best protocol (UNSPEC), socket from address type

- UDP:
  - `listen` bind to wildcard "*" -> dual stack socket
  - `listen` bind to address -> socket from address type
  - `put_packet`/`put_var` -> resolve using TYPE_ANY (UNSPEC), socket from address type
    (to change socket type you must first call `close` it)

(cherry picked from commit 88a56ba783)
2017-03-22 21:00:23 +01:00
Pedro J. Estébanez
4a93b6b172 Fix VisibilityNotifier2D double application of viewport offset 2017-03-20 20:01:35 +01:00
Rémi Verschelde
9c75b9dddf Merge pull request #8091 from RandomShaper/fix-particles-2d-2.1
Fix Particles2D process mode back-compat issue (2.1)
2017-03-20 19:49:58 +01:00
Pedro J. Estébanez
98ba3db502 Fix Particles2D process mode back-compat issue 2017-03-20 19:47:25 +01:00
CrazyGuy108
10119f7b04 List Control::has_point as a virtual method
According to Issue #8018, a BIND_VMETHOD macro wasn't present in scene/gui/control.cpp, while it was declared to be a virtual method in scene/gui/control.h.

classes.xml was updated to also list this method in Control.

(cherry picked from commit 9589936d6e)
2017-03-19 00:42:34 +01:00
AlexHolly
cf7ba8e390 fix remove_and_skip()
(cherry picked from commit 3f78f1f17d)
2017-03-19 00:38:36 +01:00
Ignacio Etcheverry
94653f0e88 Fix connection errors when replacing node
- Avoid connecting the signals to nonexistent methods
- Preserve only persistent connections

(cherry picked from commit d210ac66ef)
2017-03-19 00:38:30 +01:00
Rémi Verschelde
f8db8a3faa Bring that Whole New World to the Old Continent too
Applies the clang-format style to the 2.1 branch as done for master in
5dbf1809c6.
2017-03-19 00:36:26 +01:00
Rémi Verschelde
1b0e2b0c39 Refactoring: rename tools/editor/ to editor/
The other subfolders of tools/ had already been moved to either
editor/, misc/ or thirdparty/, so the hiding the editor code that
deep was no longer meaningful.

(Manual redo of 49c065d29c)
2017-03-18 23:45:45 +01:00
Rémi Verschelde
dbf0137576 Style: Fix statements ending with ';;'
(cherry picked from commit f44ee891be)
2017-03-18 21:14:33 +01:00
Rémi Verschelde
4bfecab813 Style: No break before list brace
clang-format does not handle that well *at all*.

For the reference, found the relevant pieces of code with:
`ag "=[ "$'\t'"]?"$'\n'"[ "$'\t'"]?{" --ignore=thirdparty`

(cherry picked from commit 40323407df)
2017-03-18 21:05:58 +01:00
volzhs
5ac097a035 Fix wrong TreeItem reference after reconstructing
(cherry picked from commit 66b7586fb0)
2017-03-18 20:21:05 +01:00
volzhs
db6d9cdc22 Fix crash when click icon while editing node name
(cherry picked from commit 3ae0ffa182)
2017-03-18 20:17:13 +01:00
Andreas Haas
96e0fd5570 Tween: Fix undefined behavior found by static code analyzer.
Adresses the issue mentioned in https://software.intel.com/en-us/articles/the-ultimate-question-of-programming-refactoring-and-everything

(cherry picked from commit 0157969ccc)
2017-03-18 20:16:40 +01:00
Bojidar Marinov
ecb4d41d20 Add Rect2 TileMap::get_used_rect(), closes #4390
(cherry picked from commit 136e1e18ba)
2017-03-18 20:16:14 +01:00
Vincent
02d711eb61 RichTextLabel add function remove_line
(cherry picked from commit c20b186e73)
2017-03-18 20:11:42 +01:00
Andreas Haas
674a090e59 Spinbox: don't ignore double clicks.
Fixes the problem with spinboxes not updating when clicking too fast.

(cherry picked from commit dd4c2709e4)
2017-03-18 20:09:55 +01:00
Andreas Haas
fb2173174d Particles2D: implement texture flip parameters.
(cherry picked from commit 6a2dccaf77)
2017-03-18 20:06:11 +01:00
kbake
31260bb720 Selected text is now deselected on ctrl+home/end
This fixes Issue #7694 and also the error mentioned in the comments of that issue.

(cherry picked from commit 1169f4e040)
2017-03-18 19:58:13 +01:00
Andreas Haas
1eb9925f58 CollisionShape2D: Fix warning icon not updating.
`CollisionPolygon2D` also had this problem.

(cherry picked from commit 16eee2f59b)
2017-03-18 19:32:02 +01:00
Ray Koopa
98f01f9143 Respect style boxes for Button states other than "normal"
(cherry picked from commit 2baeb531e6)
2017-03-18 19:31:43 +01:00
Rémi Verschelde
b5be9d6115 Merge pull request #8038 from RandomShaper/remove-warning-2.1
Remove warning on owner re-assignment (2.1)
2017-03-18 10:49:35 +01:00
Pedro J. Estébanez
7b27cc91b1 Remove warning on owner re-assignment 2017-03-15 12:28:38 +01:00
Pedro J. Estébanez
148566b31b Fix redundant connections saved in sub-inheritance 2017-03-15 11:48:24 +01:00
Rémi Verschelde
ce09a094ab Merge pull request #7987 from RandomShaper/fix-touch-button-2.1
Several fixes for TouchScreenButton (2.1)
2017-03-13 11:02:50 +01:00
Rémi Verschelde
3c566fc552 Merge pull request #7978 from RandomShaper/fix-sub-inheritance-2.1
Fix node duplication in scene sub-inheritance (2.1)
2017-03-13 11:00:59 +01:00