|
@@ -1451,7 +1451,6 @@ int AnimationTimelineEdit::get_name_limit() const {
|
|
|
|
|
|
void AnimationTimelineEdit::_notification(int p_what) {
|
|
void AnimationTimelineEdit::_notification(int p_what) {
|
|
switch (p_what) {
|
|
switch (p_what) {
|
|
- case NOTIFICATION_ENTER_TREE:
|
|
|
|
case NOTIFICATION_THEME_CHANGED: {
|
|
case NOTIFICATION_THEME_CHANGED: {
|
|
add_track->set_button_icon(get_editor_theme_icon(SNAME("Add")));
|
|
add_track->set_button_icon(get_editor_theme_icon(SNAME("Add")));
|
|
loop->set_button_icon(get_editor_theme_icon(SNAME("Loop")));
|
|
loop->set_button_icon(get_editor_theme_icon(SNAME("Loop")));
|
|
@@ -1470,9 +1469,14 @@ void AnimationTimelineEdit::_notification(int p_what) {
|
|
} break;
|
|
} break;
|
|
|
|
|
|
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
|
|
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
|
|
- if (EditorSettings::get_singleton()->check_changed_settings_in_group("editors/panning")) {
|
|
|
|
- panner->setup((ViewPanner::ControlScheme)EDITOR_GET("editors/panning/animation_editors_panning_scheme").operator int(), ED_GET_SHORTCUT("canvas_item_editor/pan_view"), bool(EDITOR_GET("editors/panning/simple_panning")));
|
|
|
|
|
|
+ if (!EditorSettings::get_singleton()->check_changed_settings_in_group("editors/panning")) {
|
|
|
|
+ break;
|
|
}
|
|
}
|
|
|
|
+ [[fallthrough]];
|
|
|
|
+ }
|
|
|
|
+ case NOTIFICATION_ENTER_TREE: {
|
|
|
|
+ panner->setup((ViewPanner::ControlScheme)EDITOR_GET("editors/panning/animation_editors_panning_scheme").operator int(), ED_GET_SHORTCUT("canvas_item_editor/pan_view"), bool(EDITOR_GET("editors/panning/simple_panning")));
|
|
|
|
+ panner->setup_warped_panning(get_viewport(), EDITOR_GET("editors/panning/warped_mouse_panning"));
|
|
} break;
|
|
} break;
|
|
|
|
|
|
case NOTIFICATION_RESIZED: {
|
|
case NOTIFICATION_RESIZED: {
|
|
@@ -1872,7 +1876,7 @@ void AnimationTimelineEdit::_play_position_draw() {
|
|
void AnimationTimelineEdit::gui_input(const Ref<InputEvent> &p_event) {
|
|
void AnimationTimelineEdit::gui_input(const Ref<InputEvent> &p_event) {
|
|
ERR_FAIL_COND(p_event.is_null());
|
|
ERR_FAIL_COND(p_event.is_null());
|
|
|
|
|
|
- if (panner->gui_input(p_event)) {
|
|
|
|
|
|
+ if (panner->gui_input(p_event, get_global_rect())) {
|
|
accept_event();
|
|
accept_event();
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -5138,12 +5142,10 @@ void AnimationTrackEditor::_notification(int p_what) {
|
|
}
|
|
}
|
|
[[fallthrough]];
|
|
[[fallthrough]];
|
|
}
|
|
}
|
|
-
|
|
|
|
case NOTIFICATION_ENTER_TREE: {
|
|
case NOTIFICATION_ENTER_TREE: {
|
|
panner->setup((ViewPanner::ControlScheme)EDITOR_GET("editors/panning/animation_editors_panning_scheme").operator int(), ED_GET_SHORTCUT("canvas_item_editor/pan_view"), bool(EDITOR_GET("editors/panning/simple_panning")));
|
|
panner->setup((ViewPanner::ControlScheme)EDITOR_GET("editors/panning/animation_editors_panning_scheme").operator int(), ED_GET_SHORTCUT("canvas_item_editor/pan_view"), bool(EDITOR_GET("editors/panning/simple_panning")));
|
|
- panner->set_viewport(get_viewport());
|
|
|
|
- [[fallthrough]];
|
|
|
|
- }
|
|
|
|
|
|
+ panner->setup_warped_panning(get_viewport(), EDITOR_GET("editors/panning/warped_mouse_panning"));
|
|
|
|
+ } break;
|
|
case NOTIFICATION_THEME_CHANGED: {
|
|
case NOTIFICATION_THEME_CHANGED: {
|
|
zoom_icon->set_texture(get_editor_theme_icon(SNAME("Zoom")));
|
|
zoom_icon->set_texture(get_editor_theme_icon(SNAME("Zoom")));
|
|
bezier_edit_icon->set_button_icon(get_editor_theme_icon(SNAME("EditBezier")));
|
|
bezier_edit_icon->set_button_icon(get_editor_theme_icon(SNAME("EditBezier")));
|
|
@@ -5939,7 +5941,7 @@ void AnimationTrackEditor::_box_selection_draw() {
|
|
|
|
|
|
void AnimationTrackEditor::_scroll_input(const Ref<InputEvent> &p_event) {
|
|
void AnimationTrackEditor::_scroll_input(const Ref<InputEvent> &p_event) {
|
|
if (!box_selecting) {
|
|
if (!box_selecting) {
|
|
- if (panner->gui_input(p_event)) {
|
|
|
|
|
|
+ if (panner->gui_input(p_event, scroll->get_global_rect())) {
|
|
scroll->accept_event();
|
|
scroll->accept_event();
|
|
return;
|
|
return;
|
|
}
|
|
}
|