Commit graph

201 commits

Author SHA1 Message Date
groud
7331ca6f63 Fixes some 2d bones display problems 2018-05-05 15:45:26 +02:00
groud
3962862ea3 Fixes several selection problems in the 2D editor 2018-05-05 11:50:23 +02:00
Juan Linietsky
af9a6202eb Fix bone refresh logic, closes #18564 2018-05-04 18:11:28 -03:00
Juan Linietsky
bf561c4946 Made bone handling for actual Bone2D a special case. Make custom bones appear like a custom (less important) option now. 2018-05-04 16:46:32 -03:00
Juan Linietsky
e68cbec1fa Make bones have more contrast with outline 2018-05-04 11:54:21 -03:00
groud
845a898f37 Fixes locks and groups on 2d editor 2018-05-02 10:37:37 +02:00
Rémi Verschelde
de97339a2d
Merge pull request #18291 from akien-mga/coverity-uninitialized-scalar-var
Fix Coverity reports of uninitialized scalar variable
2018-05-01 19:14:07 +02:00
Rémi Verschelde
e1ef2f538f
Merge pull request #18380 from groud/fix_spacebar_panning
Fixes 2d editor panning not working
2018-05-01 08:56:13 +02:00
Max Hilbrunner
f274c8b74b
Merge pull request #18381 from groud/fix_hard_to_select_node2d
Fixes hard to select Node2D
2018-04-30 18:58:27 +02:00
Gilles Roudiere
8dcd39c3c4 Adds shortcuts for zooming in the 2D editor 2018-04-26 10:28:56 +02:00
groud
e8a4c4fa4c Fixes hard to select Node2D 2018-04-23 19:48:15 +02:00
groud
9c5a44aeee Fixes 2d editor panning not working 2018-04-23 19:34:03 +02:00
Rémi Verschelde
bf7ca623a6 Fix Coverity reports of uninitialized scalar variable
Fixes most current reports on Coverity Scan of uninitialized scalar
variable (CWE-457): https://cwe.mitre.org/data/definitions/457.html

These happen most of the time (in our code) when instanciating structs
without a constructor (or with an incomplete one), and later returning
the instance. This is sometimes intended though, as some parameters are
only used in some situations and should not be double-initialized for
performance reasons (e.g. `constant` in ShaderLanguage::Token).
2018-04-19 15:20:45 +02:00
Juan Linietsky
1d15c5d726
Merge pull request #17502 from groud/2Deditor_rect
Remove the rect surrounding 2D nodes in 2D editor when it's not pertinent
2018-04-13 10:21:44 -03:00
Juan Linietsky
7dedb22f0b
Merge pull request #17809 from RandomShaper/menu-item-on-release
Improve popup menus usability
2018-04-07 16:22:00 -03:00
Pedro J. Estébanez
259ed1d400 Improve popup menus usability
It seems that popups were intended to "grab" the mouse click that triggered them, but their intent was being lost. This commit does the necessary changes to let it happen and updates items that were trying to get advantage of it, because the semantics of `Control::grab_click_focus()` have changed a bit. Namely, it must be called **before** showing the modal.

This allows to popup a menu and activate an item in it in a single click-point-release cycle, instead of having to click once to open the menu and once more to pick an item.

This ability is extended even to context menus activated with the RMB (or any other mouse button, for that matter). The editor benefits from this in the context menu of the tree dock, which has been patched to opt-in for this feature.

This improves UX a bit by saving unnecessary clicks.

From now on, `PopupMenu` always grabs the click and also invalidates the first button release unless the mouse has moved (that's what `set_invalidate_click_until_motion()` was doing and now it's removed), so there is no longer the need of doing both things at every point a pop-up menu is shown.
2018-04-07 01:06:02 +02:00
Gilles Roudiere
a724f34ef3 Displays node icon on hover 2018-04-03 23:56:37 +02:00
Gilles Roudiere
0251b08afa Display nodes without rect's position 2018-04-03 22:04:19 +02:00
Gilles Roudiere
72ed1e4244 Remove the selection rect for nodes that do not require it 2018-04-03 22:04:19 +02:00
Gilles Roudiere
6435894275 Fixes issues with selectable children and locks 2018-04-03 21:31:15 +02:00
Gilles Roudiere
4b4ed9b724
Merge pull request #17785 from Rubonnek/simplify-canvas-item-logic
Simplify CanvasItemEditor anchor drag logic
2018-03-28 11:56:29 +02:00
Chaosus
9a6b4a3f11 Enable snapping in 2D when control key pressed 2018-03-28 10:07:21 +03:00
Wilson E. Alvarez
bc9ef5461b
Simplify CanvasItemEditor anchor drag logic 2018-03-26 14:30:51 -04:00
Gilles Roudiere
038de54b1f Fixes scrollbars in Canvas Item Editor 2018-03-17 12:18:33 +01:00
Rémi Verschelde
fcd81c9627
Merge pull request #17172 from StateOff/add_show_axis_options
Add "Show Origin" and "Show Viewport" options to 2D Editor Viewport
2018-03-13 12:53:11 +01:00
Ranoller
2aae6fc2ec
FIX to broken item select list (zoom and RMB)
FIX to #17346. Compiled and tested.
2018-03-07 21:39:55 +01:00
Bernhard Liebl
ced694e9cd In CanvasItemEditor, prioritize selected items 2018-03-05 19:09:59 +01:00
Blazej Floch
934498d37a Add "Show Origin" and "Show Viewport" options to 2D Editor Viewport 2018-03-02 21:27:32 -05:00
luz.paz
612ab4bbc6 Fix typos with codespell
Found via `codespell -q 3 --skip="./thirdparty,./editor/translations" -I ../godot-word-whitelist.txt`
Whitelist consists of:
```
ang
doubleclick
lod
nd
que
te
unselect
```
2018-02-21 19:46:06 +01: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
Michael Alexsander Silva Dias
b507eeddcc Capitalized "View" menu options. 2018-02-02 17:27:57 -02:00
volzhs
48611afb80 Rotate Control node with respecting pivot offset 2018-01-24 15:44:28 +09:00
Rémi Verschelde
9f479f096c Fix typos in code and docs with codespell
Using v1.11.0 from https://github.com/lucasdemarchi/codespell
2018-01-18 22:01:42 +01:00
Gilles Roudiere
b06c6602c8 Changes the keep_margin parameter to true by default, so that people are not suprised that set_anchor changes the margins values 2018-01-15 10:37:13 +01: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
Bernhard Liebl
6c6a0fe840 Fix crash due to stale refs to node selection lists 2018-01-07 09:57:28 +01: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
volzhs
1876999b3a Fix get_edited_scene_root error at starting editor
Fix #15300
2018-01-05 03:55:43 +09: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
8cf9269cdb
Merge pull request #15225 from volzhs/lock-group-invisible-node
Fix lock or group with invisible node
2018-01-03 12:35:12 +01:00
Rémi Verschelde
459ee51338
Merge pull request #15093 from poke1024/canvas-editor-select
More exact picking for canvas editor
2018-01-03 11:15:28 +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
volzhs
108b4a37b0 Fix lock or group with invisible node
Fix #15205
2018-01-01 02:18:39 +09:00
Bernhard Liebl
8505871a87 More exact picking for canvas editor 2017-12-27 20:24:58 +01:00
Gilles Roudiere
b8c849205c Fix 2D editor checkboxes with a new project 2017-12-26 16:39:58 +01:00
Rémi Verschelde
3068ccc8e6
Merge pull request #14913 from poke1024/tooltip-shortcut-names
Consistent display of shortcut names in tooltips
2017-12-21 22:47:50 +01:00
poke1024
22d87f20fa Consistent display of shortcut names in tooltips 2017-12-21 20:17:30 +01:00