| 10783 | } |
| 10784 | |
| 10785 | bool ImGui::InputFloat(const char* label, float* v, float step, float step_fast, int decimal_precision, ImGuiInputTextFlags extra_flags) |
| 10786 | { |
| 10787 | char display_format[16]; |
| 10788 | if (decimal_precision < 0) |
| 10789 | strcpy(display_format, "%f"); // Ideally we'd have a minimum decimal precision of 1 to visually denote that this is a float, while hiding non-significant digits? %f doesn't have a minimum of 1 |
| 10790 | else |
| 10791 | ImFormatString(display_format, IM_ARRAYSIZE(display_format), "%%.%df", decimal_precision); |
| 10792 | return InputScalarEx(label, ImGuiDataType_Float, (void*)v, (void*)(step > 0.0f ? &step : NULL), (void*)(step_fast > 0.0f ? &step_fast : NULL), display_format, extra_flags); |
| 10793 | } |
| 10794 | |
| 10795 | bool ImGui::InputInt(const char* label, int* v, int step, int step_fast, ImGuiInputTextFlags extra_flags) |
| 10796 | { |
nothing calls this directly
no test coverage detected