diff options
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/animation_tree_editor_plugin.cpp | 12 | ||||
-rw-r--r-- | editor/plugins/camera_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 4 | ||||
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.h | 2 | ||||
-rw-r--r-- | editor/plugins/multimesh_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/sample_editor_plugin.cpp | 6 | ||||
-rw-r--r-- | editor/plugins/sample_library_editor_plugin.cpp | 4 | ||||
-rw-r--r-- | editor/plugins/sample_player_editor_plugin.cpp | 14 | ||||
-rw-r--r-- | editor/plugins/spatial_editor_plugin.cpp | 2 |
9 files changed, 24 insertions, 24 deletions
diff --git a/editor/plugins/animation_tree_editor_plugin.cpp b/editor/plugins/animation_tree_editor_plugin.cpp index 156a74144c..0ffd1c79c2 100644 --- a/editor/plugins/animation_tree_editor_plugin.cpp +++ b/editor/plugins/animation_tree_editor_plugin.cpp @@ -1371,7 +1371,7 @@ AnimationTreeEditor::AnimationTreeEditor() { edit_option = memnew(OptionButton); edit_option->set_anchor(MARGIN_RIGHT, ANCHOR_END); - edit_option->set_margin(MARGIN_RIGHT, 10); + edit_option->set_margin(MARGIN_RIGHT, -10); edit_dialog->add_child(edit_option); edit_option->connect("item_selected", this, "_edit_dialog_changedf"); edit_option->hide(); @@ -1379,7 +1379,7 @@ AnimationTreeEditor::AnimationTreeEditor() { for (int i = 0; i < 2; i++) { edit_scroll[i] = memnew(HSlider); edit_scroll[i]->set_anchor(MARGIN_RIGHT, ANCHOR_END); - edit_scroll[i]->set_margin(MARGIN_RIGHT, 10); + edit_scroll[i]->set_margin(MARGIN_RIGHT, -10); edit_dialog->add_child(edit_scroll[i]); edit_scroll[i]->hide(); edit_scroll[i]->connect("value_changed", this, "_edit_dialog_changedf"); @@ -1387,7 +1387,7 @@ AnimationTreeEditor::AnimationTreeEditor() { for (int i = 0; i < 4; i++) { edit_line[i] = memnew(LineEdit); edit_line[i]->set_anchor(MARGIN_RIGHT, ANCHOR_END); - edit_line[i]->set_margin(MARGIN_RIGHT, 10); + edit_line[i]->set_margin(MARGIN_RIGHT, -10); edit_dialog->add_child(edit_line[i]); edit_line[i]->hide(); edit_line[i]->connect("text_changed", this, "_edit_dialog_changeds"); @@ -1399,14 +1399,14 @@ AnimationTreeEditor::AnimationTreeEditor() { edit_button = memnew(Button); edit_button->set_anchor(MARGIN_RIGHT, ANCHOR_END); - edit_button->set_margin(MARGIN_RIGHT, 10); + edit_button->set_margin(MARGIN_RIGHT, -10); edit_dialog->add_child(edit_button); edit_button->hide(); edit_button->connect("pressed", this, "_edit_oneshot_start"); edit_check = memnew(CheckButton); edit_check->set_anchor(MARGIN_RIGHT, ANCHOR_END); - edit_check->set_margin(MARGIN_RIGHT, 10); + edit_check->set_margin(MARGIN_RIGHT, -10); edit_dialog->add_child(edit_check); edit_check->hide(); edit_check->connect("pressed", this, "_edit_dialog_changed"); @@ -1428,7 +1428,7 @@ AnimationTreeEditor::AnimationTreeEditor() { filter_button = memnew(Button); filter_button->set_anchor(MARGIN_RIGHT, ANCHOR_END); - filter_button->set_margin(MARGIN_RIGHT, 10); + filter_button->set_margin(MARGIN_RIGHT, -10); edit_dialog->add_child(filter_button); filter_button->hide(); filter_button->set_text(TTR("Filters..")); diff --git a/editor/plugins/camera_editor_plugin.cpp b/editor/plugins/camera_editor_plugin.cpp index b8f8464bae..8e625c4a73 100644 --- a/editor/plugins/camera_editor_plugin.cpp +++ b/editor/plugins/camera_editor_plugin.cpp @@ -88,7 +88,7 @@ CameraEditor::CameraEditor() { 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_LEFT, -60); preview->set_margin(MARGIN_RIGHT, 0); preview->set_margin(MARGIN_TOP, 0); preview->set_margin(MARGIN_BOTTOM, 10); diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index a35d7a9a50..92acd966d0 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -2338,7 +2338,7 @@ void CanvasItemEditor::_update_scroll(float) { viewport->update(); } -void CanvasItemEditor::_set_anchor(Control::AnchorType p_left, Control::AnchorType p_top, Control::AnchorType p_right, Control::AnchorType p_bottom) { +void CanvasItemEditor::_set_anchor(float p_left, float p_top, float p_right, float p_bottom) { List<Node *> &selection = editor_selection->get_selected_node_list(); undo_redo->create_action(TTR("Change Anchors")); @@ -3372,7 +3372,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { dialog_val = memnew(SpinBox); dialog_val->set_anchor(MARGIN_RIGHT, ANCHOR_END); dialog_val->set_begin(Point2(15, 25)); - dialog_val->set_end(Point2(10, 25)); + dialog_val->set_end(Point2(-10, 25)); value_dialog->add_child(dialog_val); dialog_val->connect("value_changed", this, "_dialog_value_changed"); select_sb = Ref<StyleBoxTexture>(memnew(StyleBoxTexture)); diff --git a/editor/plugins/canvas_item_editor_plugin.h b/editor/plugins/canvas_item_editor_plugin.h index 4383be251c..53cfb88858 100644 --- a/editor/plugins/canvas_item_editor_plugin.h +++ b/editor/plugins/canvas_item_editor_plugin.h @@ -360,7 +360,7 @@ class CanvasItemEditor : public VBoxContainer { void _focus_selection(int p_op); - void _set_anchor(Control::AnchorType p_left, Control::AnchorType p_top, Control::AnchorType p_right, Control::AnchorType p_bottom); + void _set_anchor(float p_left, float p_top, float p_right, float p_bottom); void _set_full_rect(); HSplitContainer *palette_split; diff --git a/editor/plugins/multimesh_editor_plugin.cpp b/editor/plugins/multimesh_editor_plugin.cpp index 9520cc5297..a9689cce56 100644 --- a/editor/plugins/multimesh_editor_plugin.cpp +++ b/editor/plugins/multimesh_editor_plugin.cpp @@ -381,7 +381,7 @@ MultiMeshEditor::MultiMeshEditor() { populate_amount = memnew(SpinBox); populate_amount->set_anchor(MARGIN_RIGHT, ANCHOR_END); populate_amount->set_begin(Point2(20, 232)); - populate_amount->set_end(Point2(5, 237)); + populate_amount->set_end(Point2(-5, 237)); populate_amount->set_min(1); populate_amount->set_max(65536); populate_amount->set_value(128); diff --git a/editor/plugins/sample_editor_plugin.cpp b/editor/plugins/sample_editor_plugin.cpp index 739a8abb53..c4f04f0a80 100644 --- a/editor/plugins/sample_editor_plugin.cpp +++ b/editor/plugins/sample_editor_plugin.cpp @@ -366,14 +366,14 @@ SampleEditor::SampleEditor() { sample_texframe = memnew( TextureRect ); add_child(sample_texframe); sample_texframe->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_BEGIN,5); - sample_texframe->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_END,5); + sample_texframe->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_END,-5); sample_texframe->set_anchor_and_margin(MARGIN_TOP,ANCHOR_BEGIN,30); - sample_texframe->set_anchor_and_margin(MARGIN_BOTTOM,ANCHOR_END,5); + sample_texframe->set_anchor_and_margin(MARGIN_BOTTOM,ANCHOR_END,-5); info_label = memnew( Label ); sample_texframe->add_child(info_label); info_label->set_area_as_parent_rect(); - info_label->set_anchor_and_margin(MARGIN_TOP,ANCHOR_END,15); + info_label->set_anchor_and_margin(MARGIN_TOP,ANCHOR_END,-15); info_label->set_margin(MARGIN_BOTTOM,4); info_label->set_margin(MARGIN_RIGHT,4); info_label->set_align(Label::ALIGN_RIGHT); diff --git a/editor/plugins/sample_library_editor_plugin.cpp b/editor/plugins/sample_library_editor_plugin.cpp index 5ccfde15ff..9e2bc211cf 100644 --- a/editor/plugins/sample_library_editor_plugin.cpp +++ b/editor/plugins/sample_library_editor_plugin.cpp @@ -452,9 +452,9 @@ SampleLibraryEditor::SampleLibraryEditor() { tree->set_columns(6); add_child(tree); tree->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_BEGIN,5); - tree->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_END,5); + tree->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_END,-5); tree->set_anchor_and_margin(MARGIN_TOP,ANCHOR_BEGIN,30); - tree->set_anchor_and_margin(MARGIN_BOTTOM,ANCHOR_END,5); + tree->set_anchor_and_margin(MARGIN_BOTTOM,ANCHOR_END,-5); tree->set_column_titles_visible(true); tree->set_column_title(0,TTR("Name")); tree->set_column_title(1,TTR("Preview")); diff --git a/editor/plugins/sample_player_editor_plugin.cpp b/editor/plugins/sample_player_editor_plugin.cpp index 25f1fe9e17..ea9b646a9b 100644 --- a/editor/plugins/sample_player_editor_plugin.cpp +++ b/editor/plugins/sample_player_editor_plugin.cpp @@ -120,8 +120,8 @@ SamplePlayerEditor::SamplePlayerEditor() { play->set_position(Point2( 5, 5 )); play->set_toggle_mode(true); - play->set_anchor_and_margin(MARGIN_LEFT,Control::ANCHOR_END,250); - play->set_anchor_and_margin(MARGIN_RIGHT,Control::ANCHOR_END,230); + play->set_anchor_and_margin(MARGIN_LEFT,Control::ANCHOR_END,-250); + play->set_anchor_and_margin(MARGIN_RIGHT,Control::ANCHOR_END,-230); play->set_anchor_and_margin(MARGIN_TOP,Control::ANCHOR_BEGIN,0); play->set_anchor_and_margin(MARGIN_BOTTOM,Control::ANCHOR_BEGIN,0); @@ -131,15 +131,15 @@ SamplePlayerEditor::SamplePlayerEditor() { stop->set_position(Point2( 35, 5 )); stop->set_toggle_mode(true); - stop->set_anchor_and_margin(MARGIN_LEFT,Control::ANCHOR_END,220); - stop->set_anchor_and_margin(MARGIN_RIGHT,Control::ANCHOR_END,200); + stop->set_anchor_and_margin(MARGIN_LEFT,Control::ANCHOR_END,-220); + stop->set_anchor_and_margin(MARGIN_RIGHT,Control::ANCHOR_END,-200); stop->set_anchor_and_margin(MARGIN_TOP,Control::ANCHOR_BEGIN,0); stop->set_anchor_and_margin(MARGIN_BOTTOM,Control::ANCHOR_BEGIN,0); add_child(stop); samples = memnew( OptionButton ); - samples->set_anchor_and_margin(MARGIN_LEFT,Control::ANCHOR_END,190); - samples->set_anchor_and_margin(MARGIN_RIGHT,Control::ANCHOR_END,5); + samples->set_anchor_and_margin(MARGIN_LEFT,Control::ANCHOR_END,-190); + samples->set_anchor_and_margin(MARGIN_RIGHT,Control::ANCHOR_END,-5); samples->set_anchor_and_margin(MARGIN_TOP,Control::ANCHOR_BEGIN,0); samples->set_anchor_and_margin(MARGIN_BOTTOM,Control::ANCHOR_BEGIN,0); add_child(samples); @@ -182,7 +182,7 @@ SamplePlayerEditorPlugin::SamplePlayerEditorPlugin(EditorNode *p_node) { sample_player_editor->set_anchor(MARGIN_LEFT,Control::ANCHOR_END); sample_player_editor->set_anchor(MARGIN_RIGHT,Control::ANCHOR_END); - sample_player_editor->set_margin(MARGIN_LEFT,250); + sample_player_editor->set_margin(MARGIN_LEFT,-250); sample_player_editor->set_margin(MARGIN_RIGHT,0); sample_player_editor->set_margin(MARGIN_TOP,0); sample_player_editor->set_margin(MARGIN_BOTTOM,10); diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index 13fdb7ac9d..97f85d9971 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -2485,7 +2485,7 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed preview_camera = memnew(Button); preview_camera->set_toggle_mode(true); - preview_camera->set_anchor_and_margin(MARGIN_LEFT, ANCHOR_END, 90 * EDSCALE); + preview_camera->set_anchor_and_margin(MARGIN_LEFT, ANCHOR_END, -90 * EDSCALE); preview_camera->set_anchor_and_margin(MARGIN_TOP, ANCHOR_BEGIN, 10 * EDSCALE); preview_camera->set_text("preview"); surface->add_child(preview_camera); |