CutGizmo: Add info icons to the connector types

This commit is contained in:
YuSanka 2023-02-03 12:56:14 +01:00
parent 368461f5d7
commit e4ef82d1c1
5 changed files with 42 additions and 1 deletions

15
resources/icons/dowel.svg Normal file
View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 27.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="16px" height="16px" viewBox="0 0 16 16" style="enable-background:new 0 0 16 16;" xml:space="preserve">
<g>
<path fill = "#ED6B21" d="M9,12H7c-0.5522847,0-1-0.4477148-1-1V5c0-0.5522847,0.4477153-1,1-1h2c0.5522852,0,1,0.4477153,1,1v6
C10,11.5522852,9.5522852,12,9,12z"/>
</g>
<g>
<path fill="none" stroke="#808080" stroke-linecap="round" stroke-miterlimit="10" d="M1.5,6.5h2v-3c0-1.1045694,0.8954306-2,2-2h5c1.1045694,0,2,0.8954306,2,2v3h2"/>
</g>
<g>
<path fill="none" stroke="#808080" stroke-linecap="round" stroke-miterlimit="10" d="M1.5,9.5h2v3c0,1.1045694,0.8954306,2,2,2h5c1.1045694,0,2-0.8954306,2-2v-3h2"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 899 B

13
resources/icons/plug.svg Normal file
View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 27.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="16px" height="16px" viewBox="0 0 16 16" style="enable-background:new 0 0 16 16;" xml:space="preserve">
<g>
<path fill="#ED6B21" d="M9,15H7c-0.5522847,0-1-0.4477148-1-1V5c0-0.5522847,0.4477153-1,1-1h2c0.5522852,0,1,0.4477153,1,1v9
C10,14.5522852,9.5522852,15,9,15z"/>
</g>
<g>
<path fill="none" stroke="#808080" stroke-linecap="round" stroke-miterlimit="10" d="M1.5,11.5h2v-8c0-1.1045694,0.8954306-2,2-2h5c1.1045694,0,2,0.8954306,2,2v8h2"/>
</g>
<line fill="none" stroke="#ED6B21" stroke-linecap="round" stroke-miterlimit="10" x1="1.5" y1="14.5" x2="14.5" y2="14.5"/>
</svg>

After

Width:  |  Height:  |  Size: 847 B

View File

@ -150,6 +150,8 @@ namespace ImGui
// const wchar_t CustomSupportsMarker = 0x1D; // const wchar_t CustomSupportsMarker = 0x1D;
// const wchar_t CustomSeamMarker = 0x1E; // const wchar_t CustomSeamMarker = 0x1E;
// const wchar_t MmuSegmentationMarker = 0x1F; // const wchar_t MmuSegmentationMarker = 0x1F;
const wchar_t PlugMarker = 0x1C;
const wchar_t DowelMarker = 0x1D;
// Do not forget use following letters only in wstring // Do not forget use following letters only in wstring
const wchar_t DocumentationButton = 0x2600; const wchar_t DocumentationButton = 0x2600;
const wchar_t DocumentationHoverButton = 0x2601; const wchar_t DocumentationHoverButton = 0x2601;

View File

@ -206,7 +206,16 @@ GLGizmoCut3D::GLGizmoCut3D(GLCanvas3D& parent, const std::string& icon_filename,
}; };
m_connector_modes = { _u8L("Auto"), _u8L("Manual") }; m_connector_modes = { _u8L("Auto"), _u8L("Manual") };
m_connector_types = { _u8L("Plug"), _u8L("Dowel") };
std::map<const wchar_t, std::string> 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") m_connector_styles = { _u8L("Prizm"), _u8L("Frustum")
// , _u8L("Claw") // , _u8L("Claw")

View File

@ -65,6 +65,8 @@ static const std::map<const wchar_t, std::string> font_icons = {
{ImGui::RevertButton , "undo" }, {ImGui::RevertButton , "undo" },
{ImGui::WarningMarkerSmall , "notification_warning" }, {ImGui::WarningMarkerSmall , "notification_warning" },
{ImGui::InfoMarkerSmall , "notification_info" }, {ImGui::InfoMarkerSmall , "notification_info" },
{ImGui::PlugMarker , "plug" },
{ImGui::DowelMarker , "dowel" },
}; };
static const std::map<const wchar_t, std::string> font_icons_large = { static const std::map<const wchar_t, std::string> font_icons_large = {