summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-05-27 11:35:48 +0200
committerGitHub <noreply@github.com>2017-05-27 11:35:48 +0200
commit9130f0a89f2f8be0f9c2ef63b96957226f5e3c16 (patch)
treefc151e1b166666d0759c09491146d6e08a56ca05
parent6a088335163be87d53ece476281d9baa3fcba0a4 (diff)
parent3b05f2c74fa979f068cb805170881db2a062cd31 (diff)
Merge pull request #8955 from mcanders/mcanders/AnimationEditorInputFix
Fix incorrect input event reference in animation_editor.cpp
-rw-r--r--editor/animation_editor.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/editor/animation_editor.cpp b/editor/animation_editor.cpp
index 7c29162e67..a5de4fee88 100644
--- a/editor/animation_editor.cpp
+++ b/editor/animation_editor.cpp
@@ -2601,7 +2601,7 @@ void AnimationKeyEditor::_track_editor_gui_input(const Ref<InputEvent> &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<InputEvent> &p_input)
} break;
case ClickOver::CLICK_DRAG_TIMELINE: {
- Point2 mpos = mb->get_pos() - ofs;
+ Point2 mpos = mm->get_pos() - ofs;
/*
if (mpos.x<name_limit)
mpos.x=name_limit;
@@ -2646,7 +2646,7 @@ void AnimationKeyEditor::_track_editor_gui_input(const Ref<InputEvent> &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<InputEvent> &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