| 848 | }; |
| 849 | |
| 850 | static void ExampleImageViewer_DrawOptions(ExampleImageViewerData* data) |
| 851 | { |
| 852 | ImGui::SetNextItemShortcut(ImGuiKey_G, ImGuiInputFlags_Tooltip); // | ImGuiInputFlags_RouteGlobal |
| 853 | ImGui::Checkbox("Grid", &data->GridEnabled); |
| 854 | ImGui::SameLine(); |
| 855 | ImGui::SetNextItemWidth(ImGui::GetFontSize() * 10.0f); |
| 856 | float zoom_100 = data->Zoom * 100.0f; |
| 857 | if (ImGui::DragFloat("##Zoom", &zoom_100, 5.0f, data->ZoomMin * 100.0f, data->ZoomMax * 100.0f, "%.0f%%", ImGuiSliderFlags_AlwaysClamp)) |
| 858 | data->Zoom = zoom_100 / 100.0f; |
| 859 | } |
| 860 | |
| 861 | static void ExampleImageViewer_DrawCanvas(ExampleImageViewerData* data, ImVec2 canvas_size, ImTextureRef image_tex_ref, int image_w, int image_h) |
| 862 | { |
no outgoing calls
no test coverage detected