Measuring - Gizmo measure - Disable background fadeout animation when showing imgui modal dialog to edit distance
This commit is contained in:
parent
7002b94419
commit
908634d5b7
@ -903,6 +903,7 @@ void GLGizmoMeasure::render_dimensioning()
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, { 1.0f, 1.0f });
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, { 4.0f, 0.0f });
|
||||
if (ImGui::BeginPopupModal("distance_popup", nullptr, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoDecoration)) {
|
||||
m_imgui->disable_background_fadeout_animation();
|
||||
ImGui::PushItemWidth(value_str_width);
|
||||
if (ImGui::InputDouble("##distance", &edit_value, 0.0f, 0.0f, "%.3f")) {
|
||||
}
|
||||
|
@ -1124,6 +1124,13 @@ ImFontAtlasCustomRect* ImGuiWrapper::GetTextureCustomRect(const wchar_t& tex_id)
|
||||
return (item != m_custom_glyph_rects_ids.end()) ? ImGui::GetIO().Fonts->GetCustomRectByIndex(m_custom_glyph_rects_ids[tex_id]) : nullptr;
|
||||
}
|
||||
|
||||
#if ENABLE_MEASURE_GIZMO
|
||||
void ImGuiWrapper::disable_background_fadeout_animation()
|
||||
{
|
||||
GImGui->DimBgRatio = 1.0f;
|
||||
}
|
||||
#endif // ENABLE_MEASURE_GIZMO
|
||||
|
||||
ImU32 ImGuiWrapper::to_ImU32(const ColorRGBA& color)
|
||||
{
|
||||
return ImGui::GetColorU32({ color.r(), color.g(), color.b(), color.a() });
|
||||
|
@ -130,6 +130,10 @@ public:
|
||||
void set_requires_extra_frame() { m_requires_extra_frame = true; }
|
||||
void reset_requires_extra_frame() { m_requires_extra_frame = false; }
|
||||
|
||||
#if ENABLE_MEASURE_GIZMO
|
||||
void disable_background_fadeout_animation();
|
||||
#endif // ENABLE_MEASURE_GIZMO
|
||||
|
||||
static ImU32 to_ImU32(const ColorRGBA& color);
|
||||
static ImVec4 to_ImVec4(const ColorRGBA& color);
|
||||
static ColorRGBA from_ImU32(const ImU32& color);
|
||||
|
Loading…
Reference in New Issue
Block a user