summaryrefslogtreecommitdiff
path: root/editor/animation_bezier_editor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/animation_bezier_editor.cpp')
-rw-r--r--editor/animation_bezier_editor.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/editor/animation_bezier_editor.cpp b/editor/animation_bezier_editor.cpp
index af2760e82b..69e3c3b19d 100644
--- a/editor/animation_bezier_editor.cpp
+++ b/editor/animation_bezier_editor.cpp
@@ -258,7 +258,7 @@ void AnimationBezierTrackEdit::_notification(int p_what) {
draw_line(Point2(right_limit, 0), Point2(right_limit, get_size().height), linecolor);
- Ref<Texture> close_icon = get_icon("Close", "EditorIcons");
+ Ref<Texture2D> close_icon = get_icon("Close", "EditorIcons");
close_icon_rect.position = Vector2(get_size().width - close_icon->get_width() - hsep, hsep);
close_icon_rect.size = close_icon->get_size();
@@ -290,7 +290,7 @@ void AnimationBezierTrackEdit::_notification(int p_what) {
if (node) {
int ofs = 0;
- Ref<Texture> icon = EditorNode::get_singleton()->get_object_icon(node, "Node");
+ Ref<Texture2D> icon = EditorNode::get_singleton()->get_object_icon(node, "Node");
h = MAX(h, icon->get_height());
@@ -391,7 +391,7 @@ void AnimationBezierTrackEdit::_notification(int p_what) {
{ //draw OTHER curves
float scale = timeline->get_zoom_scale();
- Ref<Texture> point = get_icon("KeyValue", "EditorIcons");
+ Ref<Texture2D> point = get_icon("KeyValue", "EditorIcons");
for (Map<int, Color>::Element *E = subtrack_colors.front(); E; E = E->next()) {
_draw_track(E->key(), E->get());
@@ -502,12 +502,12 @@ void AnimationBezierTrackEdit::set_animation_and_track(const Ref<Animation> &p_a
animation = p_animation;
track = p_track;
- if (is_connected("select_key", editor, "_key_selected"))
- disconnect("select_key", editor, "_key_selected");
- if (is_connected("deselect_key", editor, "_key_deselected"))
- disconnect("deselect_key", editor, "_key_deselected");
- connect("select_key", editor, "_key_selected", varray(p_track), CONNECT_DEFERRED);
- connect("deselect_key", editor, "_key_deselected", varray(p_track), CONNECT_DEFERRED);
+ if (is_connected_compat("select_key", editor, "_key_selected"))
+ disconnect_compat("select_key", editor, "_key_selected");
+ if (is_connected_compat("deselect_key", editor, "_key_deselected"))
+ disconnect_compat("deselect_key", editor, "_key_deselected");
+ connect_compat("select_key", editor, "_key_selected", varray(p_track), CONNECT_DEFERRED);
+ connect_compat("deselect_key", editor, "_key_deselected", varray(p_track), CONNECT_DEFERRED);
update();
}
@@ -522,11 +522,11 @@ void AnimationBezierTrackEdit::set_undo_redo(UndoRedo *p_undo_redo) {
void AnimationBezierTrackEdit::set_timeline(AnimationTimelineEdit *p_timeline) {
timeline = p_timeline;
- timeline->connect("zoom_changed", this, "_zoom_changed");
+ timeline->connect_compat("zoom_changed", this, "_zoom_changed");
}
void AnimationBezierTrackEdit::set_editor(AnimationTrackEditor *p_editor) {
editor = p_editor;
- connect("clear_selection", editor, "_clear_selection", varray(false));
+ connect_compat("clear_selection", editor, "_clear_selection", varray(false));
}
void AnimationBezierTrackEdit::_play_position_draw() {
@@ -1150,16 +1150,16 @@ void AnimationBezierTrackEdit::_bind_methods() {
ClassDB::bind_method("_clear_selection_for_anim", &AnimationBezierTrackEdit::_clear_selection_for_anim);
ClassDB::bind_method("_select_at_anim", &AnimationBezierTrackEdit::_select_at_anim);
- ADD_SIGNAL(MethodInfo("timeline_changed", PropertyInfo(Variant::REAL, "position"), PropertyInfo(Variant::BOOL, "drag")));
+ ADD_SIGNAL(MethodInfo("timeline_changed", PropertyInfo(Variant::FLOAT, "position"), PropertyInfo(Variant::BOOL, "drag")));
ADD_SIGNAL(MethodInfo("remove_request", PropertyInfo(Variant::INT, "track")));
- ADD_SIGNAL(MethodInfo("insert_key", PropertyInfo(Variant::REAL, "ofs")));
+ ADD_SIGNAL(MethodInfo("insert_key", PropertyInfo(Variant::FLOAT, "ofs")));
ADD_SIGNAL(MethodInfo("select_key", PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::BOOL, "single")));
ADD_SIGNAL(MethodInfo("deselect_key", PropertyInfo(Variant::INT, "index")));
ADD_SIGNAL(MethodInfo("clear_selection"));
ADD_SIGNAL(MethodInfo("close_request"));
ADD_SIGNAL(MethodInfo("move_selection_begin"));
- ADD_SIGNAL(MethodInfo("move_selection", PropertyInfo(Variant::REAL, "ofs")));
+ ADD_SIGNAL(MethodInfo("move_selection", PropertyInfo(Variant::FLOAT, "ofs")));
ADD_SIGNAL(MethodInfo("move_selection_commit"));
ADD_SIGNAL(MethodInfo("move_selection_cancel"));
}
@@ -1184,7 +1184,7 @@ AnimationBezierTrackEdit::AnimationBezierTrackEdit() {
play_position->set_mouse_filter(MOUSE_FILTER_PASS);
add_child(play_position);
play_position->set_anchors_and_margins_preset(PRESET_WIDE);
- play_position->connect("draw", this, "_play_position_draw");
+ play_position->connect_compat("draw", this, "_play_position_draw");
set_focus_mode(FOCUS_CLICK);
v_scroll = 0;
@@ -1198,7 +1198,7 @@ AnimationBezierTrackEdit::AnimationBezierTrackEdit() {
menu = memnew(PopupMenu);
add_child(menu);
- menu->connect("id_pressed", this, "_menu_selected");
+ menu->connect_compat("id_pressed", this, "_menu_selected");
//set_mouse_filter(MOUSE_FILTER_PASS); //scroll has to work too for selection
}