NEW:add variable layer height

Change-Id: Idef7f0dea32e4faaeb4d6eb188695cc7b554099c
(cherry picked from commit 4969835159eebb356e9b26dab223ad0a18882b70)
This commit is contained in:
liz.li 2022-10-28 11:19:43 +08:00 committed by Lane.Wei
parent b44f3ae3e6
commit 22dd20ab58
16 changed files with 927 additions and 75 deletions

View file

@ -475,6 +475,7 @@ void GLGizmoFdmSupports::show_tooltip_information(float caption_max, float x, fl
float font_size = ImGui::GetFontSize();
ImVec2 button_size = ImVec2(font_size * 1.8, font_size * 1.3);
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 0.0f);
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, { 0, ImGui::GetStyle().FramePadding.y });
ImGui::ImageButton3(normal_id, hover_id, button_size);
if (ImGui::IsItemHovered()) {
@ -506,7 +507,7 @@ void GLGizmoFdmSupports::show_tooltip_information(float caption_max, float x, fl
ImGui::EndTooltip();
}
ImGui::PopStyleVar(1);
ImGui::PopStyleVar(2);
}
// BBS

View file

@ -306,6 +306,7 @@ void GLGizmoMmuSegmentation::show_tooltip_information(float caption_max, float x
float font_size = ImGui::GetFontSize();
ImVec2 button_size = ImVec2(font_size * 1.8, font_size * 1.3);
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 0.0f);
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, { 0, ImGui::GetStyle().FramePadding.y });
ImGui::ImageButton3(normal_id, hover_id, button_size);
if (ImGui::IsItemHovered()) {
@ -336,7 +337,7 @@ void GLGizmoMmuSegmentation::show_tooltip_information(float caption_max, float x
for (const auto &t : tip_items) draw_text_with_caption(m_desc.at(t + "_caption") + ": ", m_desc.at(t));
ImGui::EndTooltip();
}
ImGui::PopStyleVar(1);
ImGui::PopStyleVar(2);
}
void GLGizmoMmuSegmentation::on_render_input_window(float x, float y, float bottom_limit)

View file

@ -132,6 +132,7 @@ void GLGizmoSeam::show_tooltip_information(float caption_max, float x, float y)
float font_size = ImGui::GetFontSize();
ImVec2 button_size = ImVec2(font_size * 1.8, font_size * 1.3);
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 0.0f);
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, { 0, ImGui::GetStyle().FramePadding.y });
ImGui::ImageButton3(normal_id, hover_id, button_size);
if (ImGui::IsItemHovered()) {
@ -145,7 +146,7 @@ void GLGizmoSeam::show_tooltip_information(float caption_max, float x, float y)
for (const auto &t : std::array<std::string, 5>{"enforce", "block", "remove", "cursor_size", "clipping_of_view"}) draw_text_with_caption(m_desc.at(t + "_caption") + ": ", m_desc.at(t));
ImGui::EndTooltip();
}
ImGui::PopStyleVar(1);
ImGui::PopStyleVar(2);
}
void GLGizmoSeam::tool_changed(wchar_t old_tool, wchar_t new_tool)

View file

@ -256,6 +256,12 @@ public:
else
return nullptr;
}
void* get_icon_texture_id(MENU_ICON_NAME icon) const{
if (icon_list.find((int)icon) != icon_list.end())
return icon_list.at(icon);
else
return nullptr;
}
Vec3d get_flattening_normal() const;