summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-10-24 01:47:40 +0200
committerGitHub <noreply@github.com>2020-10-24 01:47:40 +0200
commit11f362b510ba7feaab116ff39c1d0b1c7bf9da6f (patch)
treea7b24f0b95066d82bf9e4f5f53aee29ae57a8e7f
parent64be558443c6ec684a9fffc4ee516a403c8d7e71 (diff)
parentc26b49fc17578214077626267a2fe022a39965dd (diff)
Merge pull request #35766 from YeldhamDev/poly2d_uv_editor_improvements
Minor improvements to the Polygon 2D UV editor
-rw-r--r--editor/icons/PaintVertex.svg1
-rw-r--r--editor/icons/UnpaintVertex.svg1
-rw-r--r--editor/plugins/polygon_2d_editor_plugin.cpp13
3 files changed, 9 insertions, 6 deletions
diff --git a/editor/icons/PaintVertex.svg b/editor/icons/PaintVertex.svg
deleted file mode 100644
index 5a13e4b7d0..0000000000
--- a/editor/icons/PaintVertex.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><ellipse cx="8.372881" cy="8.169492" fill="#fff" rx="6.677966" ry="6.067797"/></svg>
diff --git a/editor/icons/UnpaintVertex.svg b/editor/icons/UnpaintVertex.svg
deleted file mode 100644
index 059fcf6e25..0000000000
--- a/editor/icons/UnpaintVertex.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><ellipse cx="8.372881" cy="8.169492" rx="6.677966" ry="6.067797"/></svg>
diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp
index dd1194d020..ac90ee9570 100644
--- a/editor/plugins/polygon_2d_editor_plugin.cpp
+++ b/editor/plugins/polygon_2d_editor_plugin.cpp
@@ -79,8 +79,8 @@ void Polygon2DEditor::_notification(int p_what) {
uv_button[UV_MODE_SCALE]->set_icon(get_theme_icon("ToolScale", "EditorIcons"));
uv_button[UV_MODE_ADD_POLYGON]->set_icon(get_theme_icon("Edit", "EditorIcons"));
uv_button[UV_MODE_REMOVE_POLYGON]->set_icon(get_theme_icon("Close", "EditorIcons"));
- uv_button[UV_MODE_PAINT_WEIGHT]->set_icon(get_theme_icon("PaintVertex", "EditorIcons"));
- uv_button[UV_MODE_CLEAR_WEIGHT]->set_icon(get_theme_icon("UnpaintVertex", "EditorIcons"));
+ uv_button[UV_MODE_PAINT_WEIGHT]->set_icon(get_theme_icon("Bucket", "EditorIcons"));
+ uv_button[UV_MODE_CLEAR_WEIGHT]->set_icon(get_theme_icon("Clear", "EditorIcons"));
b_snap_grid->set_icon(get_theme_icon("Grid", "EditorIcons"));
b_snap_enable->set_icon(get_theme_icon("SnapGrid", "EditorIcons"));
@@ -1325,11 +1325,16 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) :
uv_main_hsc->add_child(uv_edit_draw);
uv_edit_draw->set_h_size_flags(SIZE_EXPAND_FILL);
uv_edit_draw->set_custom_minimum_size(Size2(200, 200) * EDSCALE);
+
+ Control *space = memnew(Control);
+ uv_mode_hb->add_child(space);
+ space->set_h_size_flags(SIZE_EXPAND_FILL);
+
uv_menu = memnew(MenuButton);
uv_mode_hb->add_child(uv_menu);
uv_menu->set_text(TTR("Edit"));
- uv_menu->get_popup()->add_item(TTR("Polygon->UV"), UVEDIT_POLYGON_TO_UV);
- uv_menu->get_popup()->add_item(TTR("UV->Polygon"), UVEDIT_UV_TO_POLYGON);
+ uv_menu->get_popup()->add_item(TTR("Copy Polygon to UV"), UVEDIT_POLYGON_TO_UV);
+ uv_menu->get_popup()->add_item(TTR("Copy UV to Polygon"), UVEDIT_UV_TO_POLYGON);
uv_menu->get_popup()->add_separator();
uv_menu->get_popup()->add_item(TTR("Clear UV"), UVEDIT_UV_CLEAR);
uv_menu->get_popup()->add_separator();