1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-09 12:50:35 +00:00

Add zoom to GraphEdit

Also fix some responsiveness issues:
-Box selection no longer visible when connecting.
-Allow cancel connection with mouse's right button.
This commit is contained in:
MarianoGNU
2016-01-18 20:32:37 -03:00
parent ebb5d6bb48
commit c2aaeaaf5a
3 changed files with 74 additions and 11 deletions

View File

@@ -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) {