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
This commit is contained in:
Gilles Roudiere
2017-11-07 08:58:35 +01:00
committed by Gilles Roudiere
parent 68f277477b
commit 8dad41e395
14 changed files with 1937 additions and 2215 deletions

View File

@@ -46,10 +46,9 @@ Dictionary Node2D::_edit_get_state() const {
}
void Node2D::_edit_set_state(const Dictionary &p_state) {
Dictionary state = p_state;
pos = state["position"];
angle = state["rotation"];
_scale = state["scale"];
pos = p_state["position"];
angle = p_state["rotation"];
_scale = p_state["scale"];
_update_transform();
_change_notify("rotation");
@@ -60,6 +59,8 @@ void Node2D::_edit_set_state(const Dictionary &p_state) {
void Node2D::_edit_set_position(const Point2 &p_position) {
pos = p_position;
_update_transform();
_change_notify("position");
}
Point2 Node2D::_edit_get_position() const {