Commit graph

1537 commits

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