diff options
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/sprite.cpp | 1 | ||||
-rw-r--r-- | scene/gui/graph_edit.cpp | 11 | ||||
-rw-r--r-- | scene/gui/graph_node.cpp | 1 |
3 files changed, 8 insertions, 5 deletions
diff --git a/scene/2d/sprite.cpp b/scene/2d/sprite.cpp index c5b338bf59..8723db95d6 100644 --- a/scene/2d/sprite.cpp +++ b/scene/2d/sprite.cpp @@ -214,6 +214,7 @@ void Sprite::set_frame(int p_frame) { frame=p_frame; + _change_notify("frame"); emit_signal(SceneStringNames::get_singleton()->frame_changed); } diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp index 4eecabd10c..acc3ec3b2e 100644 --- a/scene/gui/graph_edit.cpp +++ b/scene/gui/graph_edit.cpp @@ -151,7 +151,7 @@ void GraphEdit::_update_scroll_offset() { } } - connections_layer->set_pos(-Point2(h_scroll->get_val(),v_scroll->get_val())*zoom); + connections_layer->set_pos(-Point2(h_scroll->get_val(),v_scroll->get_val())); set_block_minimum_size_adjust(false); awaiting_scroll_offset_update=false; @@ -650,8 +650,8 @@ void GraphEdit::_draw_cos_line(CanvasItem* p_where,const Vector2& p_from, const cp_offset=MAX(MIN(cp_len-diff,cp_neg_len),-diff*0.5); } - Vector2 c1 = Vector2(cp_offset,0); - Vector2 c2 = Vector2(-cp_offset,0); + Vector2 c1 = Vector2(cp_offset*zoom,0); + Vector2 c2 = Vector2(-cp_offset*zoom,0); int lines=0; _bake_segment2d(p_where,0,1,p_from,c1,p_to,c2,0,3,9,8,p_color,p_to_color,lines); @@ -726,9 +726,9 @@ void GraphEdit::_connections_layer_draw() { continue; } - Vector2 frompos=gfrom->get_connection_output_pos(E->get().from_port)+gfrom->get_offset(); + Vector2 frompos=gfrom->get_connection_output_pos(E->get().from_port)+gfrom->get_offset()*zoom; Color color = gfrom->get_connection_output_color(E->get().from_port); - Vector2 topos=gto->get_connection_input_pos(E->get().to_port)+gto->get_offset(); + Vector2 topos=gto->get_connection_input_pos(E->get().to_port)+gto->get_offset()*zoom; Color tocolor = gto->get_connection_input_color(E->get().to_port); _draw_cos_line(connections_layer,frompos,topos,color,tocolor); @@ -1052,6 +1052,7 @@ void GraphEdit::set_zoom(float p_zoom) { top_layer->update(); _update_scroll(); + connections_layer->update(); if (is_visible()) { diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp index 213c5f62c0..eec973ebef 100644 --- a/scene/gui/graph_node.cpp +++ b/scene/gui/graph_node.cpp @@ -769,6 +769,7 @@ void GraphNode::_bind_methods() { ADD_PROPERTY( PropertyInfo(Variant::STRING,"title"),_SCS("set_title"),_SCS("get_title")); ADD_PROPERTY( PropertyInfo(Variant::BOOL,"show_close"),_SCS("set_show_close_button"),_SCS("is_close_button_visible")); + ADD_PROPERTY( PropertyInfo(Variant::BOOL,"resizeable"),_SCS("set_resizeable"),_SCS("is_resizeable")); ADD_SIGNAL(MethodInfo("offset_changed")); ADD_SIGNAL(MethodInfo("dragged",PropertyInfo(Variant::VECTOR2,"from"),PropertyInfo(Variant::VECTOR2,"to"))); |