From 3b05f2c74fa979f068cb805170881db2a062cd31 Mon Sep 17 00:00:00 2001 From: Carter Anderson Date: Sat, 27 May 2017 04:05:15 -0500 Subject: [PATCH] Fix incorrect input event reference in animation_editor.cpp --- editor/animation_editor.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/editor/animation_editor.cpp b/editor/animation_editor.cpp index 7c29162e67d..a5de4fee885 100644 --- a/editor/animation_editor.cpp +++ b/editor/animation_editor.cpp @@ -2601,7 +2601,7 @@ void AnimationKeyEditor::_track_editor_gui_input(const Ref &p_input) float clickp = click.at.x - ofs.x; float dif = base - clickp; - float target = mb->get_pos().x + dif - ofs.x; + float target = mm->get_pos().x + dif - ofs.x; float ratio = target / settings_limit; @@ -2615,7 +2615,7 @@ void AnimationKeyEditor::_track_editor_gui_input(const Ref &p_input) } break; case ClickOver::CLICK_DRAG_TIMELINE: { - Point2 mpos = mb->get_pos() - ofs; + Point2 mpos = mm->get_pos() - ofs; /* if (mpos.x &p_input) } break; case ClickOver::CLICK_SELECT_KEYS: { - click.to = mb->get_pos(); + click.to = mm->get_pos(); if (click.to.y < h && click.at.y > h && mm->get_relative().y < 0) { float prev = v_scroll->get_value(); @@ -2665,22 +2665,22 @@ void AnimationKeyEditor::_track_editor_gui_input(const Ref &p_input) } break; case ClickOver::CLICK_MOVE_KEYS: { - click.to = mb->get_pos(); + click.to = mm->get_pos(); } break; default: {} } return; - } else if (mb->get_button_mask() & BUTTON_MASK_MIDDLE) { + } else if (mm->get_button_mask() & BUTTON_MASK_MIDDLE) { int rel = mm->get_relative().x; float relf = rel / _get_zoom_scale(); h_scroll->set_value(h_scroll->get_value() - relf); } - if (mb->get_button_mask() == 0) { + if (mm->get_button_mask() == 0) { - Point2 mpos = mb->get_pos() - ofs; + Point2 mpos = mm->get_pos() - ofs; if (mpos.y < h) { #if 0