Tech ENABLE_ENHANCED_IMGUI_SLIDER_FLOAT - Modified ImGuiWrapper::slider_float() to create a compound widget where an additional button can be used to set the keyboard focus into the slider to allow the user to type in the desired value

This commit is contained in:
enricoturri1966 2021-11-05 14:46:44 +01:00
parent c8ff0de27e
commit f7662682c8
11 changed files with 183 additions and 37 deletions

View file

@ -167,7 +167,11 @@ void GLGizmoCut::on_render_input_window(float x, float y, float bottom_limit)
ImGui::SetWindowPos(ImVec2(x, y), ImGuiCond_Always);
if (last_h != win_h || last_y != y) {
// ask canvas for another frame to render the window in the correct position
#if ENABLE_ENHANCED_IMGUI_SLIDER_FLOAT
m_imgui->set_requires_extra_frame();
#else
m_parent.request_extra_frame();
#endif // ENABLE_ENHANCED_IMGUI_SLIDER_FLOAT
if (last_h != win_h)
last_h = win_h;
if (last_y != y)