fixed imgui window position (#1151)
With SetWindowPos there was a strange flickering of the window when the user tried to grab the window. This is fixed with SetNextWindowPos.
This commit is contained in:
Родитель
019d9909c1
Коммит
c40c83d337
|
@ -131,12 +131,12 @@ class ExampleLod : public entry::AppI
|
|||
, uint16_t(m_height)
|
||||
);
|
||||
|
||||
ImGui::SetNextWindowPos(ImVec2(m_width - m_width / 5.0f - 10.0f, 10.0f) );
|
||||
ImGui::Begin("LOD Settings"
|
||||
, NULL
|
||||
, ImVec2(m_width / 5.0f, m_height / 6.0f)
|
||||
, ImGuiWindowFlags_AlwaysAutoResize
|
||||
);
|
||||
ImGui::SetWindowPos(ImVec2(m_width - m_width / 5.0f - 10.0f, 10.0f) );
|
||||
|
||||
ImGui::Checkbox("Transition", &m_transitions);
|
||||
|
||||
|
|
|
@ -430,12 +430,12 @@ class ExampleDeferred : public entry::AppI
|
|||
, uint16_t(m_height)
|
||||
);
|
||||
|
||||
ImGui::SetNextWindowPos(ImVec2(m_width - m_width / 5.0f - 10.0f, 10.0f) );
|
||||
ImGui::Begin("Deferred Rendering Settings"
|
||||
, NULL
|
||||
, ImVec2(m_width / 5.0f, m_height / 3.0f)
|
||||
, ImGuiWindowFlags_AlwaysAutoResize
|
||||
);
|
||||
ImGui::SetWindowPos(ImVec2(m_width - m_width / 5.0f - 10.0f, 10.0f) );
|
||||
|
||||
ImGui::SliderInt("Num lights", &m_numLights, 1, 2048);
|
||||
ImGui::Checkbox("Show G-Buffer.", &m_showGBuffer);
|
||||
|
|
|
@ -262,8 +262,8 @@ class ExamplePom : public entry::AppI
|
|||
, uint16_t(m_height)
|
||||
);
|
||||
|
||||
ImGui::SetNextWindowPos(ImVec2(m_width - 240.0f, 20.0f));
|
||||
ImGui::Begin("Properties");
|
||||
ImGui::SetWindowPos(ImVec2(m_width - 240.0f, 20.0f));
|
||||
|
||||
ImGui::RadioButton("No bump mapping", &m_shading_type, 0);
|
||||
ImGui::RadioButton("Normal mapping", &m_shading_type, 1);
|
||||
|
|
Загрузка…
Ссылка в новой задаче