Commit graph

1963 commits

Author SHA1 Message Date
Rémi Verschelde 67389d4db7 Merge pull request #8844 from Hinsbart/audioplayer-crash
Fix crash when saving AudioPlayer without stream.
2017-05-20 07:34:59 +02:00
Rémi Verschelde 231511b2a6 Merge pull request #8631 from volzhs/editor-theme-custom
New customizable editor theme
2017-05-20 07:16:11 +02:00
Andreas Haas 02aa1dd600
Fix crash when saving AudioPlayer without stream.
Guards against calling this setter with invalid input.
2017-05-20 03:49:54 +02:00
Ferenc Arn f2a335d0c1 GDScript bindings for various missing Mesh functions.
Fixes #8041.
2017-05-18 16:29:17 -05:00
Rémi Verschelde a75623f436 Merge pull request #8796 from yanorax/treecolumn_title_pressed
Add column_title_pressed signal to Tree node
2017-05-18 19:06:25 +02:00
yanorax 7b00ad22b9 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
2017-05-18 13:12:27 +10:00
Rémi Verschelde c3baf5eb3c Fix two typos from previous commit
Also cleanup comments on variant types.
2017-05-17 18:45:56 +02:00
Juan Linietsky 98a3296702 Removal of Image from Variant, converted to a Resource. 2017-05-17 07:37:45 -03:00
Rémi Verschelde d801ff2b3d Merge pull request #8778 from honix/master
Particles potential crash fix 2
2017-05-16 16:34:37 +02:00
honix 73385e362b Particles potential crash fix 2 2017-05-16 16:24:33 +03:00
Rémi Verschelde 27dd415196 Merge pull request #8759 from AlexHoratio/master
Fixed #8526, popup menu width now responds to submenu icon
2017-05-15 08:00:50 +02:00
AlexHoratio 69359f2220 Fixed #8526, popup menu width now responds to submenu icon 2017-05-14 18:55:55 +01:00
Damian Day f2564ca97f Fix natural sorting order in EditorFileDialog, FileDialog and EditorFileSystemDirectory
Make EditorFileDialog, FileDialog and EditorFileSystemDirectory alphanumerical sorting more natural

Added a new method 'naturalnocasecmp_to' and comparator 'NaturalNoCaseComparator' to String.

Fixes #8712.
2017-05-12 13:02:25 +01:00
volzhs bb81293047 New customizable editor theme 2017-05-09 17:46:54 +09:00
Poommetee Ketson 64879e592b RayCast2D: fix detached arrow tip 2017-05-08 16:12:40 +07:00
toger5 304a1f5b5a Implemented scrolling factor for smooth trackpad scrolling
Working platforms platform: OSX, Windows.
Support for almost all ui elements, including project list.
2017-05-07 14:23:56 +02:00
Fabio Alessandrelli a5ce7a98cb Fix bug in pause mode propagation
Pause mode was not correctly propagating effectively stopping
immediately when the mode was not PAUSE_MODE_INHERIT.
2017-05-06 02:37:17 +02:00
Andreas Haas def41b9856
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) :)
2017-05-04 22:08:09 +02:00
Poommetee Ketson e64c473bc9 LineEdit: fix placeholder text affected by secret 2017-05-03 19:23:36 +07:00
volzhs 17e8e343fb Revert "Add new editor and default theme (WIP)"
This reverts commit f045efe007.
2017-05-03 06:19:15 +09:00
Marc Gilleron d78efddbf5 Fix #8617 WindowDialog with custom panel background crashes godot 2017-05-02 02:18:50 +02:00
Rémi Verschelde d4029aa51a Move other lone thirdparty files to thirdparty/misc
Also move Box2D ConvexDecomposition contrib code to
thirdparty/b2d_convexdecomp.
2017-04-28 21:19:25 +02:00
Rémi Verschelde 2398eb6ed4 Move core thirdparty files to thirdparty/{minizip,misc} 2017-04-28 21:19:23 +02:00
Rémi Verschelde 5f15f03d38 Fix theme_data.h formatting via make_header.py
Should make clang-format happy.
2017-04-27 08:58:11 +02:00
Rémi Verschelde 2feb24953c Merge pull request #8520 from Hinsbart/tree_tooltips
Tree: Ability to add tooltips to TreeItem buttons.
2017-04-27 08:10:11 +02:00
Daniel J. Ramirez f045efe007 Add new editor and default theme (WIP) 2017-04-27 08:04:57 +02:00
Andreas Haas 29999942a2
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.
2017-04-26 19:14:35 +02:00
Ramesh Ravone cc973b461b Revert " 3.0 recompute_aabb on add_surface" 2017-04-26 13:18:01 +05:30
Rémi Verschelde ffbe6660cf Merge pull request #8538 from RameshRavone/patch-7
3.0 recompute_aabb on add_surface
2017-04-26 08:57:10 +02:00
Ramesh Ravone 930ad8fc8c
3.0 recompute_aabb on add_surface 2017-04-26 07:57:13 +05:30
volzhs de4267fc99 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 20:05:22 +09:00
Rémi Verschelde b6e0eaf3ca Merge pull request #8509 from nunodonato/fixspatialmaterial
Fixed #8102, by renaming FixedSpatialMaterial to SpatialMaterial
2017-04-24 12:05:43 +02:00
Rémi Verschelde 8032dd18dd Merge pull request #8408 from 20kdc/bugfix-kine-mas
Apply is_ceiling/is_wall swap fix to 2D move_and_slide
2017-04-24 11:25:08 +02:00
Nuno Donato c1e771dfe9 Fixed #8102, by renaming FixedSpatialMaterial to SpatialMaterial 2017-04-24 10:20:32 +01:00
Rémi Verschelde 05d35bb156 Merge pull request #8395 from 20kdc/master
Ported move_and_slide to KinematicBody (3D)
2017-04-24 11:20:10 +02:00
Rémi Verschelde 5939a9b8e8 Merge pull request #8343 from volzhs/prevent_uncheck
Prevent to uncheck selected item with button group
2017-04-24 11:19:14 +02:00
Rémi Verschelde 5ae1e172da Merge pull request #8277 from tagcup/math_checks
Added various functions basic math classes. Also enabled math checks …
2017-04-24 11:16:20 +02:00
Rémi Verschelde 90ef1fd03d Merge pull request #8102 from bd339/iss3172
Show 3D raycasts when debugging collisions
2017-04-24 11:11:04 +02:00
Rémi Verschelde 515f92d03b Fix property warnings and hide some debug prints
"ALL IS GOOD" was a lie.

In particular, removes verbose "path not recognized" false positive.

The actual logic is to (somewhat naively) check all ResourceFormatLoaders
and to pick the first good match, so no need to warn about the formats
that do not match the type hint.
2017-04-23 11:17:32 +02:00
20kdc e2df5d661d Ported/fixed move_and_slide to KinematicBody (3D+floor/ceiling args)
This version of the commit has the on_ceiling/on_wall fix without any
 explaination of that code, since apparently it wasn't complicated enough.

As for the notes at the top of the function, they're still there.

move_and_slide is rather useful for character-controllers, etc.
It reduces the amount of boilerplate code.
Not having move_and_slide makes the APIs somewhat inconsistent.

(It might be nice to figure out a way to share the code between the two
move_and_slide implementations, but that's for someone who knows what
the policy is on shared code like that.)
2017-04-21 21:19:41 +01:00
Rémi Verschelde 99529fb80d 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.

(cherry picked from commit 3b687c5474)
2017-04-20 12:14:34 +02:00
Rémi Verschelde 22b9c0207b Merge pull request #8417 from neikeq/hello-there
External editor improvements and fixes
2017-04-20 02:20:04 +02:00
Rémi Verschelde c88f56be64 Merge pull request #8376 from RayKoopa/fix_stylebox_expand_margin
Respect the expand margin for StyleBoxTextures again.
2017-04-20 02:10:55 +02:00
Paulb23 84bca4e72f Added support for space indentation 2017-04-18 12:30:46 +01:00
Ignacio Etcheverry 4b8568006d External editor improvements and fixes
Notable changes:

- Now ScriptLanguages have the option to override the global external editor setting.
If `ScriptLanguage::open_in_external_editor()` returns `ERR_UNAVAILABLE` (which it does by default), then the global external editor option will be used.
- Added formatting to the external editor execution arguments. Now it's possible to write something like this: `{project} -g {file}:{line}:{col}`.
- `VisualScript::get_member_line()` now can return the line of functions (well, it returns the id of the _Function_ node of the function). I guess there is nothing else we can get a "line" from.

Fixes:

- Fixes a bug where `ScriptEditor::script_goto_method()` would not work if the script is not already open in the built-in editor.
- Fixes wrong DEFVAL for `cursor_set_column` and `cursor_set_line` in TextEdit.
- `Script::get_member_line()` now returns -1 ("found nothing") by default.
2017-04-17 01:51:30 +02:00
gamemanj 0a4dde93d4 Apply is_ceiling/is_wall swap fix to 2D move_and_slide (minus explaination)
As it turns out, is_ceiling would be true when hitting a wall,
 and is_wall would be true momentarily when hitting a ceiling.

This makes a tiny one-line change to fix that.
Without trying to explain the code for anyone else having to
 mess around with it.
2017-04-15 10:24:36 +01:00
Andreas Haas 1a8f94edd4 Merge pull request #8370 from volzhs/fix-stylebox-master
Fix editor style box for ToolButton
2017-04-14 17:51:30 +02:00
Andreas Haas a96e795241 Merge pull request #8402 from neikeq/pr-fix-binds
PackedScene: Fix wrong DEFVAL
2017-04-14 03:14:01 +02:00
Ignacio Etcheverry 30835f9d37 PackedScene: Fix wrong DEFVAL 2017-04-14 02:18:38 +02:00
Ray Koopa 75f684bc17 Respect the expand margin for StyleBoTextures again. 2017-04-13 10:37:22 +02:00
volzhs 25a4daa5ce Fix editor style box for ToolButton 2017-04-12 12:40:16 +09:00
Sergey Pusnei 8589ca3903 Rename [gs]et_pos to [gs]et_position for Controls
Control set_pos -> set_position
Control set_global_pos -> set_global_position
[gs]et_mouse_pos -> [gs]et_mouse_position
[gs]et_global_mouse_pos -> [gs]et_global_mouse_position
fixes #8005
2017-04-10 08:27:34 +02:00
volzhs 706ca4efd6 Prevent to uncheck selected item with button group 2017-04-10 13:57:24 +09:00
Juan Linietsky 1c480698ce -Fixed crash with splash screen on windows
-properly show editor without having to resize window on windows
2017-04-09 20:40:48 -03:00
Rémi Verschelde d596946a45 Merge pull request #8271 from MattUV/master
Add methods to get and set bits of collision layers and masks for TileMaps (3.0)
2017-04-09 23:37:56 +02:00
Rémi Verschelde 769bec26a7 Merge pull request #8321 from RandomShaper/zero-preprocess-particles2d
Allow zero preprocess time for Particles2D
2017-04-09 17:44:40 +02:00
Juan Linietsky 4286aef693 Particle system is complete. Rejoice! 2017-04-08 22:40:06 -03:00
Andreas Haas 6075dfe511
Particles2D: Fix flip property (again).
should have flipped the dst_rect..
2017-04-09 01:42:39 +02:00
Pedro J. Estébanez d0ef1acea4 Allow zero preprocess time for Particles2D 2017-04-08 20:04:06 +02:00
Rémi Verschelde df61dc4b2b Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
Rémi Verschelde b81d5f4687 Merge pull request #8308 from RandomShaper/optimize-out-debug-n-non-tools
Optimize-out some debug and/or non-tools methods
2017-04-07 22:22:54 +02:00
Rémi Verschelde efba539f93 Fix build on older GCC versions
Travis builds would fail with:
./drivers/gles3/rasterizer_storage_gles3.h:1018:19: error: ISO C++ forbids initialization of member 'fixed_fps' [-fpermissive]
2017-04-07 19:24:37 +02:00
Rémi Verschelde 12b84eb9f4 Merge pull request #8304 from RandomShaper/reset-folded-on-reset-edit-children
Reset display folded for an instanced scene if editable children is toggled off
2017-04-07 19:12:42 +02:00
Rémi Verschelde d8f011828e Add compatibility class for FixedSpatialMaterial
Fixes loading existing 3.0-alpha projects broken by 74808ac4d9.
2017-04-07 18:59:10 +02:00
Pedro J. Estébanez 665bf52948 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:35:55 +02:00
Pedro J. Estébanez 4b85ddabda 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:48:07 +02:00
Juan Linietsky 74808ac4d9 New particle system, mostly working, some small features missing. 2017-04-06 23:49:27 -03:00
MattUV 6b5305b972 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()

To comply with collision layers' renaming from https://github.com/godotengine/godot/issues/5696 , the method names are NOT set/get_layer_mask_bit()
2017-04-06 23:27:55 +02:00
Rémi Verschelde 25d09b92be Merge pull request #8296 from Hinsbart/normapmap
Fix typo in FixedSpatialMaterial

[ci skip]
2017-04-06 23:27:36 +02:00
Andreas Haas 362e52c2fd
Fix typo in FixedSpatialMaterial
NormapMap
2017-04-06 23:20:00 +02:00
Ferenc Arn 9a37ff1e34 Added various functions basic math classes. Also enabled math checks only for debug builds.
Added set_scale, set_rotation_euler, set_rotation_axis_angle. Addresses #2565 directly.
Added an euler angle constructor for Basis in GDScript and also exposed is_normalized for vectors and quaternions.
Various other changes mostly cosmetic in nature.
2017-04-06 13:03:56 -05:00
supaiku d51fe99a8b Fix highlight typo 2017-04-06 17:35:08 +02:00
Rémi Verschelde 5b5a825c7f Fixer looping timer accumulation in _process
Follow-up to #8251.
2017-04-05 08:22:41 +02:00
Rémi Verschelde 02f9851d0d Merge pull request #8259 from bojidar-bg/move-slide-wall-fix
Fix is_move_and_slide_on_wall, make move_and_slide floor angle configurable
2017-04-05 01:24:19 +02:00
Rémi Verschelde 2c4e4432af Merge pull request #8214 from tagcup/bounce_reflect_slide
Made slide and reflect active verbs acting on itself in Vector2 and V…
2017-04-05 01:23:09 +02:00
Bojidar Marinov 289abd3710
Fix is_move_and_slide_on_wall, make move_and_slide floor angle configurable
Fixes #7313
2017-04-04 18:32:27 +03:00
Rémi Verschelde 57badfd1df Merge pull request #8251 from cynicaldevil/master
Previous value of time_left is added to wait_time before assigning to time_left
2017-04-04 00:22:44 +02:00
Rémi Verschelde 4d3ed11212 Merge pull request #8248 from Hinsbart/fix_notify_renames
Fix more property names in _change_notify calls.
2017-04-04 00:21:12 +02:00
Rémi Verschelde 41986b2092 Merge pull request #8244 from RandomShaper/improve-touch-button
Improve TouchScreenButton
2017-04-04 00:19:47 +02:00
Nikhil Shagrithaya ea4fbee8f2 previous value of time_left is added to wait_time before assigning to time_left 2017-04-04 00:37:42 +05:30
Andreas Haas 0a287cfe4c
Fix more property names in _change_notify calls. 2017-04-03 18:35:15 +02:00
Ferenc Arn 1a620bd5fa Made slide and reflect active verbs acting on itself in Vector2 and Vector3.
This is in alignment with other functions in vector classes.
Also added checks for normalization, fixed the sign of reflect (which now corresponds to reflection along a plane mathematically), added bounce method and updated docs.

Fixes #8201.
2017-04-03 10:02:12 -05:00
Pedro J. Estébanez 6caa9fc94c 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:42:46 +02:00
Rémi Verschelde 1bd3648bb0 Merge pull request #8211 from robertdhernandez/NinePatch-Fix
[3.0] Fixed NinePatchRect/StyleBoxTexture incorrectly drawing AtlasTexture
2017-04-03 14:41:53 +02:00
Rémi Verschelde 5b09dde3fe Merge pull request #8146 from supagu/astar
Added ability to change A-star cost function
2017-04-03 13:52:59 +02:00
Rémi Verschelde 9f85befbfd Merge pull request #8048 from ficoos/was_input_handled
Add the option to check if input was handled
2017-04-03 13:48:57 +02:00
Andreas Haas b49d206a4c Merge pull request #8219 from robertdhernandez/Node2D-Canvas-Sync
Node2D/Control variables now update with canvas changes
2017-04-03 00:33:40 +02:00
Andreas Haas 1d3c9c448d
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.
2017-04-02 09:46:51 +02:00
Robert Hernandez 8078b5ecf6 Fixed Node2D/Control not updating properties 2017-04-01 20:13:52 -04:00
Fabian Mathews b541402417 Added ability to change A-star cost function 2017-04-01 16:36:22 +10:30
Saggi Mizrahi 245ace6e2e 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>
2017-03-31 17:56:32 +03:00
Robert Hernandez 7a428206fe Fixed WindowDialog not aligning properly 2017-03-31 01:48:02 -04:00
Robert Hernandez a4a12a2b7b Fixed AtlasTexture being incorrectly
Fixed StyleBoxTexture and NinePatchRect drawing the entire texture of an
AtlasTexture.
2017-03-30 21:09:25 -04:00
Benjamin Dahse 93d6003aa8 Show 3D raycasts when debugging collisions
Represent a raycast by a line segment using the direction and magnitude of the cast_to vector.
The entire line segment will become red while a collision occurs.
2017-03-30 22:34:05 +02:00
Rémi Verschelde d7dd276ccc Merge pull request #8208 from Shin-NiL/master
Honor the Tween's final values
2017-03-30 13:09:17 +02:00
Shin-NiL d8c396a44f Honor the Tween's final values 2017-03-30 07:58:20 -03:00
Rémi Verschelde c6ba3bf9d5 Merge pull request #8203 from RandomShaper/add-missing-bind
Add missing binding for DUPLICATE_USE_INSTANCING
2017-03-30 07:37:46 +02:00
Pedro J. Estébanez c2165bb1a5 Add missing binding for DUPLICATE_USE_INSTANCING 2017-03-30 00:38:06 +02:00
Rémi Verschelde 397380e9e5 Merge pull request #8130 from volzhs/cache-font-master
Cache DynamicFont resource for Android
2017-03-24 22:52:36 +01:00
Rémi Verschelde c25246d158 Merge pull request #8010 from AlexHolly/Timer-is_time_left
added Timer is_time_left()
2017-03-24 22:48:01 +01:00