UI item spacing on Android

This commit is contained in:
saschawillems 2017-11-02 09:08:47 +01:00
parent 2f9515466a
commit 09dae4ee0b

View file

@ -557,17 +557,22 @@ void VulkanExampleBase::updateOverlay()
ImGui::SetNextWindowPos(ImVec2(10, 10));
ImGui::SetNextWindowSize(ImVec2(0, 0), ImGuiSetCond_FirstUseEver);
ImGui::Begin("Vulkan Example", nullptr, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove);
ImGui::Text(title.c_str());
ImGui::Text(deviceProperties.deviceName);
ImGui::TextUnformatted(title.c_str());
ImGui::TextUnformatted(deviceProperties.deviceName);
ImGui::Text("%.2f ms/frame (%.1d fps)", (frameTimer * 1000.0f), lastFPS);
ImGui::PushItemWidth(110.0f);
#if defined(VK_USE_PLATFORM_ANDROID_KHR)
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0.0f, 5.0f * UIOverlay->scale));
#endif
ImGui::PushItemWidth(110.0f * UIOverlay->scale);
OnUpdateUIOverlay(UIOverlay);
ImGui::PopItemWidth();
#if defined(VK_USE_PLATFORM_ANDROID_KHR)
ImGui::PopStyleVar();
#endif
ImGui::End();
ImGui::PopStyleVar();
ImGui::Render();
UIOverlay->update();