Commit Graph

6130 Commits

Author SHA1 Message Date
mbalint12 82ad45024f Fixed typo in gdscript autocompletion.
There was a missing '!' sign, but autocompletion shows parent script members too.

(cherry picked from commit edaf77abd6)
2017-03-19 00:43:07 +01:00
denis e3e86567ba Update mouse position on touch and release events (Android)
(cherry picked from commit 55835167a4)
2017-03-19 00:42:58 +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
volzhs a9d8da91b7 Fix drag and drop on 2d viewport
(cherry picked from commit 4d0a75750f)
2017-03-19 00:40:54 +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 1d418afe86 Prevent cyclical dependency issue after clang-format includes reorder 2017-03-19 00:33:35 +01:00
Rémi Verschelde d4e0be7632 Add missing map.h include in color defs
(cherry picked from commit 5e13a762ec)
2017-03-19 00:32:58 +01:00
Rémi Verschelde 2664549916 Prevent MSVC build issue after clang-format includes reorder 2017-03-18 23:49:09 +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 9d2c0f6c6e clang-format: Add pre-commit hook
Derived from https://github.com/githubbrowser/Pre-commit-hooks
and https://gitlab.cern.ch/GeantV/geant/blob/master/hooks/pre-commit-clang-format

(cherry picked from commit 0e4ee5935a)
2017-03-18 23:29:45 +01:00
Rémi Verschelde 19f90b59d5 Style: Add .clang-format based on LLVM style
Adapted some parameters to fit the de facto Godot style as closely as possible
(tab indentation, long lines with no wrapping - for now -, indented case labels,
left-aligned pointer operators).

(cherry picked from commit 503c98ead4)
2017-03-18 23:29:45 +01:00
Rémi Verschelde 6e5246e312 Reorder the folders in tools to prepare moving tools/editor
- `certs` and `editor_fonts` go to `thirdparty`
- `dist` and `scripts` go to a new `misc` folder
- `collada` and `doc` go to `tools/editor`

The next step will be to rename `tools/editor` to `editor` directly,
but this will be done at the right time to avoid breaking too many PRs.

(cherry picked from commit b87a232668)
2017-03-18 23:29:43 +01:00
Rémi Verschelde 16b78da941 Style: Various fixes to play nice with clang-format
(cherry picked from commit 2a0ddc1e89)
2017-03-18 23:13:47 +01:00
Rémi Verschelde 2d479aa0c6 Style: Prevent clang-format on JS code
(cherry picked from commit 39114178a0)
2017-03-18 22:52:28 +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 75bf6a9978 Style: Keep long lines for now
clang-format does not play well with tab-aligned multiline statements...
Some more research will be needed if we want to set a column limit.

(cherry picked from commit e2a3f06f3d)
2017-03-18 21:06:07 +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
Rémi Verschelde 9992509b0d iphone: Drop unused Appirater thirdparty API
(cherry picked from commit 481e511082)
2017-03-18 20:22:23 +01:00
Ramesh Mani Maran 9b26e9c9ac support for multiple maven url
(cherry picked from commit aa7490ffd0)
2017-03-18 20:21:49 +01:00
volzhs 5ac097a035 Fix wrong TreeItem reference after reconstructing
(cherry picked from commit 66b7586fb0)
2017-03-18 20:21:05 +01:00
Shlomi Fish cb2cdce6b8 Fix failing build on mageia v6 x64 linux.
There was an error about undeclared malloc()+free().

(cherry picked from commit 0ef3d22d98)
2017-03-18 20:19:57 +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
Andreas Haas 7bf7fe854f Don't switch to script on breakpoint hit when using external editor.
Fixes #7705

(cherry picked from commit 10fa752ae7)
2017-03-18 20:13:59 +01:00
Ignacio Etcheverry 77cb8f058d Replace misuse of list iteration
(cherry picked from commit 0cd309c5c7)
2017-03-18 20:13:17 +01:00
Hein-Pieter van Braam dffdf28349 X11 return to cwd at exit
During runtime godot calls chdir() several times. This doesn't really
matter normally but when using tools such as gprof the location of the
profiling data is kind of hard to intuit.

With this PR we simply store the current working directory at start and
restore it once we're almost done exiting.

This doesn't use the OS abstractions as when we need to get the current
workdir we haven't yet initialized it (by necessity). This would break
if we tried to build X11 for windows, but since the X11 target is
hardcoded to use the UNIX abstractions I don't think it matters.

(cherry picked from commit d0c2015fe1)
2017-03-18 20:12:42 +01:00
Vincent 02d711eb61 RichTextLabel add function remove_line
(cherry picked from commit c20b186e73)
2017-03-18 20:11:42 +01:00
Hein-Pieter van Braam 4cf49bb6f4 Allow preload to accept a const string.
In preload() parsing this code will lookup the identifier in the local
constant database. If the identifier corresponds to a string constant
it is used as the path for preload().

Currently this does not work for global constants, only constants
declared in the same class as the preload is happening. We can implement
a full fix too. Maybe we can use this PR to discuss the possibilities.

This (partially) fixes #6798

(cherry picked from commit 3e5743ca36)
2017-03-18 20:10:36 +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
Hein-Pieter van Braam 38e86c8c24 Remove bounds check when resuming from yield.
The code would get a pointer to the beginning of the call_args by using
operator[] at the stack Vector. This does bound checking. When there are
no call_args this bound check fails and the error mentioned in #7796
gets triggered.

This bound check is actually not necessary as call_args just gets set to
NULL and never dereferenced. This new code will just unconditionally set
the pointer to the place where the call_args are if there are any. There
is no NULL check for call_args anywhere so this is safe.

Fixes #7796

(cherry picked from commit e8611966de)
2017-03-18 20:09:45 +01:00
Brett-Mitchell 616850b3c0 Fix for issue #7766
Add initialization for OS_OSX.mouse_mode in OS_OSX::OS_OSX().  mouse_mode now defaults to OS::MOUSE_MODE_VISIBLE.
(cherry picked from commit 6921e11805)
2017-03-18 20:09:45 +01:00
Andreas Haas 12a1b517ca ProjectSettings: InputMap dialog fixes
Now the selection jumps to the correct action after a new event has been added.
Also sets the default device id for Joypad button events to 0.

(cherry picked from commit 92ac7067e6)
2017-03-18 20:08:25 +01:00
Saracen 919c1d627f Fix glitches when sampling relative cursor data in CAPTURED mouse mode on Windows.
(cherry picked from commit 523b69771b)
2017-03-18 20:06:40 +01:00
Andreas Haas fb2173174d Particles2D: implement texture flip parameters.
(cherry picked from commit 6a2dccaf77)
2017-03-18 20:06:11 +01:00
Hein-Pieter van Braam c67b08300a Add a simple signal handler for SIGCHLD on Unix
This fixes #6631

(cherry picked from commit cff6840ff7)
2017-03-18 20:05:57 +01:00
Bojidar Marinov 9f536e3962 Make _sc_ files work like ._sc_, fixes #7762
(cherry picked from commit 27bb6b5282)
2017-03-18 20:04:00 +01:00
m4nu3lf ca2277f3f1 Fixed property setter in G6DOF joint
(cherry picked from commit 0d9b53ce5e)
2017-03-18 19:58:23 +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
marcelofg55 97fef612fb Fix issues with set_window_resizable on x11
(cherry picked from commit 474e3ac055)
2017-03-18 19:56:16 +01:00
Chris Bradfield c01c5fce59 grammar fixes, it's -> its
(cherry picked from commit 10176228b2)
2017-03-18 19:55:34 +01:00
Andreas Haas 6fb2abc7d8 SceneTreeDock: Fix crash when dragging invalid nodes.
Fixes #7529

(cherry picked from commit a64a348054)
2017-03-18 19:54:51 +01:00
Ferenc Arn 5e90183ba4 Use -Ofast on x11. Also introduced use_lto option.
debug_release doesn't turn off optimizations for release target now. Ensure that sanitizer options apply to both C and C++ files.

Built-in optimization/debug flags are prepended such that user-specified flags can override them.

Based on and around the discussion in PR #5194.

(cherry picked from commit 7a85d25218)
2017-03-18 19:52:35 +01:00
Ray Koopa 3f8ce209b7 Added warning when removing animations
(cherry picked from commit f279df2654)
2017-03-18 19:52:08 +01:00
Andreas Haas 8015ab0db3 Add ClassDB binding for File.get_modified_time
Closes #7613

(cherry picked from commit 5ec0610c60)
2017-03-18 19:46:36 +01:00
Geequlim ca3881ccb8 Add 'Copy Node Path' action to right mouse menu
(cherry picked from commit 65db43d5ae)
2017-03-18 19:43:13 +01:00
Fabio Alessandrelli b9451ce58d Fix gibberish output for windows/mingw.
%ls should be used instead of %s or %S to speficy narrow/wide charstring
in wprintf fwprintf

Fixes #6252

(cherry picked from commit 3df934acad)
2017-03-18 19:42:21 +01:00
volzhs 507bb0e1cb Change camera default rotation
(cherry picked from commit 0ecf7f7ca0)
2017-03-18 19:42:07 +01:00