Add ViewPanner to 2D editor
This commit is contained in:
parent
249c60e9d1
commit
74bfe88267
21 changed files with 263 additions and 244 deletions
|
|
@ -42,6 +42,7 @@
|
|||
#include "scene/animation/animation_player.h"
|
||||
#include "scene/gui/menu_button.h"
|
||||
#include "scene/gui/panel.h"
|
||||
#include "scene/gui/view_panner.h"
|
||||
#include "scene/main/window.h"
|
||||
#include "scene/resources/visual_shader_nodes.h"
|
||||
#include "scene/resources/visual_shader_particle_nodes.h"
|
||||
|
|
@ -3222,7 +3223,8 @@ void VisualShaderEditor::_notification(int p_what) {
|
|||
}
|
||||
|
||||
if (p_what == NOTIFICATION_ENTER_TREE || p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
|
||||
graph->set_panning_scheme((GraphEdit::PanningScheme)EDITOR_GET("interface/editors/sub_editor_panning_scheme").operator int());
|
||||
graph->get_panner()->setup((ViewPanner::ControlScheme)EDITOR_GET("editors/panning/sub_editor_panning_scheme").operator int(), ED_GET_SHORTCUT("canvas_item_editor/pan_view"), bool(EditorSettings::get_singleton()->get("editors/panning/simple_panning")));
|
||||
graph->set_warped_panning(bool(EditorSettings::get_singleton()->get("editors/panning/warped_mouse_panning")));
|
||||
}
|
||||
|
||||
if (p_what == NOTIFICATION_DRAG_BEGIN) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue