Commit f0c42b52 authored by Hui Wang's avatar Hui Wang
Browse files

fix menu rendering bug in vs2019

parent de7e1808
......@@ -313,12 +313,13 @@ void Gui::drawMenuWindow(igl::opengl::glfw::imgui::ImGuiMenu &menu) {
// Controls
ImGui::SetNextWindowPos(ImVec2(0.0f, 0.0f), ImGuiSetCond_FirstUseEver);
ImGui::SetNextWindowSize(ImVec2(0.0f, 0.0f), ImGuiSetCond_FirstUseEver);
ImGui::SetNextWindowSizeConstraints(ImVec2(menu_width, -1.0f),
ImVec2(menu_width, -1.0f));
// ImGui::SetNextWindowSizeConstraints(ImVec2(menu_width, -1.0f),
// ImVec2(menu_width, -1.0f));
bool _viewer_menu_visible = true;
ImGui::Begin(
"Viewer", &_viewer_menu_visible,
ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_AlwaysAutoResize);
// ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_AlwaysAutoResize);
ImGuiWindowFlags_NoSavedSettings);
ImGui::PushItemWidth(ImGui::GetWindowWidth() * 0.5f);
drawMenu(m_viewer, menu);
ImGui::PopItemWidth();
......@@ -371,11 +372,12 @@ void Gui::drawMenuWindow(igl::opengl::glfw::imgui::ImGuiMenu &menu) {
ImGui::SetNextWindowPos(ImVec2(width - menu_width, 0.0f),
ImGuiSetCond_FirstUseEver);
ImGui::SetNextWindowSize(ImVec2(0.0f, 0.0f), ImGuiSetCond_FirstUseEver);
ImGui::SetNextWindowSizeConstraints(ImVec2(menu_width, -1.0f),
ImVec2(menu_width, -1.0f));
// ImGui::SetNextWindowSizeConstraints(ImVec2(menu_width, -1.0f),
// ImVec2(menu_width, -1.0f));
ImGui::Begin("Stats", &_viewer_menu_visible,
ImGuiWindowFlags_NoSavedSettings |
ImGuiWindowFlags_AlwaysAutoResize);
// ImGuiWindowFlags_NoSavedSettings |
// ImGuiWindowFlags_AlwaysAutoResize);
ImGuiWindowFlags_NoSavedSettings);
ImGui::PushItemWidth(ImGui::GetWindowWidth() * 0.5f);
if (!p_simulator->isPaused()) {
if (m_timerAverage > 0.0) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment