From 4b8b8039316493ee3fa77c6bb93f95e109fa68a6 Mon Sep 17 00:00:00 2001 From: Marcel Admiraal Date: Tue, 22 Dec 2020 16:24:29 +0000 Subject: Rename Control margin to offset --- editor/plugins/camera_3d_editor_plugin.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'editor/plugins/camera_3d_editor_plugin.cpp') diff --git a/editor/plugins/camera_3d_editor_plugin.cpp b/editor/plugins/camera_3d_editor_plugin.cpp index 48f9f208a5..9a5cfd35cd 100644 --- a/editor/plugins/camera_3d_editor_plugin.cpp +++ b/editor/plugins/camera_3d_editor_plugin.cpp @@ -69,12 +69,12 @@ Camera3DEditor::Camera3DEditor() { preview->set_text(TTR("Preview")); preview->set_toggle_mode(true); - preview->set_anchor(MARGIN_LEFT, Control::ANCHOR_END); - preview->set_anchor(MARGIN_RIGHT, Control::ANCHOR_END); - preview->set_margin(MARGIN_LEFT, -60); - preview->set_margin(MARGIN_RIGHT, 0); - preview->set_margin(MARGIN_TOP, 0); - preview->set_margin(MARGIN_BOTTOM, 10); + preview->set_anchor(SIDE_LEFT, Control::ANCHOR_END); + preview->set_anchor(SIDE_RIGHT, Control::ANCHOR_END); + preview->set_offset(SIDE_LEFT, -60); + preview->set_offset(SIDE_RIGHT, 0); + preview->set_offset(SIDE_TOP, 0); + preview->set_offset(SIDE_BOTTOM, 10); preview->connect("pressed", callable_mp(this, &Camera3DEditor::_pressed)); } @@ -100,12 +100,12 @@ Camera3DEditorPlugin::Camera3DEditorPlugin(EditorNode *p_node) { /* camera_editor = memnew( CameraEditor ); editor->get_viewport()->add_child(camera_editor); - camera_editor->set_anchor(MARGIN_LEFT,Control::ANCHOR_END); - camera_editor->set_anchor(MARGIN_RIGHT,Control::ANCHOR_END); - camera_editor->set_margin(MARGIN_LEFT,60); - camera_editor->set_margin(MARGIN_RIGHT,0); - camera_editor->set_margin(MARGIN_TOP,0); - camera_editor->set_margin(MARGIN_BOTTOM,10); + camera_editor->set_anchor(SIDE_LEFT,Control::ANCHOR_END); + camera_editor->set_anchor(SIDE_RIGHT,Control::ANCHOR_END); + camera_editor->set_offset(SIDE_LEFT,60); + camera_editor->set_offset(SIDE_RIGHT,0); + camera_editor->set_offset(SIDE_TOP,0); + camera_editor->set_offset(SIDE_BOTTOM,10); camera_editor->hide(); -- cgit v1.2.3