diff options
author | MarianoGNU <marianognu.easyrpg@gmail.com> | 2016-01-18 20:32:37 -0300 |
---|---|---|
committer | MarianoGNU <marianognu.easyrpg@gmail.com> | 2016-01-18 20:41:37 -0300 |
commit | c2aaeaaf5afb612cde195075575a955fa0650f4f (patch) | |
tree | 1ea4da5c097ac12630dde0939599a97c28622052 /scene/gui/graph_node.cpp | |
parent | ebb5d6bb48d6f979e63c36688368290a09c4dc8e (diff) | |
download | redot-engine-c2aaeaaf5afb612cde195075575a955fa0650f4f.tar.gz |
Add zoom to GraphEdit
Also fix some responsiveness issues:
-Box selection no longer visible when connecting.
-Allow cancel connection with mouse's right button.
Diffstat (limited to 'scene/gui/graph_node.cpp')
-rw-r--r-- | scene/gui/graph_node.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp index 5efc9757b7..762afb158a 100644 --- a/scene/gui/graph_node.cpp +++ b/scene/gui/graph_node.cpp @@ -474,7 +474,10 @@ Vector2 GraphNode::get_connection_input_pos(int p_idx) { _connpos_update(); ERR_FAIL_INDEX_V(p_idx,conn_input_cache.size(),Vector2()); - return conn_input_cache[p_idx].pos; + Vector2 pos = conn_input_cache[p_idx].pos; + pos.x *= get_scale().x; + pos.y *= get_scale().y; + return pos; } int GraphNode::get_connection_input_type(int p_idx) { @@ -501,8 +504,10 @@ Vector2 GraphNode::get_connection_output_pos(int p_idx){ _connpos_update(); ERR_FAIL_INDEX_V(p_idx,conn_output_cache.size(),Vector2()); - return conn_output_cache[p_idx].pos; - + Vector2 pos = conn_output_cache[p_idx].pos; + pos.x *= get_scale().x; + pos.y *= get_scale().y; + return pos; } int GraphNode::get_connection_output_type(int p_idx) { |