imgui: More refactoring, cut gizmo window positioning

This commit is contained in:
Vojtech Kral 2019-04-01 15:36:48 +02:00
parent 145b8fd0df
commit c542413962
4 changed files with 24 additions and 30 deletions

View file

@ -185,7 +185,10 @@ void GLGizmoCut::on_render_for_picking(const Selection& selection) const
void GLGizmoCut::on_render_input_window(float x, float y, float bottom_limit, const Selection& selection)
{
const float approx_height = m_imgui->scaled(11.0f);
y = std::min(y, bottom_limit - approx_height);
m_imgui->set_next_window_pos(x, y, ImGuiCond_Always);
m_imgui->set_next_window_bg_alpha(0.5f);
m_imgui->begin(_(L("Cut")), ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoCollapse);