3D scene labels transparent to mouse click

This commit is contained in:
Enrico Turri 2020-02-03 13:24:11 +01:00
parent 6fa49f5931
commit 1ee2f16a71

View file

@ -1359,7 +1359,7 @@ void GLCanvas3D::Labels::render(const std::vector<const PrintInstance*>& sorted_
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 0.0f);
ImGui::PushStyleColor(ImGuiCol_Border, owner.selected ? ImVec4(0.757f, 0.404f, 0.216f, 1.0f) : ImVec4(0.75f, 0.75f, 0.75f, 1.0f));
imgui.set_next_window_pos(x, y, ImGuiCond_Always, 0.5f, 0.5f);
imgui.begin(owner.title, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoMove);
imgui.begin(owner.title, ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoMove);
ImGui::BringWindowToDisplayFront(ImGui::GetCurrentWindow());
float win_w = ImGui::GetWindowWidth();
float label_len = imgui.calc_text_size(owner.label).x;