From fcc9160e0340f5e79bcd0875180db406bca27452 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Tue, 2 Jan 2018 16:20:03 -0800 Subject: [PATCH] texturev: Added scale slider. --- tools/texturev/texturev.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/texturev/texturev.cpp b/tools/texturev/texturev.cpp index ca26b3312..0848b08cf 100644 --- a/tools/texturev/texturev.cpp +++ b/tools/texturev/texturev.cpp @@ -1462,7 +1462,7 @@ int _main_(int _argc, char** _argv) if (view.m_info) { ImGui::SetNextWindowSize( - ImVec2(300.0f, 240.0f) + ImVec2(300.0f, 300.0f) , ImGuiCond_FirstUseEver ); @@ -1479,20 +1479,20 @@ int _main_(int _argc, char** _argv) , bimg::getName(bimg::TextureFormat::Enum(view.m_textureInfo.format) ) ); - ImGui::Text("Layers: %d / %d" - , view.m_layer - , view.m_textureInfo.numLayers - 1 - ); + ImGui::SliderInt("Layer", (int32_t*)&view.m_layer, 0, view.m_textureInfo.numLayers - 1); + ImGui::SliderInt("Mip", (int32_t*)&view.m_mip, 0, view.m_textureInfo.numMips - 1); - ImGui::Text("Mips: %d / %d" - , view.m_mip - , view.m_textureInfo.numMips - 1 - ); + ImGui::Separator(); ImGui::Checkbox("Input linear", &view.m_inLinear); ImGui::RangeSliderFloat("EV range", &view.m_evMin, &view.m_evMax, kEvMin, kEvMax); ImGui::SliderFloat("EV", &view.m_ev, view.m_evMin, view.m_evMax); + ImGui::Separator(); + + ImGui::Checkbox("Fit to window", &view.m_fit); + ImGui::SliderFloat("Scale", &view.m_zoom, 0.01f, 10.0f); + ImGui::EndChild(); }