Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Courses
CA-Framework-2022
Commits
f0c42b52
Commit
f0c42b52
authored
May 10, 2021
by
Hui Wang
Browse files
fix menu rendering bug in vs2019
parent
de7e1808
Changes
1
Show whitespace changes
Inline
Side-by-side
include/Gui.cpp
View file @
f0c42b52
...
...
@@ -313,12 +313,13 @@ void Gui::drawMenuWindow(igl::opengl::glfw::imgui::ImGuiMenu &menu) {
// Controls
ImGui
::
SetNextWindowPos
(
ImVec2
(
0.0
f
,
0.0
f
),
ImGuiSetCond_FirstUseEver
);
ImGui
::
SetNextWindowSize
(
ImVec2
(
0.0
f
,
0.0
f
),
ImGuiSetCond_FirstUseEver
);
ImGui
::
SetNextWindowSizeConstraints
(
ImVec2
(
menu_width
,
-
1.0
f
),
ImVec2
(
menu_width
,
-
1.0
f
));
//
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.5
f
);
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.0
f
),
ImGuiSetCond_FirstUseEver
);
ImGui
::
SetNextWindowSize
(
ImVec2
(
0.0
f
,
0.0
f
),
ImGuiSetCond_FirstUseEver
);
ImGui
::
SetNextWindowSizeConstraints
(
ImVec2
(
menu_width
,
-
1.0
f
),
ImVec2
(
menu_width
,
-
1.0
f
));
//
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.5
f
);
if
(
!
p_simulator
->
isPaused
())
{
if
(
m_timerAverage
>
0.0
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment