Commit graph

31 commits

Author SHA1 Message Date
qarmin
4e5310cc60 Some code changed with Clang-Tidy 2019-06-26 15:08:25 +02:00
Matheus Lima Cunha
0110a88547 Move vertex along a single axis while editing and holding shift 2019-04-16 20:26:22 -03:00
Martin Wallin
ed06ed38fb Display vertex number when hovering point in collision polygon 2019-03-11 10:42:55 +01:00
marxin
8d51618949 Add -Wshadow=local to warnings and fix reported issues.
Fixes #25316.
2019-02-20 19:44:12 +01:00
Michael Alexsander Silva Dias
637f41e833 Fix Polygon2D Editor interacting with its buttons too soon 2019-02-16 20:13:02 -02:00
Michael Alexsander Silva Dias
8bef68fe6f Better and non-buggy Polygon2D editing disabling 2019-02-16 16:46:09 -02:00
Michael Alexsander Silva Dias
aca756fce8 Revert "Disallow polygon2D editing if internal vertices exists, as suggested in #24853"
This reverts commit 419fb45a3e.
2019-02-16 16:43:51 -02:00
Juan Linietsky
419fb45a3e Disallow polygon2D editing if internal vertices exists, as suggested in #24853 2019-02-13 13:11:39 -03:00
Rémi Verschelde
b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
Rémi Verschelde
4d27b1fe4f
Merge pull request #24109 from remorse107/godotengine-path2d-editor-fix
Fixed Path2D Plugin Editor so segments can be split.
2018-12-12 16:02:55 +01:00
Wilson E. Alvarez
08f22f1cf0
Moved member variables to initializer list 2018-12-11 18:33:01 -05:00
Robert Morse
bce3599bd7 Fixed an issue with the Path2D plugin editor not supporting the capability to split curves as its toolbar buttons originally advertised. 2018-12-07 08:27:36 -06:00
Michael Alexsander Silva Dias
e4d0ecce7a General enhancements to the Polygon2D, TextureRegion, and TileSet editors 2018-12-06 03:29:27 -02:00
Juan Linietsky
7f347cc31a It is now possible to cancel on 2D polygon editor. RMB (previously close) and ESC will cancel polygon. Closes #15474 2018-11-13 18:50:54 -03:00
groud
ced6f43455 Fixes viewport scrollbars not updating with plugins 2018-10-18 14:06:57 +02:00
Rémi Verschelde
76ca46d1f4
Merge pull request #22225 from groud/fix_draw_on_viewport
Fixes drawing of the 2D plugins on the 3D view
2018-09-20 21:45:16 +02:00
groud
c3e66536cc Fixes polygon editor blocking other editor actions (move, scale...) 2018-09-19 14:26:04 +02:00
groud
5172642c32 Fixes drawing of the 2D plugins on the 3D view 2018-09-18 20:00:07 +02:00
Hein-Pieter van Braam
0e29f7974b Reduce unnecessary COW on Vector by make writing explicit
This commit makes operator[] on Vector const and adds a write proxy to it.  From
now on writes to Vectors need to happen through the .write proxy. So for
instance:

Vector<int> vec;
vec.push_back(10);
std::cout << vec[0] << std::endl;
vec.write[0] = 20;

Failing to use the .write proxy will cause a compilation error.

In addition COWable datatypes can now embed a CowData pointer to their data.
This means that String, CharString, and VMap no longer use or derive from
Vector.

_ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug
builds. This is a lot faster for Vector in the editor and while running tests.
The reason why this difference used to exist is because force-inlined methods
used to give a bad debugging experience. After extensive testing with modern
compilers this is no longer the case.
2018-07-26 00:54:16 +02:00
Rémi Verschelde
e4213e66b2 Add missing copyright headers and fix formatting
Using `misc/scripts/fix_headers.py` on all Godot files.
Some missing header guards were added, and the header inclusion order
was fixed in the Bullet module.
2018-01-05 01:22:23 +01:00
Rémi Verschelde
b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
Bernhard Liebl
86154c4c69 Various fixes for 2d polygon editor
Fixes issues 15096, 15097
Fixes various other Line2D edit issues
Fixes previous outline
Fixes retina support
2017-12-30 17:51:53 +01:00
Rémi Verschelde
13c2ff9320 Style: Apply new clang-format 5.0 style to all files 2017-12-07 08:02:00 +01:00
Bernhard Liebl
ca7e9c0348 Fixes Polygon2D wip mode closing when editing mode is changed 2017-12-04 13:44:30 +01:00
Bernhard Liebl
91b8b94635 add "add point" and "select point" handles to polygon 2d editor 2017-11-27 14:01:34 +01:00
Pedro J. Estébanez
3f31925b18 Universalize draw-over API for EditorPlugins
- Now it is usable from both `CanvasItem` and `Spatial` editors.
- `EditorPlugin` API changes:
 - `forward_draw_over_canvas()` becomes `forward_draw_over_viewport()`.
 - `update_canvas()` becomes `update_overlays()`, which now triggers the update of every overlay on top of any 2D or 3D viewports present. Also now it returns the number of such viewports, which is useful whenever you need to know the number of draw-over calls you'll get.
 - New: `[set/is]_force_draw_over_forwarding_enabled()` to force overlaying regardless it handles the current object type, in a similar fashion as `[set/is]_input_event_forwarding_always_enabled`. This kind of overlay is also on top of those for regular handled node types.
 - New: `forward_force_draw_over_canvas()`, which is the callback that gets called for plugins that enable forced overlaying.
2017-11-24 21:24:15 +01:00
Bernhard Liebl
89f7032c2e Fix drawing order of polygon 2d editor handles 2017-11-13 18:49:06 +01:00
Bernhard Liebl
88007e91cf Use AbstractPolygon2DEditor for Line2D 2017-11-04 20:26:38 +01:00
Bernhard Liebl
7c245e9f6d adds alternative editing of nodes: you can select nodes, use del to delete nodes, and split edges by simply clicking into edge 2017-10-23 19:01:14 +02:00
Gilles Roudiere
fc02605b49 Fixes snapping and replaces the _draw_canvas by forward_canvas_draw 2017-10-18 00:01:59 +02:00
Bernhard Liebl
f815a3df7e Refactoring of polygon editors to a common code base
includes rebase and manual application 67a706fc1b and 4537977d6d
2017-10-03 13:10:45 +02:00