From ead97d9164db6dc85bb9e6216016e2a2b0050100 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sat, 20 Aug 2022 03:11:31 +0200 Subject: [PATCH] Added an icon for MeshDataResource, MeshDataInstance, and for the meshDataInstance editor toggle. --- modules/mesh_data_resource/editor/mdi_ed.cpp | 4 +- .../icons/icon_mesh_data_instance.svg | 41 +++++++++++++++ .../icons/icon_mesh_data_resource.svg | 40 +++++++++++++++ .../icons/icon_mesh_data_resource_edit.svg | 50 +++++++++++++++++++ 4 files changed, 133 insertions(+), 2 deletions(-) create mode 100644 modules/mesh_data_resource/icons/icon_mesh_data_instance.svg create mode 100644 modules/mesh_data_resource/icons/icon_mesh_data_resource.svg create mode 100644 modules/mesh_data_resource/icons/icon_mesh_data_resource_edit.svg diff --git a/modules/mesh_data_resource/editor/mdi_ed.cpp b/modules/mesh_data_resource/editor/mdi_ed.cpp index c44481441..8dcfdf746 100644 --- a/modules/mesh_data_resource/editor/mdi_ed.cpp +++ b/modules/mesh_data_resource/editor/mdi_ed.cpp @@ -892,7 +892,7 @@ MDIEd::MDIEd() { _edit_mode_button->set_flat(true); _edit_mode_button->set_toggle_mode(true); _edit_mode_button->set_focus_mode(BaseButton::FOCUS_NONE); - _edit_mode_button->set_text("Edit"); + //_edit_mode_button->set_text("Edit"); _edit_mode_button->set_tooltip(TTR("Edit MeshDataResource.")); _edit_mode_button->connect("toggled", this, "_edit_mode_toggled"); SpatialEditor::get_singleton()->add_control_to_menu_panel(_edit_mode_button); @@ -907,7 +907,7 @@ MDIEd::~MDIEd() { void MDIEd::_notification(int p_what) { switch (p_what) { case NOTIFICATION_ENTER_TREE: { - _edit_mode_button->set_icon(get_theme_icon("MeshInstance", "EditorIcons")); + _edit_mode_button->set_icon(get_theme_icon("MeshDataResourceEdit", "EditorIcons")); } break; } } diff --git a/modules/mesh_data_resource/icons/icon_mesh_data_instance.svg b/modules/mesh_data_resource/icons/icon_mesh_data_instance.svg new file mode 100644 index 000000000..6ac6d2aae --- /dev/null +++ b/modules/mesh_data_resource/icons/icon_mesh_data_instance.svg @@ -0,0 +1,41 @@ + + + + + + diff --git a/modules/mesh_data_resource/icons/icon_mesh_data_resource.svg b/modules/mesh_data_resource/icons/icon_mesh_data_resource.svg new file mode 100644 index 000000000..0c7139c5b --- /dev/null +++ b/modules/mesh_data_resource/icons/icon_mesh_data_resource.svg @@ -0,0 +1,40 @@ + + + + + + diff --git a/modules/mesh_data_resource/icons/icon_mesh_data_resource_edit.svg b/modules/mesh_data_resource/icons/icon_mesh_data_resource_edit.svg new file mode 100644 index 000000000..79358dbef --- /dev/null +++ b/modules/mesh_data_resource/icons/icon_mesh_data_resource_edit.svg @@ -0,0 +1,50 @@ + + + + + + + + +