FIX: gizmotext thickness value clamp to a range
jira: new Change-Id: Ie64c1d95fdf067980d194d1ba12affbf1a76d6e0
This commit is contained in:
parent
ecb1712a54
commit
83fda76852
|
@ -781,8 +781,7 @@ void GLGizmoText::on_render_input_window(float x, float y, float bottom_limit)
|
|||
ImGui::PushItemWidth(list_width);
|
||||
float old_value = m_thickness;
|
||||
ImGui::InputFloat("###text_thickness", &m_thickness, 0.0f, 0.0f, "%.2f");
|
||||
if (m_thickness < 0.1f)
|
||||
m_thickness = 0.1f;
|
||||
m_thickness = ImClamp(m_thickness, m_thickness_min, m_thickness_max);
|
||||
if (old_value != m_thickness)
|
||||
m_need_update_text = true;
|
||||
|
||||
|
|
|
@ -26,6 +26,8 @@ private:
|
|||
bool m_bold = true;
|
||||
bool m_italic = false;
|
||||
float m_thickness = 2.f;
|
||||
float m_thickness_min = 0.f;
|
||||
float m_thickness_max = 999.99f;
|
||||
float m_embeded_depth = 0.f;
|
||||
float m_rotate_angle = 0;
|
||||
float m_text_gap = 0.f;
|
||||
|
|
Loading…
Reference in New Issue