From 1e4aa3639c62766dee56b683c71dbd35679e5941 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Sat, 3 Jun 2017 12:13:08 -0700 Subject: [PATCH] 12-lod: Switched to new ImGui. --- examples/12-lod/lod.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/examples/12-lod/lod.cpp b/examples/12-lod/lod.cpp index 510565d0e..f7f947a9f 100644 --- a/examples/12-lod/lod.cpp +++ b/examples/12-lod/lod.cpp @@ -131,18 +131,20 @@ class ExampleLod : public entry::AppI , uint16_t(m_height) ); - imguiBeginScrollArea("Toggle transitions", m_width - m_width / 5 - 10, 10, m_width / 5, m_height / 6, &m_scrollArea); - imguiSeparatorLine(); + 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) ); - if (imguiButton(m_transitions ? "ON" : "OFF") ) - { - m_transitions = !m_transitions; - } + ImGui::Checkbox("Transition", &m_transitions); static float distance = 2.0f; - imguiSlider("Distance", distance, 2.0f, 6.0f, 0.01f); + ImGui::SliderFloat("Distance", &distance, 2.0f, 6.0f); + + ImGui::End(); - imguiEndScrollArea(); imguiEndFrame(); // Set view 0 default viewport.