1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Change key move behavior of canvas item editor to ignore zoom level; Add

alt + arrow key as local base move mode; Control + arrow key as local +
rotation move mode
This commit is contained in:
marynate
2014-05-09 15:11:24 +08:00
parent 1024692041
commit 14350d2c41
2 changed files with 41 additions and 16 deletions

View File

@@ -122,6 +122,12 @@ class CanvasItemEditor : public VBoxContainer {
};
enum KeyMoveMODE {
MOVE_VIEW_BASE,
MOVE_LOCAL_BASE,
MOVE_LOCAL_WITH_ROT
};
EditorSelection *editor_selection;
Tool tool;
@@ -220,7 +226,7 @@ class CanvasItemEditor : public VBoxContainer {
void _remove_canvas_item(CanvasItem *p_canvas_item);
void _clear_canvas_items();
void _visibility_changed(ObjectID p_canvas_item);
void _key_move(const Vector2& p_dir, bool p_snap);
void _key_move(const Vector2& p_dir, bool p_snap, KeyMoveMODE p_move_mode);
DragType _find_drag_type(const Matrix32& p_xform, const Rect2& p_local_rect, const Point2& p_click, Vector2& r_point);