1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-13 13:31:48 +00:00

Add warped panning to every ViewPanner instance

This commit is contained in:
kobewi
2024-06-03 10:39:22 +02:00
parent 89001f91d2
commit 9a96393f46
15 changed files with 52 additions and 47 deletions

View File

@@ -935,14 +935,13 @@ void AnimationNodeBlendTreeEditor::_inspect_filters(const String &p_which) {
void AnimationNodeBlendTreeEditor::_update_editor_settings() {
graph->get_panner()->setup((ViewPanner::ControlScheme)EDITOR_GET("editors/panning/sub_editors_panning_scheme").operator int(), ED_GET_SHORTCUT("canvas_item_editor/pan_view"), bool(EDITOR_GET("editors/panning/simple_panning")));
graph->set_warped_panning(bool(EDITOR_GET("editors/panning/warped_mouse_panning")));
graph->set_warped_panning(EDITOR_GET("editors/panning/warped_mouse_panning"));
}
void AnimationNodeBlendTreeEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
_update_editor_settings();
graph->get_panner()->set_viewport(get_viewport());
} break;
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {