| 879 | } |
| 880 | |
| 881 | bool GuiImpl::addImageButton(const char label[], const Texture* pTex, float2 size, bool maintainRatio, bool sameLine) |
| 882 | { |
| 883 | FALCOR_ASSERT(pTex); |
| 884 | if (sameLine) |
| 885 | ImGui::SameLine(); |
| 886 | float aspectRatio = maintainRatio ? (static_cast<float>(pTex->getHeight()) / static_cast<float>(pTex->getWidth())) : 1.0f; |
| 887 | return ImGui::ImageButton((ImTextureID)(pTex), {size.x, maintainRatio ? size.x * aspectRatio : size.y}); |
| 888 | } |
| 889 | |
| 890 | template<typename T> |
| 891 | bool addScalarVarHelper( |
no test coverage detected