From e4ef82d1c1bff7dbe1e5a8e4ef9840ae55fc9445 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Fri, 3 Feb 2023 12:56:14 +0100 Subject: [PATCH] CutGizmo: Add info icons to the connector types --- resources/icons/dowel.svg | 15 +++++++++++++++ resources/icons/plug.svg | 13 +++++++++++++ src/imgui/imconfig.h | 2 ++ src/slic3r/GUI/Gizmos/GLGizmoCut.cpp | 11 ++++++++++- src/slic3r/GUI/ImGuiWrapper.cpp | 2 ++ 5 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 resources/icons/dowel.svg create mode 100644 resources/icons/plug.svg diff --git a/resources/icons/dowel.svg b/resources/icons/dowel.svg new file mode 100644 index 000000000..4e2fcfb58 --- /dev/null +++ b/resources/icons/dowel.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + diff --git a/resources/icons/plug.svg b/resources/icons/plug.svg new file mode 100644 index 000000000..561095207 --- /dev/null +++ b/resources/icons/plug.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/src/imgui/imconfig.h b/src/imgui/imconfig.h index 651df6183..dff8aea9f 100644 --- a/src/imgui/imconfig.h +++ b/src/imgui/imconfig.h @@ -150,6 +150,8 @@ namespace ImGui // const wchar_t CustomSupportsMarker = 0x1D; // const wchar_t CustomSeamMarker = 0x1E; // const wchar_t MmuSegmentationMarker = 0x1F; + const wchar_t PlugMarker = 0x1C; + const wchar_t DowelMarker = 0x1D; // Do not forget use following letters only in wstring const wchar_t DocumentationButton = 0x2600; const wchar_t DocumentationHoverButton = 0x2601; diff --git a/src/slic3r/GUI/Gizmos/GLGizmoCut.cpp b/src/slic3r/GUI/Gizmos/GLGizmoCut.cpp index 056ec9d14..4d65dcfb0 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoCut.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoCut.cpp @@ -206,7 +206,16 @@ GLGizmoCut3D::GLGizmoCut3D(GLCanvas3D& parent, const std::string& icon_filename, }; m_connector_modes = { _u8L("Auto"), _u8L("Manual") }; - m_connector_types = { _u8L("Plug"), _u8L("Dowel") }; + + std::map connetor_types = { + {ImGui::PlugMarker , _u8L("Plug") }, + {ImGui::DowelMarker, _u8L("Dowel") }, + }; + for (auto connector : connetor_types) { + std::string type_label = " " + connector.second + " "; + type_label += connector.first; + m_connector_types.push_back(type_label); + } m_connector_styles = { _u8L("Prizm"), _u8L("Frustum") // , _u8L("Claw") diff --git a/src/slic3r/GUI/ImGuiWrapper.cpp b/src/slic3r/GUI/ImGuiWrapper.cpp index 20913f66d..c92f65f6b 100644 --- a/src/slic3r/GUI/ImGuiWrapper.cpp +++ b/src/slic3r/GUI/ImGuiWrapper.cpp @@ -65,6 +65,8 @@ static const std::map font_icons = { {ImGui::RevertButton , "undo" }, {ImGui::WarningMarkerSmall , "notification_warning" }, {ImGui::InfoMarkerSmall , "notification_info" }, + {ImGui::PlugMarker , "plug" }, + {ImGui::DowelMarker , "dowel" }, }; static const std::map font_icons_large = {