Reverse mouse wheel in animation track editor
(cherry picked from commit f4c6bb568e
)
This commit is contained in:
parent
f4f4b77d23
commit
800dceee52
|
@ -5071,14 +5071,12 @@ void AnimationTrackEditor::_scroll_input(const Ref<InputEvent> &p_event) {
|
||||||
|
|
||||||
Ref<InputEventMouseButton> mb = p_event;
|
Ref<InputEventMouseButton> mb = p_event;
|
||||||
|
|
||||||
if (mb.is_valid() && mb->is_pressed() && mb->get_command() && mb->get_button_index() == BUTTON_WHEEL_DOWN) {
|
if (mb.is_valid() && mb->is_pressed() && mb->get_command() && mb->get_button_index() == BUTTON_WHEEL_UP) {
|
||||||
|
|
||||||
timeline->get_zoom()->set_value(timeline->get_zoom()->get_value() * 1.05);
|
timeline->get_zoom()->set_value(timeline->get_zoom()->get_value() * 1.05);
|
||||||
scroll->accept_event();
|
scroll->accept_event();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mb.is_valid() && mb->is_pressed() && mb->get_command() && mb->get_button_index() == BUTTON_WHEEL_UP) {
|
if (mb.is_valid() && mb->is_pressed() && mb->get_command() && mb->get_button_index() == BUTTON_WHEEL_DOWN) {
|
||||||
|
|
||||||
timeline->get_zoom()->set_value(timeline->get_zoom()->get_value() / 1.05);
|
timeline->get_zoom()->set_value(timeline->get_zoom()->get_value() / 1.05);
|
||||||
scroll->accept_event();
|
scroll->accept_event();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue