Commit Graph

1548 Commits

Author SHA1 Message Date
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
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
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