Commit graph

55 commits

Author SHA1 Message Date
Blazej Floch
934498d37a Add "Show Origin" and "Show Viewport" options to 2D Editor Viewport 2018-03-02 21:27:32 -05:00
Rémi Verschelde
b93d6a001b
Merge pull request #16566 from groud/gui_input_rework
2D Editor GUI input rework
2018-02-19 20:05:35 +01:00
Gilles Roudiere
8dad41e395 2D editor GUI input rework. Changes are:
- The input handling is done into several distinct functions, and the
  code is more consistent.
- The actions' history is more precise ("Edited CanvasItem"
  is now "Rotated CanvasItem","Moved CanvasItem",etc...)
- Fixed a little bug about input key events not forwarded correctly to plugins
- IK is followed by default when you move a bone node, the alt-key allow
  you to move it normally
2018-02-16 10:14:52 +01:00
George Marques
da69a06253
Add a function to remove controls from containers
Closes #5968
2018-02-13 19:35:10 -02:00
Blazej Floch
9d4afdc372 - Fixes #15470 "Crash on drag and drop scene file on empty scene"
- New: Allows for multiple files to be dragged over
- Added error when multiple nodes are dropped in scene **without** scene root
  - Removed TTR: "This operation requires a single selected node.", "I see.."
  - Introduces TTR: "Can not instaniate multiple nodes without root."
- Fixes "Can't add_child, already got a parent" error
- Reduced multiple resource loading by casting
- Make sure to not _show_resource_type_selector if only PackedScenes are being dropped
2018-01-09 23:16:47 -05: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
f9f6f250e6
Merge pull request #15191 from Jerome67000/z_renaming
renames "z" Node2D property to "z_index"
2018-01-04 00:41:45 +01:00
Jerome67000
42ae3525a3 #15078 renamed "z" -> "z_index" property in Node2D 2018-01-03 13:02:26 +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
Dmitry Koteroff
3cca09d96a When drag'n'drop (lets say, picture in 2D mode), automatically create dragged resource as a root node if you haven't any yet. 2017-11-22 05:28:02 +03:00
Andreas Haas
58fafea485
Remove preview when closing "change default type" dialog. 2017-11-12 10:50:32 +01:00
Gilles Roudiere
06a4e2e3ad Implement guides 2017-10-24 22:32:00 +02:00
Gilles Roudiere
fc02605b49 Fixes snapping and replaces the _draw_canvas by forward_canvas_draw 2017-10-18 00:01:59 +02:00
Rémi Verschelde
3151b08c48 Merge pull request #11821 from groud/margins_preset_menu
Replaces (and extends) the anchor menu to a Layout one
2017-10-09 12:21:57 +02:00
Gilles Roudiere
a25d70ab31 Extends the anchors menu to a presets 2017-10-05 21:53:36 +02:00
Gilles Roudiere
3f279d2a3e Fixes the pre drag rect not drawn correctly 2017-10-03 22:44:34 +02:00
Gilles Roudiere
a0fb178b58 Fix zoom button not zooming on the screen center 2017-10-01 11:30:38 +02:00
Gilles Roudiere
b5f29fe073 Add some options and reorganize the 2D editor menus. Makes available forced snapping. 2017-09-18 23:20:18 +02:00
Gilles Roudiere
ee61d5d04b Implement smart snapping. Fixes a bug with anchors single-axis move (when they were rotated). 2017-09-17 23:22:13 +02:00
Gilles Roudiere
bf6d7add01 Implement shortcuts to multiply/divide the grid step 2017-09-17 23:19:05 +02:00
Gilles Roudiere
335688ce78 Implements rulers 2017-09-17 23:19:05 +02:00
Gilles Roudiere
71b45614fd Split some functions to make the code more readable (maybe at the price of a neglibile performance loss) 2017-09-17 23:04:30 +02:00
Gilles Roudiere
f48b76fd8d Make the shortcuts for setting the pivot editable 2017-09-17 23:04:30 +02:00
Gilles Roudiere
69091d4035 Display draggable anchors only if the parent is not a container 2017-09-17 23:04:30 +02:00
Gilles Roudiere
dbc4dbdec1 Displays margins values when moving the node 2017-09-17 23:04:30 +02:00
Rémi Verschelde
c74bab66aa Merge pull request #11274 from Rubonnek/keep-argument-names-consistent
Renamed function arguments to keep them consistent between declaration and implementation
2017-09-17 12:53:48 +02:00
Wilson E. Alvarez
072e379ffe Renamed function arguments to keep them consistent between declaration and implementation 2017-09-14 13:49:15 -04:00
poke1024
d9b68c5f5d adds display of old bounding box as suggested by Zephilinox in issue #10936 2017-09-14 17:46:24 +02:00
Rémi Verschelde
0b8fa1e010 Remove dead ButtonGroup code 2017-09-06 14:41:34 +02:00
Rémi Verschelde
7f262e484a Merge pull request #10907 from SaracenOne/spatial_edit_drag
Added support for drag and drop in spatial editor.
2017-09-04 23:05:31 +02:00
Poommetee Ketson
fd68c3b68f 2DEditor: enhance viewport cursor shape 2017-09-04 11:36:12 +07:00
SaracenOne
d3cb8d12ff Added support for drag and drop in spatial editor. 2017-09-03 05:00:23 +01:00
Hein-Pieter van Braam
f9467ec1ea Fix signed and unsigned comparisons
The first in my quest to make Godot 3.x compile with -Werror on GCC7
2017-09-01 08:13:12 +02:00
Rémi Verschelde
7ad14e7a3e Dead code tells no tales 2017-08-27 22:13:45 +02:00
Rémi Verschelde
bd282ff43f Use HTTPS URL for Godot's website in the headers 2017-08-27 14:16:55 +02:00
Wilson E. Alvarez
1577f41653 Fixed several memory leaks 2017-08-25 08:47:05 -04:00
Gilles Roudiere
c26af6f2b7 Adds a function to set Anchors with a layout preset 2017-08-13 21:20:14 +02:00
Gilles Roudiere
e8c83b31bd Added the possibility to move all anchors at once when they are clustered 2017-08-13 21:20:13 +02:00
Gilles Roudiere
f5ff7e9fa0 Make anchors snap to each other 2017-08-13 21:20:13 +02:00
Gilles Roudiere
b73613e1eb Displays percentages when dragging anchors 2017-08-13 21:20:13 +02:00
Gilles Roudiere
2032cb2522 Simplifies the canvas editor code 2017-08-13 21:20:13 +02:00
Gilles Roudiere
3264cea7ae Add lines to make understandable when anchors are snapped 2017-08-13 21:20:13 +02:00
Gilles Roudiere
b329cb9c71 Snap anchors when dragged, depending on the zoom level 2017-08-13 21:20:13 +02:00
Gilles Roudiere
fcff42dcb7 Make anchors draggable 2017-08-13 21:20:13 +02:00
Gilles Roudiere
bd0384a9e9 Add anchor visualization 2017-08-13 21:20:13 +02:00
Gilles Roudiere
0d35d4d53b Replace GUI anchor type by a float between 0 and 1 2017-08-13 21:20:13 +02:00
Gilles Roudiere
2d9873e033 Replaced the hard-to-understand _select by _select_click_on_empty_area and _select_click_on_item.
Added some comments
Removed commented code or useless ones
2017-07-20 19:50:37 +02:00
Gilles Roudiere
0d4b0ecb57 Generalized _find_canvas_items_at_pos to remove _select_canvas_items_at_pos
Removed some useless parameters
Removed old comments
2017-07-20 19:50:37 +02:00
Mariano Suligoy
99bda42d4d Add anchor shortcut to fit parent
Also remove old Edit -> Expand to Parent menu option
2017-07-14 10:25:50 -03:00
Juan Linietsky
bd9d98c172 Ability to set rotation and scaling pivot for controls. 2017-07-06 17:42:44 -03:00